Backup #1533
| ID | 1533 |
| Dateipfad | /var/www/dev.campus.systemische-tools.de/src/View/semantic-explorer/taxonomie.php |
| Version | 2 |
| Typ |
modified |
| Größe | 3.6 KB |
| Hash | 41bcac303261066d8a08450eab76eff6d0760d7f2168ad02d65eb4b137623dea |
| Datum | 2025-12-26 07:24:53 |
| Geändert von | claude-code-hook |
| Grund | Claude Code Pre-Hook Backup vor Write-Operation |
| Datei existiert |
Ja
|
Dateiinhalt
<?php ob_start();
function renderTaxonomyTree(array $items, int $level = 0): string
{
if (empty($items)) {
return '';
}
$html = '<ol class="taxonomy-tree level-' . $level . '">';
foreach ($items as $item) {
$html .= '<li>';
$html .= '<span class="taxonomy-term">';
$html .= htmlspecialchars($item['name']);
if ($item['chunk_count'] > 0) {
$html .= ' <span class="badge badge--small">' . $item['chunk_count'] . '</span>';
}
$html .= '</span>';
if (!empty($item['children'])) {
$html .= renderTaxonomyTree($item['children'], $level + 1);
}
$html .= '</li>';
}
$html .= '</ol>';
return $html;
}
?>
<nav class="breadcrumb">
<a href="/">Home</a> » <a href="/explorer">Explorer</a> » <a href="/semantic-explorer">Semantic Explorer</a> » Taxonomie
</nav>
<h1>Taxonomie</h1>
<p>Hierarchische Kategorisierung der Inhalte.</p>
<div class="stats-grid">
<div class="stat-card stat-card--primary">
<span class="stat-card__value"><?= $stats['total_terms'] ?? 0 ?></span>
<span class="stat-card__label">Begriffe</span>
</div>
<div class="stat-card">
<span class="stat-card__value"><?= $stats['root_terms'] ?? 0 ?></span>
<span class="stat-card__label">Hauptkategorien</span>
</div>
<div class="stat-card">
<span class="stat-card__value"><?= $stats['max_depth'] ?? 0 ?></span>
<span class="stat-card__label">Max. Tiefe</span>
</div>
<div class="stat-card stat-card--success">
<span class="stat-card__value"><?= $stats['tagged_chunks'] ?? 0 ?></span>
<span class="stat-card__label">Getaggte Chunks</span>
</div>
</div>
<?php if (!empty($hierarchy)): ?>
<h2>Hierarchie</h2>
<?= renderTaxonomyTree($hierarchy) ?>
<?php endif; ?>
<?php if (!empty($terms)): ?>
<h2>Alle Begriffe</h2>
<div class="filters">
<input type="search" id="taxonomy-search" class="form-input" placeholder="Durchsuchen...">
</div>
<table id="taxonomy-table" data-sortable>
<thead>
<tr>
<th data-sort="name">Begriff</th>
<th data-sort="path">Pfad</th>
<th data-sort="depth">Tiefe</th>
<th data-sort="chunk_count">Chunks</th>
<th data-sort="children_count">Unterbegriffe</th>
</tr>
</thead>
<tbody>
<?php foreach ($terms as $t): ?>
<tr>
<td><?= htmlspecialchars($t['name']) ?></td>
<td><code><?= htmlspecialchars($t['path'] ?? $t['slug']) ?></code></td>
<td><?= $t['depth'] ?></td>
<td><?= $t['chunk_count'] ?></td>
<td><?= $t['children_count'] ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php else: ?>
<p class="empty-state">Keine Taxonomie-Begriffe gefunden. Fuehren Sie die semantische Analyse aus.</p>
<?php endif; ?>
<p class="links-bar">
<a href="/semantic-explorer">Zurueck zum Explorer</a> |
<a href="/semantic-explorer/ontologie">Ontologie</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('taxonomy-table', {
searchInput: 'taxonomy-search',
pageSize: 20
});
</script>
<?php $content = ob_get_clean(); ?>
<?php require VIEW_PATH . '/layout.php'; ?>
Vollständig herunterladen
Aktionen
Andere Versionen dieser Datei
| ID |
Version |
Typ |
Größe |
Datum |
| 1622 |
3 |
modified |
3.5 KB |
2025-12-27 09:44 |
| 1533 |
2 |
modified |
3.6 KB |
2025-12-26 07:24 |
| 14 |
1 |
modified |
2.9 KB |
2025-12-20 16:43 |
← Zurück zur Übersicht