show.php
- Pfad:
src/View/config/show.php - Namespace: -
- Zeilen: 161 | Größe: 4,600 Bytes
- Geändert: 2025-12-27 14:05:17 | Gescannt: 2025-12-31 10:22:15
Code Hygiene Score: 100
- Dependencies: 100 (25%)
- LOC: 100 (20%)
- Methods: 100 (20%)
- Secrets: 100 (15%)
- Classes: 100 (10%)
- Magic Numbers: 100 (10%)
Keine Issues gefunden.
Versionen 2
-
v2
2025-12-27 14:05 | claude-code-hook | modified
Claude Code Pre-Hook Backup vor Edit-Operation -
v1
2025-12-21 02:31 | claude-code-hook | modified
Claude Code Pre-Hook Backup vor Edit-Operation
Code
<?php ob_start(); ?>
<h1><?= htmlspecialchars($config['name']) ?></h1>
<div class="page-actions">
<a href="/config/<?= $config['id'] ?>/edit" class="btn btn--primary">Bearbeiten</a>
<a href="/config" class="btn btn--secondary">Zurück zur Liste</a>
</div>
<div class="detail-grid">
<div class="detail-card">
<h3>Details</h3>
<dl class="detail-list">
<dt>ID</dt>
<dd><?= $config['id'] ?></dd>
<dt>Typ</dt>
<dd><span class="badge badge--type-<?= $config['type'] ?>"><?= $typeLabels[$config['type']] ?? $config['type'] ?></span></dd>
<dt>Slug</dt>
<dd><code><?= htmlspecialchars($config['slug']) ?></code></dd>
<dt>Version</dt>
<dd><?= htmlspecialchars($config['version']) ?></dd>
<dt>Status</dt>
<dd><span class="badge badge--<?= $config['status'] ?>"><?= $config['status'] ?></span></dd>
<?php if ($config['parent_id']): ?>
<dt>Parent</dt>
<dd><a href="/config/<?= $config['parent_id'] ?>"><?= htmlspecialchars($config['parent_name']) ?></a></dd>
<?php endif; ?>
<?php if ($config['description']): ?>
<dt>Beschreibung</dt>
<dd><?= htmlspecialchars($config['description']) ?></dd>
<?php endif; ?>
<dt>Erstellt</dt>
<dd><?= $config['created_at'] ?></dd>
<dt>Aktualisiert</dt>
<dd><?= $config['updated_at'] ?></dd>
</dl>
</div>
<div class="detail-card detail-card--wide">
<h3>Content (JSON)</h3>
<pre class="code-block"><code><?= htmlspecialchars(json_encode(json_decode($config['content']), JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)) ?></code></pre>
</div>
</div>
<?php if (!empty($children)): ?>
<h2>Verknüpfte Einträge (<?= count($children) ?>)</h2>
<table>
<thead>
<tr>
<th>ID</th>
<th>Typ</th>
<th>Name</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<?php foreach ($children as $child): ?>
<tr>
<td><a href="/config/<?= $child['id'] ?>"><?= $child['id'] ?></a></td>
<td><span class="badge badge--type-<?= $child['type'] ?>"><?= $typeLabels[$child['type']] ?? $child['type'] ?></span></td>
<td><a href="/config/<?= $child['id'] ?>"><?= htmlspecialchars($child['name']) ?></a></td>
<td><span class="badge badge--<?= $child['status'] ?>"><?= $child['status'] ?></span></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<?php if (!empty($history)): ?>
<h2>Versions-Historie</h2>
<table>
<thead>
<tr>
<th>Version</th>
<th>Geändert von</th>
<th>Beschreibung</th>
<th>Datum</th>
</tr>
</thead>
<tbody>
<?php foreach ($history as $h): ?>
<tr>
<td><?= htmlspecialchars($h['version']) ?></td>
<td><?= htmlspecialchars($h['changed_by'] ?? '-') ?></td>
<td><?= htmlspecialchars($h['change_description'] ?? '-') ?></td>
<td><?= substr($h['created_at'], 0, 16) ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<style>
.detail-grid {
display: grid;
grid-template-columns: 1fr 2fr;
gap: var(--space-md);
margin: var(--space-md) 0;
}
.detail-card {
background: var(--color-bg);
border: 1px solid var(--color-border);
border-radius: 8px;
padding: var(--space-md);
}
.detail-card--wide {
grid-column: span 1;
}
.detail-list {
display: grid;
grid-template-columns: auto 1fr;
gap: var(--space-xs) var(--space-sm);
}
.detail-list dt {
color: var(--color-text-muted);
font-weight: 500;
}
.detail-list dd {
margin: 0;
}
.code-block {
background: var(--color-bg-muted);
border-radius: 4px;
padding: var(--space-sm);
overflow-x: auto;
font-size: 13px;
line-height: 1.5;
}
.badge--type-author_profile { background: #6366f1; color: white; }
.badge--type-structure { background: #0ea5e9; color: white; }
.badge--type-organization { background: #f59e0b; color: white; }
.badge--type-contract { background: #10b981; color: white; }
.badge--type-rule { background: #6b7280; color: white; }
.badge--type-system_prompt { background: #ec4899; color: white; }
@media (max-width: 768px) {
.detail-grid {
grid-template-columns: 1fr;
}
}
</style>
<?php $content = ob_get_clean(); ?>
<?php require VIEW_PATH . '/layout.php'; ?>