Core

/views/components/IconPicker.html (869 B)

 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{% import (
"{{{ .Package }}}/app/controller/cutil"
"{{{ .Package }}}/app/util"
"{{{ .Package }}}/views/vutil"
) %}

{% func IconPicker(key string, selected string, ps *cutil.PageState, indent int) %}{% stripspace %}
{%= vutil.Indent(true, indent) %}
<div class="choice">
{% for _, k := range util.SVGIconKeys %}
{%= vutil.Indent(true, indent + 1) %}
<label title="{%s k %}">
{% if k == selected %}
<input type="radio" name="{%s key %}" value="{%s k %}" checked="checked" />
{% else %}
<input type="radio" name="{%s key %}" value="{%s k %}" />
{% endif %}
{% space %}
{%= SVGRef(k, 48, 48, "", ps) %}
</label>
{% endfor %}
{%= vutil.Indent(true, indent + 1) %}
<div class="clear"></div>
{%= vutil.Indent(true, indent) %}
</div>
{% endstripspace %}{% endfunc %}