From f49aaa16bc1cda7d49153c0859a046ae1481c72e Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 4 Jun 2020 13:42:36 -0700 Subject: iterate on tag label display --- fatcat_scholar/templates/search_macros.html | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'fatcat_scholar') diff --git a/fatcat_scholar/templates/search_macros.html b/fatcat_scholar/templates/search_macros.html index abdb6d3..c6e6d16 100644 --- a/fatcat_scholar/templates/search_macros.html +++ b/fatcat_scholar/templates/search_macros.html @@ -1,4 +1,18 @@ +{% macro tag_label(tag) -%} + {% if tag == "oa" %} + OA + {% elif tag == "scielo" %} + SciELO + {% elif tag == "road" %} + ROAD + {% elif tag == "doaj" %} + DOAJ + {% else %} + {{ _(tag) }} + {% endif %} +{% endmacro %} + {% macro fulltext_search_result_row(paper) -%}
@@ -65,9 +79,6 @@ {# ### JOURNAL ROW #} {% if paper.biblio.release_year %} {{ paper.biblio.release_year }} - {% endif %} - {% if paper.biblio.release_year and paper.biblio.container_name %} - {% endif %} {% if paper.biblio.container_name %} @@ -143,7 +154,7 @@ {% endif %} {% for tag in paper.tags %} - {{ _(tag) }} + {{ tag_label(tag) }} {% endfor %}
-- cgit v1.2.3