mirror of
https://github.com/slawkens/myaac.git
synced 2026-02-06 21:26:22 +01:00
Settings: Possibility to navigate tabs through link
This commit is contained in:
@@ -152,9 +152,10 @@ class Settings implements \ArrayAccess
|
||||
}
|
||||
|
||||
if ($setting['type'] === 'category') {
|
||||
$title = strtolower(str_replace(' ', '', $setting['title']));
|
||||
?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link<?= ($i === 0 ? ' active' : ''); ?>" id="home-tab-<?= $i++; ?>" data-toggle="tab" href="#tab-<?= str_replace(' ', '', $setting['title']); ?>" type="button"><?= $setting['title']; ?></a>
|
||||
<a class="nav-link<?= ($i === 0 ? ' active' : ''); ?>" id="home-tab-<?= $i++; ?>" data-toggle="tab" href="#tab-<?= $title; ?>" type="button"><?= $setting['title']; ?></a>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
@@ -175,8 +176,10 @@ class Settings implements \ArrayAccess
|
||||
if ($j++ !== 0) { // close previous category
|
||||
echo '</tbody></table></div>';
|
||||
}
|
||||
|
||||
$title = strtolower(str_replace(' ', '', $setting['title']));
|
||||
?>
|
||||
<div class="tab-pane fade show<?= ($j === 1 ? ' active' : ''); ?>" id="tab-<?= str_replace(' ', '', $setting['title']); ?>">
|
||||
<div class="tab-pane fade show<?= ($j === 1 ? ' active' : ''); ?>" id="tab-<?= $title; ?>">
|
||||
<?php
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user