Skip to content

Commit

Permalink
Merge pull request #2250 from gitnnolabs/fix_doi_article_page
Browse files Browse the repository at this point in the history
Garante que seja apresentado o DOI original caso não exista o DOI com idioma.
  • Loading branch information
gitnnolabs authored Mar 28, 2022
2 parents eb2dc96 + 61017bd commit 527277a
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions opac/webapp/templates/macros/article.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
{# Retorna o número do fascículo especial que deve ser exibido #}
{% macro get_doi_by_lang(article, article_lang) -%}
{%- if article_lang -%}
{%- for doi in article.doi_with_lang %}
{%- if doi.language == article_lang -%}
{{ doi.doi }}
{%- endif -%}
{% endfor %}
{%- if article.doi_with_lang -%}
{%- if article_lang -%}
{%- for doi in article.doi_with_lang %}
{%- if doi.language == article_lang -%}
{{ doi.doi }}
{%- endif -%}
{% endfor %}
{%- endif -%}
{%- else -%}
{{ article.doi }}
{%- endif -%}
{%- endmacro %}

Expand Down

0 comments on commit 527277a

Please sign in to comment.