{% load mardmo_tags %}
{# A publication as the export writes it: DOI, citation, what is new on the MaRDI Portal, authors and journal #}
{% for reference in values.reference.values %}
{% if reference.0 == option.DOI %}
DOI: {{ reference.1 }}{% with problem=reference.1|doi_problem %}{% if problem %} {{ problem|upper }}{% endif %}{% endwith %}
{% endif %}
{% empty %}
{% if 'not found' in values.ID %}
MISSING PUBLICATION DOI
{% endif %}
{% endfor %}
{% publication_info values as pub %}
{% if pub.citation %}
Citation: {{ pub.citation }}
{% endif %}
{% if pub.on_portal %}
MaRDI Portal: already there, nothing is added to it
{% elif pub.new %}
New on the MaRDI Portal: {{ pub.new|join:", " }}{% if pub.name_only %} ({{ pub.name_only }} author{{ pub.name_only|pluralize }} as name only){% endif %}
{% endif %}
{% if pub.authors or pub.journal %}
Authors and journal
{% for author in pub.authors %}
- {{ author.name }} —
{% if author.status == 'portal' %}MaRDI Portal {{ author.qid }}{% elif author.status == 'new' %}new{% else %}name only{% endif %}{% if author.orcid %}, ORCID {{ author.orcid }}{% endif %}{% if author.zbmath %}, zbMATH {{ author.zbmath }}{% endif %}{% if author.wikidata %}, Wikidata {{ author.wikidata }}{% endif %}
{% endfor %}
{% if pub.journal %}
- Journal: {{ pub.journal.name }} —
{% if pub.journal.status == 'portal' %}MaRDI Portal {{ pub.journal.qid }}{% else %}new{% endif %}{% if pub.journal.issn %}, ISSN {{ pub.journal.issn }}{% endif %}{% if pub.journal.wikidata %}, Wikidata {{ pub.journal.wikidata }}{% endif %}
{% endif %}
{% if pub.language %}
- Language: {{ pub.language }}
{% endif %}
{% endif %}