166 lines
7 KiB
HTML
166 lines
7 KiB
HTML
<!doctype html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>{{ title }}</title>
|
|
<link rel="stylesheet" href="/admin/static/admin.css" />
|
|
</head>
|
|
<body>
|
|
<header class="topbar">
|
|
<div>
|
|
<h1>Artikel-Detail #{{ article.id }}</h1>
|
|
<p>Angemeldet als <strong>{{ user }}</strong></p>
|
|
</div>
|
|
<div class="row">
|
|
<a class="linkbtn" href="/admin/dashboard">Zurück</a>
|
|
<form method="post" action="/admin/logout">
|
|
<button type="submit" class="secondary">Logout</button>
|
|
</form>
|
|
</div>
|
|
</header>
|
|
|
|
<main class="container">
|
|
<section class="card">
|
|
<h2>{{ article.title }}</h2>
|
|
<p><strong>Status:</strong> <span class="badge">{{ article.status }}</span></p>
|
|
<p><strong>Artikel-Datum:</strong> {{ article.published_at or "-" }}</p>
|
|
<p><strong>Alter:</strong> {{ article.days_old if article.days_old is not none else "-" }} Tage</p>
|
|
<p><strong>Relevanz:</strong> {{ article.relevance }}</p>
|
|
<p><strong>Autor:</strong> {{ article.author or "-" }}</p>
|
|
<p><strong>Feed:</strong> {{ feed.name if feed else "-" }}</p>
|
|
<p><strong>Quelle Snapshot:</strong> {{ article.source_name_snapshot or "-" }}</p>
|
|
<p><strong>Lizenz Snapshot:</strong> {{ article.source_license_name_snapshot or "-" }}</p>
|
|
<p><strong>Terms Snapshot:</strong> {{ article.source_terms_url_snapshot or "-" }}</p>
|
|
<p><strong>Quelle:</strong> <a href="{{ article.source_url }}" target="_blank" rel="noopener">{{ article.source_url }}</a></p>
|
|
{% if article.canonical_url %}
|
|
<p><strong>Canonical:</strong> <a href="{{ article.canonical_url }}" target="_blank" rel="noopener">{{ article.canonical_url }}</a></p>
|
|
{% endif %}
|
|
{% if article.summary %}
|
|
<p><strong>Summary:</strong> {{ article.summary }}</p>
|
|
{% endif %}
|
|
</section>
|
|
|
|
<section class="card">
|
|
<h2>Rechts-Checkliste</h2>
|
|
<table>
|
|
<thead>
|
|
<tr><th>Kriterium</th><th>Status</th><th>Wert</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for c in checklist %}
|
|
<tr>
|
|
<td>{{ c.label }}</td>
|
|
<td>
|
|
{% if c.status == "ok" %}
|
|
<span class="badge ok">OK</span>
|
|
{% else %}
|
|
<span class="badge bad">Fehlt</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>{{ c.value }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
|
|
<section class="card">
|
|
<h2>Extrahierte Daten</h2>
|
|
<p><strong>Bilder:</strong> {{ article.image_entries|length if article.image_entries else 0 }}</p>
|
|
{% if article.selected_image_url %}
|
|
<p><strong>Ausgewähltes Hauptbild:</strong> <a href="{{ article.selected_image_url }}" target="_blank" rel="noopener">{{ article.selected_image_url }}</a></p>
|
|
{% if article.selected_image_proxy_url %}
|
|
<img src="{{ article.selected_image_proxy_url }}" alt="Ausgewähltes Hauptbild" class="thumb" loading="lazy" />
|
|
{% endif %}
|
|
{% endif %}
|
|
{% if article.image_entries %}
|
|
<div class="image-grid">
|
|
{% for image in article.image_entries %}
|
|
<article class="image-card {{ 'image-selected' if image.is_selected else '' }} {{ 'image-excluded' if image.is_excluded else '' }}">
|
|
<a href="{{ image.url }}" target="_blank" rel="noopener">
|
|
<img src="{{ image.proxy_url }}" alt="Artikelbild" loading="lazy" />
|
|
</a>
|
|
<div class="image-meta">
|
|
{% if image.is_selected %}<span class="badge ok">Ausgewählt</span>{% endif %}
|
|
{% if image.is_excluded %}<span class="badge bad">Ausgeblendet</span>{% endif %}
|
|
{% if image.is_irrelevant_hint %}<span class="badge">evtl. irrelevant</span>{% endif %}
|
|
</div>
|
|
<div class="image-actions">
|
|
<form method="post" action="/admin/articles/{{ article.id }}/images/decision">
|
|
<input type="hidden" name="image_url" value="{{ image.url }}" />
|
|
<input type="hidden" name="action" value="select" />
|
|
<button type="submit">Als Hauptbild</button>
|
|
</form>
|
|
{% if not image.is_excluded %}
|
|
<form method="post" action="/admin/articles/{{ article.id }}/images/decision">
|
|
<input type="hidden" name="image_url" value="{{ image.url }}" />
|
|
<input type="hidden" name="action" value="exclude" />
|
|
<button type="submit" class="secondary">Ausblenden</button>
|
|
</form>
|
|
{% else %}
|
|
<form method="post" action="/admin/articles/{{ article.id }}/images/decision">
|
|
<input type="hidden" name="image_url" value="{{ image.url }}" />
|
|
<input type="hidden" name="action" value="restore" />
|
|
<button type="submit" class="secondary">Einblenden</button>
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
<div class="subtle"><a href="{{ image.url }}" target="_blank" rel="noopener">{{ image.url }}</a></div>
|
|
</article>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
{% if article.press_contact or article.extraction.press_contact %}
|
|
<p><strong>Pressekontakt</strong></p>
|
|
<div class="pre">{{ article.press_contact or article.extraction.press_contact }}</div>
|
|
{% endif %}
|
|
{% if article.extraction.extraction_error %}
|
|
<p class="subtle">Extraktionsfehler: {{ article.extraction.extraction_error }}</p>
|
|
{% endif %}
|
|
</section>
|
|
|
|
<section class="card">
|
|
<h2>Volltext</h2>
|
|
<div class="pre">{{ article.content_raw or "-" }}</div>
|
|
</section>
|
|
|
|
<section class="card">
|
|
<h2>Rechtsfreigabe</h2>
|
|
<p><strong>Freigabe:</strong>
|
|
{% if article.legal_checked %}
|
|
<span class="badge ok">Freigegeben</span>
|
|
{% else %}
|
|
<span class="badge bad">Nicht freigegeben</span>
|
|
{% endif %}
|
|
</p>
|
|
<p><strong>Zeitpunkt:</strong> {{ article.legal_checked_at or "-" }}</p>
|
|
<p><strong>Notiz:</strong> {{ article.legal_note or "-" }}</p>
|
|
<form method="post" action="/admin/articles/{{ article.id }}/legal-review" class="row">
|
|
<select name="approved">
|
|
<option value="1">Freigeben</option>
|
|
<option value="0">Zurücksetzen</option>
|
|
</select>
|
|
<input name="note" placeholder="Rechtsnotiz" />
|
|
<button type="submit">Speichern</button>
|
|
</form>
|
|
</section>
|
|
|
|
<section class="card">
|
|
<h2>Status ändern</h2>
|
|
{% if not article.legal_checked %}
|
|
<p class="subtle">Hinweis: `published` ist erst nach manueller Rechtsfreigabe erlaubt.</p>
|
|
{% endif %}
|
|
<form method="post" action="/admin/articles/{{ article.id }}/transition" class="row">
|
|
<select name="target_status">
|
|
{% for s in allowed_transitions %}
|
|
<option value="{{ s }}">{{ s }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
<input name="note" placeholder="Notiz" />
|
|
<button type="submit" class="secondary">Setzen</button>
|
|
</form>
|
|
</section>
|
|
</main>
|
|
</body>
|
|
</html>
|