Mercurial > libervia-templates
comparison sat_templates/templates/bulma/list/view_grocery.html @ 309:27511c821481
bulma (list/overview): use specialised view for `grocery` list
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 27 Feb 2021 20:54:13 +0100 |
parents | |
children | 3db3509cbad1 |
comparison
equal
deleted
inserted
replaced
308:3054387cac3b | 309:27511c821481 |
---|---|
1 {% import 'input/form.html' as form with context %} | |
2 {% import 'input/field.html' as field with context %} | |
3 | |
4 <div id="list" class="container has-background-white px-1 py-1"> | |
5 {% for item in list_items %} | |
6 {% set is_bought = item.widget_value.status == 'bought' %} | |
7 <div class="item box has-background-light has-text-weight-medium | |
8 {{'list-item-closed' if is_bought}}" | |
9 data-item='{{item.values|tojson}}'> | |
10 <div class="level is-mobile"> | |
11 <div class="level-left"> | |
12 <div class="level-item"> | |
13 <input type="checkbox" {{"checked" if is_bought}} class="click_to_next_state"> | |
14 </div> | |
15 <div class="level-item"> | |
16 {{item.widget_value.name}} | |
17 </div> | |
18 </div> | |
19 <div class="level-right"> | |
20 <div class="level-item"> | |
21 {{item.widget_value.quantity}} | |
22 </div> | |
23 <div class="level-item"> | |
24 <button class="delete click_to_delete"></button> | |
25 </div> | |
26 </div> | |
27 </div> | |
28 </div> | |
29 {% endfor %} | |
30 | |
31 {% call form.form(id="post_grocery") %} | |
32 {{ field.meta("type", "grocery") }} | |
33 {% call field.text("name", class="has-addons", control_class="is-expanded", placeholder=_("item to get"), required=true) %} | |
34 {{ field.int("quantity", control_class="has-width-7", placeholder=_("quantity"), init="", min=1, in_group=true) }} | |
35 {{ field.submit("", icon="plus") }} | |
36 {% endcall %} | |
37 {% endcall %} | |
38 </div> |