works can now be published_in or published_as

This commit is contained in:
eclipse 2025-03-15 14:27:29 +01:00
parent 71e8290525
commit 2c9eecacb2
3 changed files with 50 additions and 42 deletions

View File

@ -6,7 +6,7 @@ stats:
series: Potsdams Andere Welten
issue: 1
editor: Tobias Radloff
published_in:
published_as:
- title: Veranstaltungsausgabe
publisher: Selbstverlag
isbn: 978-3-00-077853-7

View File

@ -6,7 +6,7 @@ stats:
series: Potsdams Andere Welten
issue: 2
editor: Tobias Radloff
published_in:
published_as:
- title: Veranstaltungsausgabe
publisher: Selbstverlag
link: https://www.potsdams-andere-welten.de

View File

@ -27,72 +27,80 @@
<div>
<h2>Details</h2>
<ul class="article-stats">
{% if article.stats %}
{% if article.stats %}
{# {% if article.date %}
<li>Erstveröffentlichung: {{ article.date.strftime("%d.%m.%Y") }}</li>
{% endif %} #}
{% if article.stats.series %}
{% if article.stats.series %}
<li>aus der Reihe "{{ article.stats.series }}"</li>
{% endif %}
{% if article.stats.issue %}
{% endif %}
{% if article.stats.issue %}
<li>Ausgabe {{ article.stats.issue }}</li>
{% endif %}
{% if article.stats.editor %}
{% endif %}
{% if article.stats.editor %}
<li>herausgegeben von {{ article.stats.editor }}</li>
{% endif %}
{% endif %}
{% if article.stats.published_in or article.stats.published_as %}
{% set ns = namespace() %}
{% if article.stats.published_in %}
{% for p in article.stats.published_in %}
{% if p.title %}
{# <li>Veröffentlicht in <strong>{% if p.link %}<a href="{{ p.link }}" target="_blank">{% endif %}{{ p.title }}{% if p.link %}</a>{% endif %}</strong> #}
<li>Veröffentlicht in <strong>{{ p.title }}</strong>
<ul>
{% set ns.stats = article.stats.published_in %}
{% set ns.title_line = "Veröffentlicht in" %}
{% else %}
{% set ns.stats = article.stats.published_as %}
{% set ns.title_line = "Verfügbar als" %}
{% endif %}
{% if p.date %}
{% for p in ns.stats %}
{% if p.title %}
{# <li>Veröffentlicht in <strong>{% if p.link %}<a href="{{ p.link }}" target="_blank">{% endif %}{{ p.title }}{% if p.link %}</a>{% endif %}</strong> #}
<li>{{ ns.title_line }} <strong>{{ p.title }}</strong>
<ul>
{% endif %}
{% if p.date %}
<li>am {{ p.date.strftime("%d.%m.%Y") }}</li>
{% endif %}
{% if p.issue %}
{% endif %}
{% if p.issue %}
<li>Ausgabe {{ p.issue }}</li>
{% endif %}
{% if p.publisher %}
{% endif %}
{% if p.publisher %}
<li>Verlag: {{ p.publisher }}</li>
{% endif %}
{% if p.series %}
{% endif %}
{% if p.series %}
<li>aus der Reihe "{{ p.series }}"</li>
{% endif %}
{% if p.editor %}
{% endif %}
{% if p.editor %}
<li>herausgegeben von {{ p.editor }}</li>
{% endif %}
{% if p.isbn %}
{% endif %}
{% if p.isbn %}
<li>ISBN: {{ p.isbn }}</li>
{% endif %}
{% if p.issn %}
{% endif %}
{% if p.issn %}
<li>ISSN: {{ p.issn }}</li>
{% endif %}
{% if p.read_it_full %}
{% endif %}
{% if p.read_it_full %}
<li><a href="{{ p.read_it_full }}">Volltext verfügbar</a></li>
{% endif %}
{% if p.read_it_partial %}
{% endif %}
{% if p.read_it_partial %}
<li><a href="{{ p.read_it_partial }}">Leseprobe verfügbar</a></li>
{% endif %}
{% if p.link and p.link_text %}
{% endif %}
{% if p.link and p.link_text %}
<li><a href="{{ p.link }}" target="_blank">{{ p.link_text }}</a></li>
{% endif %}
{% if p.title %}
{% endif %}
{% if p.title %}
</ul>
</li>
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
{% if article.tags %}
{% endif %}
{% endif %}
{% if article.tags %}
<li>Schlagworte:
<ul class="article-tags">
{% for t in article.tags %}
{% for t in article.tags %}
<li><a href="/tag/{{ t | lower | replace('- ', '-') | replace(' ', '-') }}/">{{ t }}</a></li>
{% endfor %}
{% endfor %}
</ul>
</li>
{% endif %}
{% endif %}
</ul>
</div>
{% endif %}