Backup #98
| ID | 98 |
| Dateipfad | /var/www/dev.campus.systemische-tools.de/src/View/content/show.php |
| Version | 3 |
| Typ |
modified |
| Größe | 6.4 KB |
| Hash | b5167ba68a7be2565dd997b13b0135c88ff8908eb656e5f4cc79a99c547d29a5 |
| Datum | 2025-12-20 19:17:49 |
| Geändert von | claude-code-hook |
| Grund | Claude Code Pre-Hook Backup vor Edit-Operation |
| Datei existiert |
Ja
|
Dateiinhalt
<?php ob_start(); ?>
<nav class="breadcrumb">
<a href="/content">Content Studio</a> » Auftrag #<?= $order['id'] ?>
</nav>
<h1><?= htmlspecialchars($order['title']) ?></h1>
<table>
<tr><th>ID</th><td><?= $order['id'] ?></td></tr>
<tr><th>Status</th><td><span class="badge badge--<?= $order['status'] ?>"><?= $order['status'] ?></span></td></tr>
<tr><th>Profil</th><td><?= htmlspecialchars($order['profile_name'] ?? '-') ?></td></tr>
<tr><th>Contract</th><td><?= htmlspecialchars($order['contract_name'] ?? '-') ?></td></tr>
<tr><th>Struktur</th><td><?= htmlspecialchars($order['structure_name'] ?? '-') ?></td></tr>
<tr><th>Erstellt</th><td><?= $order['created_at'] ?></td></tr>
</table>
<h2>Briefing</h2>
<p><?= nl2br(htmlspecialchars($order['briefing'])) ?></p>
<h2>Aktionen</h2>
<div class="action-bar">
<a href="/content/<?= $order['id'] ?>/edit" class="btn">Bearbeiten</a>
<?php if (!$latestVersion): ?>
<form method="POST" action="/content/<?= $order['id'] ?>/generate" class="inline-form"
hx-post="/content/<?= $order['id'] ?>/generate"
hx-target="#content-result"
hx-swap="innerHTML">
<?= $csrfField ?>
<select name="model" class="form-select--inline">
<option value="claude-opus-4-5-20251101">Claude Opus</option>
<option value="claude-sonnet-4-20250514">Claude Sonnet</option>
<option value="ollama:gemma3:4b-it-qat">Ollama</option>
</select>
<select name="collection" class="form-select--inline">
<option value="documents">Documents</option>
<option value="entities">Entities</option>
</select>
<select name="context_limit" class="form-select--inline">
<option value="5">5 Quellen</option>
<option value="3">3 Quellen</option>
<option value="10">10 Quellen</option>
</select>
<button type="submit" class="btn btn--primary">Generieren</button>
</form>
<?php endif; ?>
<?php if ($latestVersion): ?>
<form method="POST" action="/content/<?= $order['id'] ?>/critique" class="inline-form"
hx-post="/content/<?= $order['id'] ?>/critique"
hx-target="#critique-result"
hx-swap="innerHTML">
<?= $csrfField ?>
<select name="model" class="form-select--inline">
<option value="claude-opus-4-5-20251101">Claude Opus</option>
<option value="claude-sonnet-4-20250514">Claude Sonnet</option>
<option value="ollama:gemma3:4b-it-qat">Ollama</option>
</select>
<button type="submit" class="btn btn--light">Kritik-Runde</button>
</form>
<form method="POST" action="/content/<?= $order['id'] ?>/revise" class="inline-form"
hx-post="/content/<?= $order['id'] ?>/revise"
hx-target="#content-result"
hx-swap="innerHTML">
<select name="model" class="form-select--inline">
<option value="claude-opus-4-5-20251101">Claude Opus</option>
<option value="claude-sonnet-4-20250514">Claude Sonnet</option>
<option value="ollama:gemma3:4b-it-qat">Ollama</option>
</select>
<button type="submit" class="btn btn--light">Revision</button>
</form>
<?php if (in_array($order['status'], ['validate', 'critique', 'revision'])): ?>
<button class="btn btn--success" hx-post="/content/<?= $order['id'] ?>/approve" hx-swap="none" hx-on::after-request="location.reload()">Genehmigen</button>
<button class="btn btn--danger" hx-post="/content/<?= $order['id'] ?>/decline" hx-swap="none" hx-on::after-request="location.reload()">Ablehnen</button>
<?php endif; ?>
<?php endif; ?>
</div>
<div id="content-result"></div>
<div id="critique-result"></div>
<?php if ($latestVersion):
$contentData = json_decode($latestVersion['content'], true);
$contentText = is_array($contentData) ? ($contentData['text'] ?? '') : $latestVersion['content'];
?>
<h2>Content (Version <?= $latestVersion['version_number'] ?>)</h2>
<div class="result-box">
<div class="result-box__header">
<strong>Version <?= $latestVersion['version_number'] ?></strong>
<span><?= date('d.m.Y H:i', strtotime($latestVersion['created_at'])) ?></span>
</div>
<div class="result-box__content">
<pre><?= htmlspecialchars($contentText) ?></pre>
</div>
</div>
<?php endif; ?>
<?php if (!empty($critiques)): ?>
<h2>Kritiken</h2>
<table data-sortable>
<thead>
<tr>
<th data-sort="round">Runde</th>
<th data-sort="critic">Kritiker</th>
<th data-sort="rating">Bewertung</th>
<th data-sort="status">Status</th>
<th data-sort="summary">Zusammenfassung</th>
</tr>
</thead>
<tbody>
<?php foreach ($critiques as $c): ?>
<tr>
<td><?= $c['round'] ?? '-' ?></td>
<td><?= htmlspecialchars($c['critic_name'] ?? '-') ?></td>
<td><?= $c['rating'] ?? '-' ?>/10</td>
<td><span class="badge badge--<?= ($c['passed'] ?? false) ? 'completed' : 'failed' ?>"><?= ($c['passed'] ?? false) ? 'Bestanden' : 'Offen' ?></span></td>
<td><?= htmlspecialchars($c['summary'] ?? '-') ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<?php if (!empty($sources)): ?>
<h2>Quellen (RAG)</h2>
<table data-sortable>
<thead>
<tr>
<th data-sort="document">Dokument</th>
<th data-sort="score">Relevanz</th>
</tr>
</thead>
<tbody>
<?php foreach ($sources as $s): ?>
<tr>
<td><?= htmlspecialchars($s['document_name'] ?? 'Unbekannt') ?></td>
<td><?= round(($s['relevance_score'] ?? 0) * 100) ?>%</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<?php if (count($versions) > 1): ?>
<h2>Versionshistorie</h2>
<table data-sortable>
<thead>
<tr>
<th data-sort="version">Version</th>
<th data-sort="created">Erstellt</th>
</tr>
</thead>
<tbody>
<?php foreach ($versions as $v): ?>
<tr>
<td>V<?= $v['version_number'] ?></td>
<td><?= date('d.m.Y H:i', strtotime($v['created_at'])) ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<p style="margin-top: 2rem;"><a href="/content">← Zurück zur Übersicht</a></p>
<?php $content = ob_get_clean(); ?>
<?php require VIEW_PATH . '/layout.php'; ?>
Vollständig herunterladen
Aktionen
Andere Versionen dieser Datei
| ID |
Version |
Typ |
Größe |
Datum |
| 99 |
4 |
modified |
6.4 KB |
2025-12-20 19:18 |
| 98 |
3 |
modified |
6.4 KB |
2025-12-20 19:17 |
| 97 |
2 |
modified |
6.4 KB |
2025-12-20 19:17 |
| 96 |
1 |
modified |
6.4 KB |
2025-12-20 19:17 |
← Zurück zur Übersicht