console
This commit is contained in:
@@ -71,9 +71,37 @@ $sidebarItems = $moduleSidebar['items'] ?? [];
|
||||
<?php if ($moduleMenu): ?>
|
||||
<div class="module-subnav card">
|
||||
<?php foreach ($moduleMenu as $entry): ?>
|
||||
<a class="nav-link" href="<?= e($entry['href'] ?? '#') ?>">
|
||||
<?= e($entry['label'] ?? 'Link') ?>
|
||||
</a>
|
||||
<?php
|
||||
$href = (string)($entry['href'] ?? '');
|
||||
$label = (string)($entry['label'] ?? 'Link');
|
||||
$children = is_array($entry['children'] ?? null) ? $entry['children'] : [];
|
||||
$isSetup = $href !== '' && str_starts_with($href, '/modules/setup/');
|
||||
if ($isSetup) {
|
||||
continue;
|
||||
}
|
||||
?>
|
||||
<?php if ($children): ?>
|
||||
<div class="nav-dropdown">
|
||||
<button class="nav-link nav-link-button" type="button"><?= e($label) ?> ▾</button>
|
||||
<div class="nav-dropdown-menu">
|
||||
<?php foreach ($children as $child): ?>
|
||||
<?php
|
||||
$childHref = (string)($child['href'] ?? '');
|
||||
if ($childHref !== '' && str_starts_with($childHref, '/modules/setup/')) {
|
||||
continue;
|
||||
}
|
||||
?>
|
||||
<a class="nav-link" href="<?= e($childHref ?: '#') ?>">
|
||||
<?= e((string)($child['label'] ?? 'Link')) ?>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<a class="nav-link" href="<?= e($href ?: '#') ?>">
|
||||
<?= e($label) ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@@ -90,7 +118,13 @@ $sidebarItems = $moduleSidebar['items'] ?? [];
|
||||
<?php endif; ?>
|
||||
<div class="sidebar-items">
|
||||
<?php foreach ($sidebarItems as $item): ?>
|
||||
<a class="nav-link" href="<?= e($item['href'] ?? '#') ?>"><?= e($item['label'] ?? 'Item') ?></a>
|
||||
<?php
|
||||
$itemHref = (string)($item['href'] ?? '');
|
||||
if ($itemHref !== '' && str_starts_with($itemHref, '/modules/setup/')) {
|
||||
continue;
|
||||
}
|
||||
?>
|
||||
<a class="nav-link" href="<?= e($itemHref ?: '#') ?>"><?= e($item['label'] ?? 'Item') ?></a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
Reference in New Issue
Block a user