Skip to content

Commit

Permalink
Garante que seja apresentado o doi original caso não exista o doi com…
Browse files Browse the repository at this point in the history
… idioma.
  • Loading branch information
gitnnolabs committed Mar 28, 2022
1 parent eb2dc96 commit 61017bd
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 61017bd

Please sign in to comment.