edit.php
- Pfad:
src/View/semantic-explorer/taxonomie/edit.php - Namespace: -
- Zeilen: 60 | Größe: 2,264 Bytes
- Geändert: 2025-12-27 12:35:56 | 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 1
-
v1
2025-12-27 12:35 | claude-code-hook | modified
Claude Code Pre-Hook Backup vor Write-Operation
Code
<?php
declare(strict_types=1);
// @responsibility: View für Taxonomie-Begriff bearbeiten mit HTMX-Formular
ob_start();
?>
<nav class="breadcrumb">
<a href="/">Campus KI</a> »
<a href="/semantic-explorer">Semantic Explorer</a> »
<a href="/semantic-explorer/taxonomie">Taxonomie</a> » <?= htmlspecialchars($term['name']) ?> » Bearbeiten
</nav>
<h1>Taxonomie-Begriff bearbeiten</h1>
<form id="taxonomy-form" class="form" style="max-width: 600px;"
hx-post="/semantic-explorer/taxonomie/<?= $term['id'] ?>"
hx-headers='{"X-CSRF-TOKEN": "<?= $csrfToken ?>"}'
hx-disabled-elt="button[type=submit]">
<div class="form-group">
<label for="name">Name *</label>
<input type="text" id="name" name="name" class="form-input" required
value="<?= htmlspecialchars($term['name']) ?>">
</div>
<div class="form-group">
<label for="parent_id">Uebergeordneter Begriff</label>
<select id="parent_id" name="parent_id" class="form-select">
<option value="">-- Kein (Root-Element) --</option>
<?php foreach ($terms as $t): ?>
<?php if ($t['id'] !== $term['id']): ?>
<option value="<?= $t['id'] ?>"
<?= ($term['parent_id'] ?? '') == $t['id'] ? 'selected' : '' ?>>
<?= str_repeat(' ', $t['depth']) ?><?= htmlspecialchars($t['name']) ?>
</option>
<?php endif; ?>
<?php endforeach; ?>
</select>
</div>
<div class="form-actions">
<button type="submit" class="btn btn--primary">Speichern</button>
<a href="/semantic-explorer/taxonomie" class="btn">Abbrechen</a>
<button type="button"
class="btn btn--danger"
style="margin-left: auto;"
hx-post="/semantic-explorer/taxonomie/<?= $term['id'] ?>/delete"
hx-headers='{"X-CSRF-TOKEN": "<?= $csrfToken ?>"}'
hx-confirm="Begriff wirklich loeschen? Untergeordnete Begriffe muessen zuerst geloescht werden."
hx-disabled-elt="this">
Loeschen
</button>
</div>
</form>
<?php $content = ob_get_clean(); ?>
<?php require VIEW_PATH . '/layout.php'; ?>