index.php
- Pfad:
src/View/semantic-explorer/dokumente/index.php - Namespace: -
- Zeilen: 86 | Größe: 2,935 Bytes
- Geändert: 2025-12-27 09:44:52 | 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 09:44 | claude-code-hook | modified
Claude Code Pre-Hook Backup vor Edit-Operation -
v1
2025-12-20 16:45 | claude-code-hook | modified
Claude Code Pre-Hook Backup vor Write-Operation
Code
<?php ob_start(); ?>
<nav class="breadcrumb">
<a href="/">Campus KI</a> » <a href="/semantic-explorer">Semantic Explorer</a> » Dokumente
</nav>
<h1>Dokumente</h1>
<p>PDFs, DOCX, PPTX aus Nextcloud.</p>
<div class="filters">
<input type="search" id="documents-search" class="form-input" placeholder="Durchsuchen...">
<select id="filter-status" class="form-select--inline">
<option value="">Alle Status</option>
<option value="done">Verarbeitet</option>
<option value="processing">In Bearbeitung</option>
<option value="pending">Ausstehend</option>
<option value="error">Fehler</option>
</select>
</div>
<?php if (!empty($documents)): ?>
<table id="documents-table" data-sortable>
<thead>
<tr>
<th data-sort="filename">Datei</th>
<th data-sort="folder_path">Pfad</th>
<th data-sort="mime_type">Typ</th>
<th data-sort="file_size">Groesse</th>
<th data-sort="status">Status</th>
<th data-sort="chunk_count">Chunks</th>
<th data-sort="token_count">Tokens</th>
</tr>
</thead>
<tbody>
<?php foreach ($documents as $doc): ?>
<tr>
<td><a href="/semantic-explorer/dokumente/<?= $doc['id'] ?>"><?= htmlspecialchars($doc['filename']) ?></a></td>
<td><code><?= htmlspecialchars($doc['folder_path'] ?? '') ?></code></td>
<td><code><?= htmlspecialchars($doc['mime_type'] ?? '-') ?></code></td>
<td><?= number_format($doc['file_size'] / 1024, 0) ?> KB</td>
<td>
<span class="badge badge--<?= $doc['status'] ?>"><?= $doc['status'] ?></span>
<?php if ($doc['error_message']): ?>
<br><small class="text-danger"><?= htmlspecialchars(substr($doc['error_message'], 0, 50)) ?></small>
<?php endif; ?>
</td>
<td><?= $doc['chunk_count'] ?></td>
<td><?= number_format($doc['token_count']) ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php else: ?>
<p class="empty-state">Keine Dokumente gefunden.</p>
<?php endif; ?>
<p class="links-bar">
<a href="/semantic-explorer">Zurueck zum Explorer</a>
</p>
<script type="module">
import { init } from '/js/components/data-table.js';
const dataTable = init({
clock: { now_epoch_ms_utc: () => Date.now() },
logger: console,
ui: {
showMessage: (msg) => { console.log(msg.type + ': ' + msg.text); },
disableFeature: (key) => { console.warn('Feature disabled: ' + key); },
offerRetry: () => Promise.resolve(false)
},
runId: crypto.randomUUID()
});
dataTable.create('documents-table', {
searchInput: 'documents-search',
pageSize: 20,
filters: {
'filter-status': 4
}
});
</script>
<?php $content = ob_get_clean(); ?>
<?php require VIEW_PATH . '/layout.php'; ?>