diff options
Diffstat (limited to 'fatcat_scholar/templates/search_macros.html')
-rw-r--r-- | fatcat_scholar/templates/search_macros.html | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/fatcat_scholar/templates/search_macros.html b/fatcat_scholar/templates/search_macros.html index f5c4d85..bb96b61 100644 --- a/fatcat_scholar/templates/search_macros.html +++ b/fatcat_scholar/templates/search_macros.html @@ -1,6 +1,5 @@ {% macro fulltext_search_result_row(paper) -%} -{% set lang_code = "en" %} <div class="ui grid"> <div class="thirteen wide column"> {# ### TITLE ROW #} @@ -175,3 +174,26 @@ </div> </div> {% endmacro %} + +{% macro query_option(options, selected) -%} +<span style="color: rgba(0,0,0,0.4);">{{ options.label }}</span> +<div class="ui link list" style="margin-top: 0.3em;"> + {% if selected %} + <input form="search_form" type="hidden" name="{{ options.slug }}" value="{{ selected }}"> + {% endif %} + {% for opt in options.list %} + <button class="text-button" form="search_form" type="submit" name="{{ options.slug }}" value="{{ opt.slug }}"> + {% if selected == opt.slug or (not selected and opt.slug == options.default) %} + <span style="font-weight: bold;"> + {% else %} + <span> + {% endif %} + {{ opt.label }} + </span> + </button> + <br> + </span> + {% endfor %} +</div> +<br> +{% endmacro %} |