webseite/templates/zutaten/zutaten.html

226 lines
13 KiB
HTML
Raw Normal View History

2021-07-31 18:48:28 +02:00
{%- for prt in child.servings.blocks -%}
{{- '\n ' -}}
<h2>Portionsgröße: Für {{ prt.serving_number | default('1') }}
{{- ' ' -}}
{%- if prt.serving_units is defined and prt.serving_units != "" -%}
{{- prt.serving_units -}}
{%- else -%}
Stück
{%- endif -%}
</h2>
{%- set prt_loop = loop.index -%}
{%- if child.ingredients is defined and child.ingredients != "" %}
{%- if child.ingredients.blocks != [] -%}
{{- '\n ' -}} <ul>
{%- for ing in child.ingredients.blocks %}
{%- 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 -%}
{{- '\n ' -}} </ul>
{%- else -%}
{{- '\n ' -}} <ul>
{{- '\n ' -}} <span>Keine Zutaten definiert</span>
{{- '\n ' -}} </ul>
{%- endif -%}
{%- else -%}
{{- '\n ' -}} <ul>
{{- '\n ' -}} <span>Keine Zutaten definiert</span>
{{- '\n ' -}} </ul>
{%- endif -%}
{%- if child.ingredients is defined and child.ingredients != "" %}
{%- if child.ingredients.blocks != [] -%}
{{- '\n ' -}} <ul>
{%- for ing1 in child.ingredients.blocks %}
{%- if ing1.ingredient is defined and ing1.ingredient != "" -%}
{%- if ing1.amounts is defined and ing1.amounts != "" and ing1.amounts.blocks is defined and ing1.amounts.blocks != "" -%}
{%- if ing1.amounts.blocks != [] -%}
{%- set ingredient_counter = loop.index -%}
{%- for amt in ing1.amounts.blocks -%}
{%- if loop.index == prt_loop -%}
{%- if amt.amount is defined and amt.amount != "" and amt.amount != 0 and amt.amount != '0' -%}
{%- if ing1.processing is defined and ing1.processing != "" and ing1.processing.blocks is defined and ing1.processing.blocks != "" -%}
{%- if ing1.processing.blocks != [] -%}
{{- '\n ' -}} <li>
{{- '\n ' -}}
<span id="processing_{{- ingredient_counter | string -}}" class="processing">Verarbeitungshinweis
{%- for tmp_prc in ing1.processing.blocks -%}
{%- if loop.index == 2 -%}
{{- 'e' -}}
{%- endif -%}
{%- endfor -%}
{{- ' #' -}}
{{- ingredient_counter | string -}}:</span>
{{- '\n ' -}}
<ul>
{%- for prc in ing1.processing.blocks -%}
{{- '\n ' -}} <li>
{{- '\n ' -}}
<span class="ingredientprocessing">{{ prc.process }}</span>
{{- '\n ' -}} </li>
{%- endfor -%}
{{- '\n ' -}} </ul>
{{- '\n ' -}} </li>
{{- '\n ' -}} </ul>
{%- endif -%}
{%- endif -%}
{%- if ing1.notes is defined and ing1.notes != "" and ing1.notes.blocks is defined and ing1.notes.blocks != "" -%}
{%- if ing1.notes.blocks != [] -%}
{{- '\n ' -}} <ul>
{{- '\n ' -}} <li>
{{- '\n ' -}}
<span id="note_{{- ingredient_counter | string -}}" class="ingredientnotes">Notiz
{%- for tmp_nde in ing1.notes.blocks -%}
{%- if loop.index == 2 -%}
{{- 'en' -}}
{%- endif -%}
{%- endfor -%}
{{- ' #' -}} {{- ingredient_counter | string -}}:</span>
{{- '\n ' -}}
<ul>
{%- for nde in ing1.notes.blocks -%}
{{- '\n ' -}} <li>
{{- '\n ' -}}
<span class="ingredientnotes">{{ nde.note }}</span>
{{- '\n ' -}} </li>
{%- endfor -%}
{{- '\n ' -}} </ul>
{{- '\n ' -}} </li>
{{- '\n ' -}} </ul>
{%- endif -%}
{%- endif -%}
{{- '\n ' -}} </li>
{%- endif -%}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- endif -%}
{%- endif -%}
{%- endfor -%}
{{- '\n ' -}} </ul>
{%- else -%}
{{- '\n ' -}} <ul>
{{- '\n ' -}} <span>Keine Zutaten definiert</span>
{{- '\n ' -}} </ul>
{%- endif -%}
{%- else -%}
{{- '\n ' -}} <ul>
{{- '\n ' -}} <span>Keine Zutaten definiert</span>
{{- '\n ' -}} </ul>
{%- endif -%}
{%- endfor -%}