Files
nexus/partials/landingpages/index.php
Lars Gebhardt-Kusche 0f8f9567fe
All checks were successful
Deploy / deploy-staging (push) Successful in 6s
Deploy / deploy-production (push) Has been skipped
asdas
2026-05-11 01:57:23 +02:00

42 lines
1.5 KiB
PHP
Executable File

<?php
declare(strict_types=1);
$auth = app()->auth();
$authUser = $auth->user();
$modules = array_values(array_filter(
$auth->filterModules(modules()->all()),
static fn (array $module): bool => !empty($module['enabled'])
));
?>
<section class="module-list-section" data-reveal>
<?php if ($authUser !== null): ?>
<div class="section-head">
<div style="display:flex; gap:10px; flex-wrap:wrap;">
<a class="nav-link" href="/modules">Module verwalten</a>
<?php if (auth_is_admin()): ?>
<a class="nav-link" href="/settings">Nexus Einstellungen</a>
<a class="nav-link" href="/exports/database.sql">SQL-Export</a>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
<?php if ($modules === []): ?>
<div class="empty-state" data-reveal>
Keine Module für den aktuellen Zugriff sichtbar.
</div>
<?php else: ?>
<div class="module-list">
<?php foreach ($modules as $module): ?>
<a class="module-row" href="<?= e((string)($module['entry'] ?? ('/module/' . $module['name']))) ?>">
<span class="module-row__icon"><?= e(strtoupper(substr((string)($module['title'] ?? $module['name']), 0, 1))) ?></span>
<span class="module-row__content">
<strong class="module-title"><?= e((string)($module['title'] ?? $module['name'] ?? 'Modul')) ?></strong>
<span class="module-desc"><?= e((string)($module['description'] ?? '')) ?></span>
</span>
</a>
<?php endforeach; ?>
</div>
<?php endif; ?>
</section>