Skip to content

Commit

Permalink
tpl_admin.php: Added "active" class on link menu for current Admin page
Browse files Browse the repository at this point in the history
  • Loading branch information
giterlizzi committed Jan 12, 2018
1 parent 8865edb commit 940a755
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tpl_admin.php
Expand Up @@ -10,7 +10,7 @@
// must be run from within DokuWiki
if (!defined('DOKU_INC')) die();

global $ID, $auth;
global $ID, $INPUT, $auth;

if (bootstrap3_conf('showAdminMenu')):

Expand Down Expand Up @@ -54,8 +54,10 @@

if (! $label) continue;

echo sprintf('<li><a href="%s" title="%s" class="admin %s">%s</a></li>',
wl($ID, array('do' => 'admin', 'page' => $item)), $label, $item, $label);
echo sprintf('<li class="%s"><a href="%s" title="%s" class="admin %s">%s</a></li>',
(($INPUT->str('page') == $item) ? 'active' : ''),
wl($ID, array('do' => 'admin', 'page' => $item)),
$label, $item, $label);

}

Expand Down

0 comments on commit 940a755

Please sign in to comment.