From 9722f39e38a45d3201c836f0c2805ae9f6c1f581 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 3 Jun 2020 18:56:10 -0700 Subject: partially resolve HTML form/hidden weirdness --- fatcat_scholar/templates/search.html | 7 +++++++ fatcat_scholar/templates/search_macros.html | 9 ++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/fatcat_scholar/templates/search.html b/fatcat_scholar/templates/search.html index 9e2f06e..1f7a9b9 100644 --- a/fatcat_scholar/templates/search.html +++ b/fatcat_scholar/templates/search.html @@ -4,6 +4,12 @@ {% block fullmain %}
+ + {{ search_macros.query_hidden(query.time_options, query.filter_time) }} + {{ search_macros.query_hidden(query.type_options, query.filter_type) }} + {{ search_macros.query_hidden(query.availability_options, query.filter_availability) }} + {{ search_macros.query_hidden(query.sort_options, query.sort_order) }} +
{{ _("Filters") }}

@@ -106,5 +112,6 @@

{% endif %} + {% endblock %} diff --git a/fatcat_scholar/templates/search_macros.html b/fatcat_scholar/templates/search_macros.html index 1b1ada2..07a4510 100644 --- a/fatcat_scholar/templates/search_macros.html +++ b/fatcat_scholar/templates/search_macros.html @@ -198,9 +198,6 @@ {% macro query_option(options, selected) -%} {{ _(options.label) }}
{% endmacro %} + +{% macro query_hidden(options, selected) -%} +{% if selected %} + +{% endif %} +{% endmacro %} -- cgit v1.2.3