#1213 -- Fix API calls from sidebar navigation.

This commit is contained in:
Buster "Silver Eagle" Neece 2019-02-24 14:09:27 -06:00
parent f6eac21cc8
commit 0802948036
2 changed files with 4 additions and 3 deletions

View File

@ -16,7 +16,7 @@ return function(\App\Event\BuildStationMenu $e) {
'label' => __('Click to Start Station'),
'icon' => 'refresh',
'url' => $router->fromHere('api:stations:restart'),
'class' => 'text-success',
'class' => 'api-call text-success',
'visible' => !$station->getHasStarted(),
'permission' => Acl::STATION_BROADCASTING,
],
@ -24,7 +24,7 @@ return function(\App\Event\BuildStationMenu $e) {
'label' => __('Click to Restart Station'),
'icon' => 'refresh',
'url' => $router->fromHere('api:stations:restart'),
'class' => 'text-warning',
'class' => 'api-call text-warning',
'visible' => $station->getNeedsRestart(),
'permission' => Acl::STATION_BROADCASTING,
],
@ -150,6 +150,7 @@ return function(\App\Event\BuildStationMenu $e) {
'restart' => [
'label' => __('Restart Broadcasting'),
'url' => $router->fromHere('api:stations:restart'),
'class' => 'api-call',
'permission' => Acl::STATION_BROADCASTING,
],
]

View File

@ -20,7 +20,7 @@
<ul class="navdrawer-nav">
<?php foreach($category['items'] as $item_id => $item): ?>
<li class="nav-item">
<a class="nav-link pl-4 py-2 text-muted" href="<?=$item['url'] ?>" title="<?=$item['title'] ?>">
<a class="nav-link pl-4 py-2 text-muted <?=$item['class'] ?>" href="<?=$item['url'] ?>" title="<?=$item['title'] ?>">
<?=$item['label'] ?>
</a>
</li>