Backup #151

ID151
Dateipfad/var/www/dev.campus.systemische-tools.de/src/View/config/show.php
Version1
Typ modified
Größe4.8 KB
Hash7b409af0926de944fb3734b1d09728792e3e2def768d0a26a537bfdbf4b4261d
Datum2025-12-21 02:31:26
Geändert vonclaude-code-hook
GrundClaude Code Pre-Hook Backup vor Edit-Operation
Datei existiert Ja

Dateiinhalt

<?php ob_start(); ?>

<h1><?= htmlspecialchars($config['name']) ?></h1>

<?php if (isset($_SESSION['success'])): ?>
<div class="alert alert--success"><?= htmlspecialchars($_SESSION['success']) ?></div>
<?php unset($_SESSION['success']); endif; ?>

<?php if (isset($_SESSION['error'])): ?>
<div class="alert alert--error"><?= htmlspecialchars($_SESSION['error']) ?></div>
<?php unset($_SESSION['error']); endif; ?>

<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; }

@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}
</style>

<?php $content = ob_get_clean(); ?>
<?php require VIEW_PATH . '/layout.php'; ?>

Vollständig herunterladen

Aktionen

Herunterladen

Andere Versionen dieser Datei

ID Version Typ Größe Datum
1778 2 modified 4.8 KB 2025-12-27 14:05
151 1 modified 4.8 KB 2025-12-21 02:31

← Zurück zur Übersicht