From 13ea2ecd7dedb8a4cb8460565e46166efa212910 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Wed, 18 Mar 2020 12:12:03 +0100 Subject: [PATCH] display ingredient note --- cookbook/templates/recipe_view.html | 61 +++++++++++++++++++---------- 1 file changed, 41 insertions(+), 20 deletions(-) diff --git a/cookbook/templates/recipe_view.html b/cookbook/templates/recipe_view.html index c004bfb2c..57e4163df 100644 --- a/cookbook/templates/recipe_view.html +++ b/cookbook/templates/recipe_view.html @@ -81,12 +81,12 @@ {% endif %} {% if recipe.working_time and recipe.working_time != 0 %} - {% trans 'Preparation time ca.' %} {{ recipe.working_time }} min + {% trans 'Preparation time ca.' %} {{ recipe.working_time }} min {% endif %} {% if recipe.waiting_time and recipe.waiting_time != 0 %} {% trans 'Waiting time ca.' %} {{ recipe.waiting_time }} min + class="badge badge-secondary"> {% trans 'Waiting time ca.' %} {{ recipe.waiting_time }} min {% endif %} {% if recipe.waiting_time and recipe.waiting_time != 0 or recipe.working_time and recipe.working_time != 0 %} @@ -96,7 +96,7 @@
{% if ingredients %} -
+
@@ -115,9 +115,9 @@

- +
{% for i in ingredients %} - + + @@ -273,7 +286,18 @@

-
{% trans 'Comments' %}
+
{% trans 'Comments' %}
+ {% for c in comments %} +
+
+ {{ c.updated_at }} {% trans 'by' %} {{ c.created_by.username }}
+ {{ c.text }} +
+
+
+ {% endfor %} +
@@ -288,17 +312,6 @@
- {% for c in comments %} -
-
- {{ c.updated_at }} {% trans 'by' %} {{ c.created_by.username }}
- {{ c.text }} -
-
-
- {% endfor %} - {% if recipe.storage %} {% include 'include/recipe_open_modal.html' %} {% endif %} @@ -333,6 +346,14 @@
@@ -136,9 +136,22 @@
{% if i.ingredient.recipe %} - {{ i.ingredient.name }} - {% else %} - {{ i.ingredient.name }} + + {% endif %} + {{ i.ingredient.name }} + {% if i.ingredient.recipe %} + + {% endif %} + + + {% if i.note %} + {% endif %}