Browse Source

gastro: change diet filter to a twig template

master
parent
commit
52d37a0a9b
  1. 15
      gastro.yaml

15
gastro.yaml

@ -213,11 +213,13 @@ filter:
name: |
{{ keyTrans('diet') }}
type: select
values:
'*':
name: |
{{ repoTrans('Objects with diet information') }}
query: nwr[~"^diet:"~"."]
values: |
<option weight='-1' value='*' query='nwr[~"^diet:"~"."]'>{{ repoTrans('Objects with diet information') }}</option>
{% for key, def in const.diet %}
<option value='{{ key }}' query='nwr["{{ key }}"]'>{{ keyTrans(key) }}</option>
{% endfor %}
const:
diet:
diet:vegan: {}
diet:vegetarian: {}
diet:pescetarian: {}
@ -230,6 +232,3 @@ filter:
diet:lactose_free: {}
diet:halal: {}
diet:kosher: {}
valueName: |
{{ keyTrans(value) }}
op: has_key_value
Loading…
Cancel
Save