Update active menu in sidebars

This commit is contained in:
Frederic Guillot
2015-12-24 15:34:50 +01:00
parent 4003b122d0
commit 9ff0abd8d6
8 changed files with 101 additions and 76 deletions

View File

@@ -1,37 +1,37 @@
<div class="sidebar">
<h2><?= t('Actions') ?></h2>
<ul>
<li <?= $this->app->getRouterAction() === 'index' ? 'class="active"' : '' ?>>
<li <?= $this->app->checkMenuSelection('config', 'index') ?>>
<?= $this->url->link(t('About'), 'config', 'index') ?>
</li>
<li <?= $this->app->getRouterAction() === 'plugins' ? 'class="active"' : '' ?>>
<li <?= $this->app->checkMenuSelection('config', 'plugins') ?>>
<?= $this->url->link(t('Plugins'), 'config', 'plugins') ?>
</li>
<li <?= $this->app->getRouterAction() === 'application' ? 'class="active"' : '' ?>>
<li <?= $this->app->checkMenuSelection('config', 'application') ?>>
<?= $this->url->link(t('Application settings'), 'config', 'application') ?>
</li>
<li <?= $this->app->getRouterAction() === 'project' ? 'class="active"' : '' ?>>
<li <?= $this->app->checkMenuSelection('config', 'project') ?>>
<?= $this->url->link(t('Project settings'), 'config', 'project') ?>
</li>
<li <?= $this->app->getRouterAction() === 'board' ? 'class="active"' : '' ?>>
<li <?= $this->app->checkMenuSelection('config', 'board') ?>>
<?= $this->url->link(t('Board settings'), 'config', 'board') ?>
</li>
<li <?= $this->app->getRouterAction() === 'calendar' ? 'class="active"' : '' ?>>
<li <?= $this->app->checkMenuSelection('config', 'calendar') ?>>
<?= $this->url->link(t('Calendar settings'), 'config', 'calendar') ?>
</li>
<li <?= $this->app->getRouterController() === 'link' && $this->app->getRouterAction() === 'index' ? 'class="active"' : '' ?>>
<li <?= $this->app->checkMenuSelection('link') ?>>
<?= $this->url->link(t('Link settings'), 'link', 'index') ?>
</li>
<li <?= $this->app->getRouterController() === 'currency' && $this->app->getRouterAction() === 'index' ? 'class="active"' : '' ?>>
<li <?= $this->app->checkMenuSelection('currency', 'index') ?>>
<?= $this->url->link(t('Currency rates'), 'currency', 'index') ?>
</li>
<li <?= $this->app->getRouterAction() === 'integrations' ? 'class="active"' : '' ?>>
<li <?= $this->app->checkMenuSelection('config', 'integrations') ?>>
<?= $this->url->link(t('Integrations'), 'config', 'integrations') ?>
</li>
<li <?= $this->app->getRouterAction() === 'webhook' ? 'class="active"' : '' ?>>
<li <?= $this->app->checkMenuSelection('config', 'webhook') ?>>
<?= $this->url->link(t('Webhooks'), 'config', 'webhook') ?>
</li>
<li <?= $this->app->getRouterAction() === 'api' ? 'class="active"' : '' ?>>
<li <?= $this->app->checkMenuSelection('config', 'api') ?>>
<?= $this->url->link(t('API'), 'config', 'api') ?>
</li>
<li>