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 series: Potsdams Andere Welten
issue: 1 issue: 1
editor: Tobias Radloff editor: Tobias Radloff
published_in: published_as:
- title: Veranstaltungsausgabe - title: Veranstaltungsausgabe
publisher: Selbstverlag publisher: Selbstverlag
isbn: 978-3-00-077853-7 isbn: 978-3-00-077853-7

View File

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

View File

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