diff options
author | Bryan Newbold <bnewbold@archive.org> | 2020-06-04 13:42:36 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2020-06-04 13:42:36 -0700 |
commit | f49aaa16bc1cda7d49153c0859a046ae1481c72e (patch) | |
tree | 5c77e4733d2ca1bc2708d57494035991239bd57f /fatcat_scholar/templates/search_macros.html | |
parent | 449623af8792c75ea3f41268139aadf459656bb6 (diff) | |
download | fatcat-scholar-f49aaa16bc1cda7d49153c0859a046ae1481c72e.tar.gz fatcat-scholar-f49aaa16bc1cda7d49153c0859a046ae1481c72e.zip |
iterate on tag label display
Diffstat (limited to 'fatcat_scholar/templates/search_macros.html')
-rw-r--r-- | fatcat_scholar/templates/search_macros.html | 19 |
1 files changed, 15 insertions, 4 deletions
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" %} + <span class="ui label basic orange small" title="Open Access"><i class="ui icon unlock"></i>OA</span> + {% elif tag == "scielo" %} + <span class="ui label basic purple small" title="Hosted on SciELO platform">SciELO</span> + {% elif tag == "road" %} + <span class="ui label basic orange small" title="ISSN Registry of Open Access Journals">ROAD</span> + {% elif tag == "doaj" %} + <span class="ui label basic orange small" title="Directory of Open Access Journals">DOAJ</span> + {% else %} + <span class="ui label small">{{ _(tag) }}</span> + {% endif %} +{% endmacro %} + {% macro fulltext_search_result_row(paper) -%} <div class="ui grid"> <div class="thirteen wide column"> @@ -66,9 +80,6 @@ {% 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 %} <i> {% if paper.biblio.container_id %} @@ -143,7 +154,7 @@ {% endif %} {% for tag in paper.tags %} - <span class="ui label small">{{ _(tag) }}</span> + {{ tag_label(tag) }} {% endfor %} </div> |