0.7.1: dashboard tab stays clickable on the VM detail page
This commit is contained in:
1 parent
cbf899b94b
commit
52d1e65a01
4 files changed
+6
-6
No files matched your search
+3
-3
@@ -48,7 +48,7 @@ if (!function_exists('vmm_nav')) {
|
||||
* Clickable breadcrumb + section tabs (the XigmaNAS title itself is plain
|
||||
* text, so navigation lives here).
|
||||
*/
|
||||
function vmm_nav(string $current): void
|
||||
function vmm_nav(string $current, string $crumb = ''): void
|
||||
{
|
||||
$items = [
|
||||
'dashboard' => ['vmmngr.php', gettext('Dashboard')],
|
||||
@@ -58,12 +58,12 @@ if (!function_exists('vmm_nav')) {
|
||||
'jobs' => ['vmmngr_jobs.php', gettext('Jobs')],
|
||||
'config' => ['vmmngr_config.php', gettext('Configuration')],
|
||||
];
|
||||
$label = $items[$current][1] ?? gettext('VM Manager');
|
||||
$label = $crumb !== '' ? $crumb : ($items[$current][1] ?? gettext('VM Manager'));
|
||||
?>
|
||||
<div class="vmm-crumbs"><a href="vmmngr.php"><?=gettext('VM Manager');?></a><span class="vmm-sep">›</span><strong><?=vmm_h($label);?></strong></div>
|
||||
<div class="vmm-tabs">
|
||||
<?php foreach ($items as $key => [$href, $text]): ?>
|
||||
<?php if ($key === $current): ?>
|
||||
<?php if ($key === $current && $current !== ''): ?>
|
||||
<span class="vmm-tab vmm-tab-cur"><?=vmm_h($text);?></span>
|
||||
<?php else: ?>
|
||||
<a class="vmm-tab" href="<?=vmm_h($href);?>"><?=vmm_h($text);?></a>
|
||||
|
||||
Reference in new issue
Block a user