feat(admin): add feed/source management, rewrite editor, reopen flow, and WP block output
This commit is contained in:
parent
50f737f434
commit
88b2ee1d01
9 changed files with 555 additions and 70 deletions
|
|
@ -164,6 +164,15 @@
|
|||
<div class="pre">{{ article.content_raw or "-" }}</div>
|
||||
</section>
|
||||
|
||||
<section class="card">
|
||||
<h2>Rewrite-Text (editierbar)</h2>
|
||||
<form method="post" action="/admin/articles/{{ article.id }}/rewrite-save" class="stack">
|
||||
<textarea name="content_rewritten" rows="14" style="width:100%;">{{ article.content_rewritten or "" }}</textarea>
|
||||
<button type="submit">Rewrite-Text speichern</button>
|
||||
</form>
|
||||
<p class="subtle">Dieser Text wird für den WordPress-Entwurf verwendet, falls vorhanden.</p>
|
||||
</section>
|
||||
|
||||
<section class="card">
|
||||
<h2>Rechtsfreigabe</h2>
|
||||
<p><strong>Freigabe:</strong>
|
||||
|
|
@ -192,6 +201,11 @@
|
|||
<button type="submit">Rewrite ausführen (OpenAI)</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% if article.status_ui == "published" %}
|
||||
<form method="post" action="/admin/articles/{{ article.id }}/reopen" class="row" style="margin-bottom:8px;">
|
||||
<button type="submit">Zurück in Rewrite-Workflow</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
<form method="post" action="/admin/articles/{{ article.id }}/transition" class="row">
|
||||
<select name="target_status">
|
||||
{% for s in allowed_transitions %}
|
||||
|
|
|
|||
|
|
@ -130,6 +130,99 @@
|
|||
</table>
|
||||
</section>
|
||||
|
||||
<section class="card">
|
||||
<h2>Quellen verwalten</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th>ID</th><th>Name</th><th>URLs</th><th>Meta</th><th>Aktionen</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for s in sources %}
|
||||
{% set source_form_id = 'source-update-' ~ s.id %}
|
||||
<tr>
|
||||
<td>#{{ s.id }}</td>
|
||||
<td>
|
||||
<input form="{{ source_form_id }}" name="name" value="{{ s.name }}" required />
|
||||
</td>
|
||||
<td>
|
||||
<input form="{{ source_form_id }}" name="base_url" value="{{ s.base_url or '' }}" placeholder="Base URL" />
|
||||
<input form="{{ source_form_id }}" name="terms_url" value="{{ s.terms_url or '' }}" placeholder="Terms URL" />
|
||||
<input form="{{ source_form_id }}" name="license_name" value="{{ s.license_name or '' }}" placeholder="Lizenz" />
|
||||
</td>
|
||||
<td>
|
||||
<select form="{{ source_form_id }}" name="risk_level">
|
||||
<option value="green" {% if s.risk_level == 'green' %}selected{% endif %}>green</option>
|
||||
<option value="yellow" {% if s.risk_level == 'yellow' %}selected{% endif %}>yellow</option>
|
||||
<option value="red" {% if s.risk_level == 'red' %}selected{% endif %}>red</option>
|
||||
</select>
|
||||
<select form="{{ source_form_id }}" name="is_enabled">
|
||||
<option value="1" {% if s.is_enabled %}selected{% endif %}>aktiv</option>
|
||||
<option value="0" {% if not s.is_enabled %}selected{% endif %}>inaktiv</option>
|
||||
</select>
|
||||
<input form="{{ source_form_id }}" name="last_reviewed_at" value="{{ s.last_reviewed_at or '' }}" placeholder="last_reviewed_at" />
|
||||
<input form="{{ source_form_id }}" name="notes" value="{{ s.notes or '' }}" placeholder="Notiz" />
|
||||
</td>
|
||||
<td>
|
||||
<div class="inline">
|
||||
<form method="post" action="/admin/sources/{{ s.id }}/update" id="{{ source_form_id }}" class="inline">
|
||||
<button type="submit" class="secondary">Speichern</button>
|
||||
</form>
|
||||
<form method="post" action="/admin/sources/{{ s.id }}/delete" class="inline" onsubmit="return confirm('Quelle wirklich löschen?');">
|
||||
<button type="submit">Löschen</button>
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<section class="card">
|
||||
<h2>Feeds verwalten</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th>ID</th><th>Name</th><th>URL</th><th>Quelle</th><th>Status</th><th>Aktionen</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for f in feeds %}
|
||||
{% set feed_form_id = 'feed-update-' ~ f.id %}
|
||||
<tr>
|
||||
<td>#{{ f.id }}</td>
|
||||
<td>
|
||||
<input form="{{ feed_form_id }}" name="name" value="{{ f.name }}" required />
|
||||
</td>
|
||||
<td><input form="{{ feed_form_id }}" name="url" value="{{ f.url }}" required /></td>
|
||||
<td>
|
||||
<select form="{{ feed_form_id }}" name="source_id">
|
||||
<option value="">-- keine --</option>
|
||||
{% for s in sources %}
|
||||
<option value="{{ s.id }}" {% if f.source_id == s.id %}selected{% endif %}>{{ s.name }} (#{{ s.id }})</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<select form="{{ feed_form_id }}" name="is_enabled">
|
||||
<option value="1" {% if f.is_enabled %}selected{% endif %}>aktiv</option>
|
||||
<option value="0" {% if not f.is_enabled %}selected{% endif %}>inaktiv</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<div class="inline">
|
||||
<form method="post" action="/admin/feeds/{{ f.id }}/update" id="{{ feed_form_id }}" class="inline">
|
||||
<button type="submit" class="secondary">Speichern</button>
|
||||
</form>
|
||||
<form method="post" action="/admin/feeds/{{ f.id }}/delete" class="inline" onsubmit="return confirm('Feed wirklich löschen?');">
|
||||
<button type="submit">Löschen</button>
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<section class="card">
|
||||
<h2>Artikel (Review)</h2>
|
||||
<form method="get" action="/admin/dashboard" class="row filter-row">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue