Mercurial > libervia-templates
annotate sat_templates/templates/bulma/list/view_grocery.html @ 395:5072e4a4e261
call: update template to handle remote control mode.
rel 436
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 11 May 2024 13:55:03 +0200 |
parents | 3db3509cbad1 |
children |
rev | line source |
---|---|
309
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
1 {% import 'input/form.html' as form with context %} |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
2 {% import 'input/field.html' as field with context %} |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
3 |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
4 <div id="list" class="container has-background-white px-1 py-1"> |
332
3db3509cbad1
bulma: fix items/pagination ordering in various places following ordering fix in Libervia/SàT Pubsub
Goffi <goffi@goffi.org>
parents:
309
diff
changeset
|
5 {% for item in list_items|reverse %} |
309
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
6 {% set is_bought = item.widget_value.status == 'bought' %} |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
7 <div class="item box has-background-light has-text-weight-medium |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
8 {{'list-item-closed' if is_bought}}" |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
9 data-item='{{item.values|tojson}}'> |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
10 <div class="level is-mobile"> |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
11 <div class="level-left"> |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
12 <div class="level-item"> |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
13 <input type="checkbox" {{"checked" if is_bought}} class="click_to_next_state"> |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
14 </div> |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
15 <div class="level-item"> |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
16 {{item.widget_value.name}} |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
17 </div> |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
18 </div> |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
19 <div class="level-right"> |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
20 <div class="level-item"> |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
21 {{item.widget_value.quantity}} |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
22 </div> |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
23 <div class="level-item"> |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
24 <button class="delete click_to_delete"></button> |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
25 </div> |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
26 </div> |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
27 </div> |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
28 </div> |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
29 {% endfor %} |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
30 |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
31 {% call form.form(id="post_grocery") %} |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
32 {{ field.meta("type", "grocery") }} |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
33 {% call field.text("name", class="has-addons", control_class="is-expanded", placeholder=_("item to get"), required=true) %} |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
34 {{ field.int("quantity", control_class="has-width-7", placeholder=_("quantity"), init="", min=1, in_group=true) }} |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
35 {{ field.submit("", icon="plus") }} |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
36 {% endcall %} |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
37 {% endcall %} |
27511c821481
bulma (list/overview): use specialised view for `grocery` list
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
38 </div> |