adds doi link and worldcat issn search link to paper list and detail view

This commit is contained in:
Michael Beck 2025-04-11 14:23:23 +02:00
parent 992d561aa7
commit e580a0d43d
2 changed files with 15 additions and 2 deletions

View File

@ -175,7 +175,7 @@
{% for paper in papers %}
<tr>
<td>
<a href="#" class="icon-link icon-link-hover" data-url="{{ url_for('papers.paper_detail', paper_id=paper.id) }}">
<a href="#" class="icon-link icon-link-hover paper-link" data-url="{{ url_for('papers.paper_detail', paper_id=paper.id) }}">
<svg xmlns="http://www.w3.org/2000/svg" class="bi" viewBox="0 0 16 16" aria-hidden="true">
<path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/>
<path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/>

View File

@ -4,7 +4,20 @@
</div>
<div class="modal-body">
{% for key, value in paper.__dict__.items() %}
{% if not key.startswith('_') and key != 'metadata' %}
{% if key == 'doi' %}
<p><strong>DOI:</strong> <a href="https://doi.org/{{ value }}" target="_blank">{{ value }}</a></p>
{% elif key == 'issn' %}
{% if ',' in value %}
<p><strong>ISSN:</strong>
{% for issn in value.split(',') %}
<a href="https://www.worldcat.org/search?q=issn:{{ issn.strip() }}" target="_blank">{{ issn.strip() }}</a>{% if not loop.last %}, {% endif %}
{% endfor %}
</p>
{% else %}
<p><strong>ISSN:</strong> <a href="https://www.worldcat.org/search?q=issn:{{ value }}" target="_blank">{{ value }}</a></p>
{% endif %}
{% endif %}
{% if not key.startswith('_') and key != 'metadata' and key != 'doi' and key != 'issn' %}
<p><strong>{{ key.replace('_', ' ').capitalize() }}:</strong> {{ value }}</p>
{% endif %}
{% endfor %}