form.php
- Pfad:
src/View/content-pipeline/form.php - Namespace: -
- Zeilen: 83 | Größe: 3,416 Bytes
- Geändert: 2025-12-27 14:08:35 | 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:08 | claude-code-hook | modified
Claude Code Pre-Hook Backup vor Edit-Operation -
v1
2025-12-23 03:34 | claude-code-hook | modified
Claude Code Pre-Hook Backup vor Edit-Operation
Code
<?php ob_start(); ?>
<h1><?= $pipeline ? 'Pipeline bearbeiten' : 'Neue Pipeline' ?></h1>
<form action="<?= $pipeline ? '/content-pipeline/' . $pipeline['id'] : '/content-pipeline' ?>" method="POST" class="form">
<input type="hidden" name="_csrf_token" value="<?= htmlspecialchars($csrfToken ?? '') ?>">
<div class="form-group">
<label for="name" class="form-label">Name *</label>
<input type="text" id="name" name="name" class="form-input" required
value="<?= htmlspecialchars($pipeline['name'] ?? '') ?>"
placeholder="z.B. Standard, Nur-Embedding, Test">
</div>
<div class="form-group">
<label for="description" class="form-label">Beschreibung</label>
<textarea id="description" name="description" class="form-textarea" rows="3"
placeholder="Optionale Beschreibung der Pipeline"><?= htmlspecialchars($pipeline['description'] ?? '') ?></textarea>
</div>
<div class="form-group">
<label for="source_path" class="form-label">Quell-Pfad</label>
<input type="text" id="source_path" name="source_path" class="form-input"
value="<?= htmlspecialchars($pipeline['source_path'] ?? '/var/www/nextcloud/data/root/files/Documents') ?>"
placeholder="/var/www/nextcloud/data/root/files/Documents">
<small class="form-hint">Pfad zum Nextcloud-Ordner mit den zu verarbeitenden Dokumenten</small>
</div>
<div class="form-group">
<label for="extensions" class="form-label">Dateitypen</label>
<input type="text" id="extensions" name="extensions" class="form-input"
value="<?= htmlspecialchars(implode(', ', $pipeline['extensions'] ?? ['.pdf', '.docx', '.pptx', '.md', '.txt'])) ?>"
placeholder=".pdf, .docx, .pptx, .md, .txt">
<small class="form-hint">Komma-getrennte Liste der Dateiendungen (mit oder ohne Punkt)</small>
</div>
<div class="form-group">
<label class="form-checkbox">
<input type="checkbox" name="is_default" value="1" <?= ($pipeline['is_default'] ?? 0) ? 'checked' : '' ?>>
<span>Als Standard-Pipeline markieren</span>
</label>
</div>
<div class="form-actions">
<button type="submit" class="btn btn--primary"><?= $pipeline ? 'Speichern' : 'Erstellen' ?></button>
<a href="<?= $pipeline ? '/content-pipeline/' . $pipeline['id'] : '/content-pipeline' ?>" class="btn btn--secondary">Abbrechen</a>
</div>
</form>
<?php if (!$pipeline): ?>
<div class="info-box">
<h3>Pipeline-Schritte</h3>
<p>Nach dem Erstellen werden automatisch die Standard-Schritte hinzugefuegt:</p>
<ol>
<?php foreach ($stepTypes as $type => $meta): ?>
<li><strong><?= $meta['label'] ?></strong> - <?= $meta['description'] ?></li>
<?php endforeach; ?>
</ol>
<p>Die Schritte koennen danach einzeln aktiviert/deaktiviert und konfiguriert werden.</p>
</div>
<?php endif; ?>
<p class="links-bar">
<a href="/content-pipeline">Zurueck zur Uebersicht</a>
</p>
<style>
.info-box {
background: var(--info-bg, #e7f3ff);
border: 1px solid var(--info-color, #0066cc);
border-radius: 6px;
padding: 1rem;
margin-top: 2rem;
}
.info-box h3 {
margin-top: 0;
color: var(--info-color, #0066cc);
}
</style>
<?php $content = ob_get_clean(); ?>
<?php require VIEW_PATH . '/layout.php'; ?>