From de85a6b3347eec9ddd1429b4ed87c73d222899a7 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Sat, 2 May 2020 12:07:03 +0200 Subject: [PATCH] further search style improvements --- cookbook/tables.py | 2 +- cookbook/templates/recipes_table.html | 23 ++++++++++++++++------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/cookbook/tables.py b/cookbook/tables.py index 57ffa94fa..a23d3be2f 100644 --- a/cookbook/tables.py +++ b/cookbook/tables.py @@ -23,7 +23,7 @@ class RecipeTable(tables.Table): class Meta: model = Recipe template_name = 'recipes_table.html' - fields = ('id', 'name', 'all_tags', 'image', 'instructions', 'working_time', 'waiting_time') + fields = ('id', 'name', 'all_tags', 'image', 'instructions', 'working_time', 'waiting_time', 'internal') class KeywordTable(tables.Table): diff --git a/cookbook/templates/recipes_table.html b/cookbook/templates/recipes_table.html index 9f7f35357..61838540a 100644 --- a/cookbook/templates/recipes_table.html +++ b/cookbook/templates/recipes_table.html @@ -14,19 +14,24 @@
+ + {% if row.cells.image|length > 1 %} - {% trans 'Recipe Image' %} + {% trans 'Recipe Image' %} {% else %} - {% trans 'Recipe Image' %} + {% trans 'Recipe Image' %} + {% endif %} +
{{ row.cells.name }}
-

{{ row.cells.all_tags }} +

+ {{ row.cells.all_tags }}

{% if row.cells.working_time != 0 %} @@ -38,7 +43,11 @@ {% trans 'Waiting time ca.' %} {{ row.cells.waiting_time }} min - {% endif %} {{ row.cells.edit }}

+ {% endif %}{% if not row.record.internal %} + {% trans 'External' %} + {% endif %} + {{ row.cells.edit }} +