Allow mealplan items to have no recipes

And display first line of notes in plan
This commit is contained in:
tourn
2020-04-13 19:56:00 +02:00
parent 83b5b6695c
commit 08cccfa133
3 changed files with 30 additions and 2 deletions

View File

@@ -76,7 +76,10 @@
<a class="mealplan-add-button" href="{% url 'new_meal_plan' %}?date={{ day_key|date:'Y-m-d' }}&meal={{ plan_key }}"><i class="fas fa-plus"></i></a>
{% for mp in days_value %}
<a href="{% url 'edit_meal_plan' mp.pk %}"><i class="fas fa-edit"></i></a>
<a href="{% url 'view_recipe' mp.recipe.id %}">{{ mp.recipe.name }}</a><br/>
{% if mp.recipe %}
<a href="{% url 'view_recipe' mp.recipe.id %}">{{ mp.recipe.name }}</a><br/>
{% endif %}
<span>{{ mp.note_head }}</span>
{% endfor %}
</td>
{% endfor %}