edit.php
- Pfad:
src/View/semantic-explorer/relationen/edit.php - Namespace: -
- Zeilen: 56 | Größe: 2,131 Bytes
- Geändert: 2025-12-27 12:35:12 | 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 Relation 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/relationen">Relationen</a> » Bearbeiten
</nav>
<h1>Relation bearbeiten</h1>
<p><?= htmlspecialchars($relation['source_name']) ?> → <?= htmlspecialchars($relation['target_name']) ?></p>
<form id="relation-form" class="form" style="max-width: 600px;"
hx-post="/semantic-explorer/relationen/<?= $relation['id'] ?>"
hx-headers='{"X-CSRF-TOKEN": "<?= $csrfToken ?>"}'
hx-disabled-elt="button[type=submit]">
<div class="form-group">
<label for="relation_type">Beziehungstyp *</label>
<select id="relation_type" name="relation_type" class="form-select" required>
<?php foreach ($relationTypes as $t): ?>
<option value="<?= htmlspecialchars($t) ?>"
<?= $relation['relation_type'] === $t ? 'selected' : '' ?>><?= htmlspecialchars($t) ?></option>
<?php endforeach; ?>
</select>
</div>
<div class="form-group">
<label for="strength">Staerke (0.0 - 1.0)</label>
<input type="number" id="strength" name="strength" class="form-input"
min="0" max="1" step="0.1" value="<?= htmlspecialchars((string)$relation['strength']) ?>">
</div>
<div class="form-actions">
<button type="submit" class="btn btn--primary">Speichern</button>
<a href="/semantic-explorer/relationen" class="btn">Abbrechen</a>
<button type="button"
class="btn btn--danger"
style="margin-left: auto;"
hx-post="/semantic-explorer/relationen/<?= $relation['id'] ?>/delete"
hx-headers='{"X-CSRF-TOKEN": "<?= $csrfToken ?>"}'
hx-confirm="Relation wirklich loeschen?"
hx-disabled-elt="this">
Loeschen
</button>
</div>
</form>
<?php $content = ob_get_clean(); ?>
<?php require VIEW_PATH . '/layout.php'; ?>