Mercurial > libervia-templates
comparison default/input/xmlui.html @ 66:9834106678da
base: menu implementation:
2 menus are now handled: main menu and category menu (for submenus relative to a page).
Main menu is displayed on the side bar on big screen.
Added menu for tickets.
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 01 Dec 2017 00:46:42 +0100 |
parents | dd15b6c0b1d3 |
children | 6f1686723472 |
comparison
equal
deleted
inserted
replaced
65:dd15b6c0b1d3 | 66:9834106678da |
---|---|
12 {% endif %} | 12 {% endif %} |
13 {% endmacro %} | 13 {% endmacro %} |
14 | 14 |
15 {% macro generate_widget(wid, config, id=none) %} | 15 {% macro generate_widget(wid, config, id=none) %} |
16 {% if wid.type == 'text' %} | 16 {% if wid.type == 'text' %} |
17 {{ text_widget(wid, config, id=id) }} | 17 {{ text_widget(wid, config, id=id) }} |
18 {% elif wid.type == 'label' %} | 18 {% elif wid.type == 'label' %} |
19 {{ label_widget(wid, config) }} | 19 {{ label_widget(wid, config) }} |
20 {% elif wid.type == 'string' %} | 20 {% elif wid.type == 'string' %} |
21 {{ string_widget(wid, config, id=id) }} | 21 {{ string_widget(wid, config, id=id) }} |
22 {% elif wid.type == 'jid' %} | 22 {% elif wid.type == 'jid' %} |
23 {# TODO: proper JID widget #} | 23 {# TODO: proper JID widget #} |
24 {{ string_widget(wid, config, id=id) }} | 24 {{ string_widget(wid, config, id=id) }} |
25 {% elif wid.type == 'textbox' %} | 25 {% elif wid.type == 'textbox' %} |
26 {{ textbox_widget(wid, config, id=id) }} | 26 {{ textbox_widget(wid, config, id=id) }} |
27 {% elif wid.type == 'list' %} | 27 {% elif wid.type == 'list' %} |
28 {{ list_widget(wid, config, id=id) }} | 28 {{ list_widget(wid, config, id=id) }} |
29 {% endif %} | 29 {% endif %} |
30 {% endmacro %} | 30 {% endmacro %} |
31 | 31 |
32 {% macro generate_children(cont, config) %} | 32 {% macro generate_children(cont, config) %} |
33 {% for child in cont.children %} | 33 {% for child in cont.children %} |
159 {% if config.form %} | 159 {% if config.form %} |
160 <textarea class="xmlui_widget xmlui_textbox" rows="10" cols="50" {{ {'name':wid.name, 'id':id}|dict_ext(config.attrs, wid.name)|xmlattr }}> | 160 <textarea class="xmlui_widget xmlui_textbox" rows="10" cols="50" {{ {'name':wid.name, 'id':id}|dict_ext(config.attrs, wid.name)|xmlattr }}> |
161 {{- wid|item_filter(config.filters) -}} | 161 {{- wid|item_filter(config.filters) -}} |
162 </textarea> | 162 </textarea> |
163 {% else %} | 163 {% else %} |
164 <p class="xmlui_widget xmlui_textbox" {{ {'id':id}|xmlattr }}> | 164 <p class="xmlui_widget xmlui_textbox" {{ {'id':id}|xmlattr }}> |
165 {{- wid|item_filter(config.filters) -}} | 165 {{- wid|item_filter(config.filters) -}} |
166 </p> | 166 </p> |
167 {% endif %} | 167 {% endif %} |
168 {% endmacro%} | 168 {% endmacro%} |
169 | 169 |
175 {{- label -}} | 175 {{- label -}} |
176 </option> | 176 </option> |
177 {% endfor %} | 177 {% endfor %} |
178 </select> | 178 </select> |
179 {% else %} | 179 {% else %} |
180 <div class="xmlui_widget xmlui_list" {{ {'id':id}|xmlattr }}> | 180 <div class="xmlui_widget xmlui_list" {{ {'id':id}|xmlattr }}> |
181 {% for value,label in wid.items %} | 181 {% for value,label in wid.items %} |
182 <span class="xmlui_list_item value_{{value|attr_escape}}"> | 182 <span class="xmlui_list_item value_{{value|attr_escape}}"> |
183 {{- label -}} | 183 {{- label -}} |
184 </span> | 184 </span> |
185 {% endfor %} | 185 {% endfor %} |