From 79679c105a48abba5188e701dd548cc5c3b7265b Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Sun, 8 Dec 2019 16:12:55 +0100 Subject: [PATCH] refactor search ui --- .idea/jsLibraryMappings.xml | 2 +- cookbook/templates/base.html | 17 +++++++++-- cookbook/templates/index.html | 56 ++++++++++++++++++++++------------- 3 files changed, 52 insertions(+), 23 deletions(-) diff --git a/.idea/jsLibraryMappings.xml b/.idea/jsLibraryMappings.xml index e5cbec694..e27c444b4 100644 --- a/.idea/jsLibraryMappings.xml +++ b/.idea/jsLibraryMappings.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/cookbook/templates/base.html b/cookbook/templates/base.html index 5596777db..008940d8c 100644 --- a/cookbook/templates/base.html +++ b/cookbook/templates/base.html @@ -8,6 +8,7 @@ + - - + + + + + + + + + + diff --git a/cookbook/templates/index.html b/cookbook/templates/index.html index 0b8711914..c358a8af0 100644 --- a/cookbook/templates/index.html +++ b/cookbook/templates/index.html @@ -11,29 +11,45 @@ {% endblock %} {% block content %} -
-
- {% if filter %} -
-
- {% trans "Search" %} -
-
-
- {{ filter.form|crispy }} - - {% trans 'Reset' %} - {% trans 'New' %} - {% trans 'Random' %} -
+ {% if filter %} +
+ {% csrf_token %} + {{ form.non_field_errors }} +
+
+
+ +
+ + + +
+
+ +
+
+ + + +
+ - {% endif %} -
-
- +
+ + {% endif %}
{% if user.is_authenticated and recipes %}