diff options
-rw-r--r-- | fatcat_scholar/templates/search.html | 2 | ||||
-rw-r--r-- | fatcat_scholar/templates/search_macros.html | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/fatcat_scholar/templates/search.html b/fatcat_scholar/templates/search.html index 0216f87..b4e6098 100644 --- a/fatcat_scholar/templates/search.html +++ b/fatcat_scholar/templates/search.html @@ -87,7 +87,7 @@ {# search results (rendered via macro) #} {% for paper in hits.results %} - {{ search_macros.fulltext_search_result_row(paper) }} + {{ search_macros.fulltext_search_result_row(paper, locale=locale) }} {% endfor %} {% if hits.count_found > hits.limit %} diff --git a/fatcat_scholar/templates/search_macros.html b/fatcat_scholar/templates/search_macros.html index 6d7814c..ca8ef4d 100644 --- a/fatcat_scholar/templates/search_macros.html +++ b/fatcat_scholar/templates/search_macros.html @@ -15,12 +15,14 @@ <span class="ui label basic orange small" title="Szcezepanski OA Journal List">Szczepanski</span> {% elif tag == "doaj" %} <span class="ui label basic orange small" title="Directory of Open Access Journals">DOAJ</span> + {% elif tag.startswith("lang:") %} + <span class="ui label basic black small" title="ISO Language Code">{{ tag }}</span> {% else %} <span class="ui label small">{{ _(tag) }}</span> {% endif %} {% endmacro %} -{% macro fulltext_search_result_row(paper) -%} +{% macro fulltext_search_result_row(paper, locale=None) -%} <div class="ui grid"> <div class="thirteen wide column"> {# ### TITLE ROW #} @@ -152,6 +154,9 @@ {% for tag in paper.tags %} {{ tag_label(tag) }} {% endfor %} + {% if paper.biblio.lang_code and paper.biblio.lang_code != (locale or 'en') %} + {{ tag_label("lang:" + paper.biblio.lang_code) }} + {% endif %} </div> {# ### COLLAPSED HITS #} |