mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-03 21:37:49 -05:00
conditional header/no amount render
This commit is contained in:
@@ -126,7 +126,7 @@
|
||||
<table class="table table-sm">
|
||||
{% for s in recipe.steps.all %}
|
||||
{% for i in s.ingredients.all %}
|
||||
{% if i.unit.name == 'Special:Header' %}
|
||||
{% if i.is_header %}
|
||||
<tr>
|
||||
<td style="padding-top: 8px!important; ">
|
||||
<b>{{ i.note }}</b>
|
||||
@@ -143,11 +143,11 @@
|
||||
<input type="checkbox"/>
|
||||
<div class="state p-success">
|
||||
<label>
|
||||
{% if i.amount != 0 %}
|
||||
{% if i.no_amount %}
|
||||
<span>⁣</span>
|
||||
{% else %}
|
||||
<span id="ing_{{ i.pk }}">{{ i.amount.normalize }}</span>
|
||||
{{ i.unit }}
|
||||
{% else %}
|
||||
<span>⁣</span>
|
||||
{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user