webseite/templates/zutaten/zutat_menge.html

118 lines
8.1 KiB
HTML
Raw Normal View History

2021-07-31 21:13:24 +02:00
{%- if ing.ingredient is defined and ing.ingredient != "" -%}
{%- if ing.amounts is defined and ing.amounts != "" and ing.amounts.blocks is defined and ing.amounts.blocks != "" -%}
{%- if ing.amounts.blocks != [] -%}
{%- set ingredient_counter = loop.index -%}
{%- for amt in ing.amounts.blocks -%}
{%- if loop.index == prt_loop -%}
{%- if amt.amount is defined and amt.amount != "" and amt.amount != 0 and amt.amount != '0' -%}
{{- '\n ' -}} <li>
{{- '\n ' -}} <span
{%- if ing.usda_num is defined and ing.usda_num != "" -%}
{{- ' id=' -}}"usda_{{- ing.usda_num -}}"
{%- endif -%}
>{{ ing.ingredient }}: {{ amt.amount }} {{ amt.unit | default('each') }}</span>
{%- if ing.processing is defined and ing.processing != "" and ing.processing.blocks is defined and ing.processing.blocks != "" -%}
{%- if ing.processing.blocks != [] -%}
{{- ' | ' -}}
<a href="#processing_{{- ingredient_counter | string -}}"_ class="processing">Verarbeitungshinweis #{{- ingredient_counter | string -}}</a>
{%- endif -%}
{%- endif -%}
{%- if ing.notes is defined and ing.notes != "" and ing.notes.blocks is defined and ing.notes.blocks != "" -%}
{%- if ing.notes.blocks != [] -%}
{{- ' | ' -}}
<a href="#note_{{- ingredient_counter | string -}}" class="ingredientnotes">Notiz #{{- ingredient_counter | string -}}</a>
{{- '\n ' -}}
{%- endif -%}
{%- endif -%}
{%- if ing.substitutions is defined and ing.substitutions != "" -%}
{%- if ing.substitutions.blocks is defined and ing.substitutions.blocks != "" -%}
{%- if ing.substitutions.blocks != [] -%}
{{- '\n ' -}} <ul>
{{- '\n ' -}} <li>
{{- '\n ' -}} Ausweichmöglichkeit:
{{- '\n ' -}} <ul>
{%- for sst in ing.substitutions.blocks -%}
{%- if sst.amounts is defined and sst.amounts != "" and sst.amounts.blocks is defined and sst.amounts.blocks != "" -%}
{%- if sst.amounts.blocks != [] -%}
{%- for amt2 in sst.amounts.blocks -%}
{%- if loop.index == prt_loop -%}
{%- if amt2.amount is defined and amt2.amount != "" and amt2.amount != 0 and amt2.amount != '0' -%}
{{- '\n ' -}} <li>
{{- '\n ' -}} <span
{%- if sst.usda_num is defined and sst.usda_num != "" -%}
{{- ' id=' -}}"usda_{{- sst.usda_num -}}"
{%- endif -%}
>{{ sst.ingredient }}: {{ amt2.amount }} {{ amt2.unit | default('each') }}</span>
{%- if sst.processing is defined and sst.processing != "" and sst.processing.blocks is defined and sst.processing.blocks != "" -%}
{%- if sst.processing.blocks != [] -%}
{{- '\n ' -}} <ul>
{{- '\n ' -}} <li>
{{- '\n ' -}}
<span class="processing">Verarbeitungshinweis
{%- for tmp_prc2 in sst.processing.blocks -%}
{%- if loop.index == 2 -%}
{{- 'e' -}}
{%- endif -%}
{%- endfor -%}
:</span>
{{- '\n ' -}}
<ul>
{%- for prc2 in sst.processing.blocks -%}
{{- '\n ' -}} <li>
{{- '\n ' -}}
<span class="ingredientprocessing">{{ prc2.process }}</span>
{{- '\n ' -}} </li>
{%- endfor -%}
{{- '\n ' -}} </ul>
{{- '\n ' -}} </li>
{{- '\n ' -}} </ul>
{%- endif -%}
{%- endif -%}
{%- if sst.notes is defined and sst.notes != "" and sst.notes.blocks is defined and sst.notes.blocks != "" -%}
{%- if ing.notes.blocks != [] -%}
{{- '\n ' -}} <ul>
{{- '\n ' -}} <li>
{{- '\n ' -}}
<span class="ingredientnotes">Notiz
{%- for tmp_nde1 in sst.notes.blocks -%}
{%- if loop.index == 2 -%}
{{- 'en' -}}
{%- endif -%}
{%- endfor -%}
:</span>
{{- '\n ' -}}
<ul>
{%- for nde2 in sst.notes.blocks -%}
{{- '\n ' -}} <li>
{{- '\n ' -}}
<span class="ingredientnotes">{{ nde2.note }}</span>
{{- '\n ' -}} </li>
{%- endfor -%}
{{- '\n ' -}} </ul>
{{- '\n ' -}} </li>
{{- '\n ' -}} </ul>
{%- endif -%}
{%- endif -%}
{{- '\n ' -}} </li>
{%- endif -%}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- endif -%}
{%- endfor -%}
{{- '\n ' -}} </ul>
{{- '\n ' -}} </li>
{{- '\n ' -}} </ul>
{%- endif -%}
{%- endif -%}
{%- endif -%}
{{- '\n ' -}} </li>
{%- endif -%}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- endif -%}
{%- endif -%}
{%- endfor -%}