Add active class to show current Manager page (#776)

This commit is contained in:
Clément Oudot 2014-12-18 08:34:23 +00:00
parent 7e74e27a3b
commit c3d7d5b428
4 changed files with 39 additions and 30 deletions

View File

@ -35,17 +35,20 @@ my $template = HTML::Template->new(
cache => 0,
filter => sub { $manager->translate_template(@_) },
);
$template->param( SCRIPT_NAME => $ENV{SCRIPT_NAME} );
$template->param( MENU => $manager->menu() );
$template->param( DIR => "$skin_dir/$skin" );
$template->param( CFGNUM => $manager->{cfgNum} );
$template->param( TREE_AUTOCLOSE => $manager->{managerTreeAutoClose} );
$template->param( TREE_JQUERYCSS => $manager->{managerTreeJqueryCss} );
$template->param( CSS => $manager->{managerCss} );
$template->param( CSS_THEME => $manager->{managerCssTheme} );
$template->param( VERSION => $Lemonldap::NG::Manager::VERSION );
$template->param( LANG => shift @{ $manager->{lang} } );
$template->param( PORTAL_URL => $manager->{portal} );
$template->param( SCRIPT_NAME => $ENV{SCRIPT_NAME} );
$template->param( MENU => $manager->menu() );
$template->param( DIR => "$skin_dir/$skin" );
$template->param( CFGNUM => $manager->{cfgNum} );
$template->param( TREE_AUTOCLOSE => $manager->{managerTreeAutoClose} );
$template->param( TREE_JQUERYCSS => $manager->{managerTreeJqueryCss} );
$template->param( CSS => $manager->{managerCss} );
$template->param( CSS_THEME => $manager->{managerCssTheme} );
$template->param( VERSION => $Lemonldap::NG::Manager::VERSION );
$template->param( LANG => shift @{ $manager->{lang} } );
$template->param( PORTAL_URL => $manager->{portal} );
$template->param( LI_CLASS_CONFIGURATION => "active" );
$template->param( LI_CLASS_SESSION => "" );
$template->param( LI_CLASS_NOTIFICATION => "" );
print $manager->header('text/html; charset=utf-8');
print $template->output;

View File

@ -42,14 +42,17 @@ my $template = HTML::Template->new(
cache => 0,
filter => sub { $cgi->translate_template(@_) },
);
$template->param( SCRIPT_NAME => $ENV{SCRIPT_NAME} );
$template->param( TREE => $cgi->tree() );
$template->param( DIR => "$skin_dir/$skin" );
$template->param( CSS => $css );
$template->param( CSS_THEME => $css_theme );
$template->param( VERSION => $Lemonldap::NG::Manager::VERSION );
$template->param( LANG => shift @{ $cgi->{lang} } );
$template->param( PORTAL_URL => $cgi->{portal} );
$template->param( SCRIPT_NAME => $ENV{SCRIPT_NAME} );
$template->param( TREE => $cgi->tree() );
$template->param( DIR => "$skin_dir/$skin" );
$template->param( CSS => $css );
$template->param( CSS_THEME => $css_theme );
$template->param( VERSION => $Lemonldap::NG::Manager::VERSION );
$template->param( LANG => shift @{ $cgi->{lang} } );
$template->param( PORTAL_URL => $cgi->{portal} );
$template->param( LI_CLASS_CONFIGURATION => "" );
$template->param( LI_CLASS_SESSION => "" );
$template->param( LI_CLASS_NOTIFICATION => "active" );
print $cgi->header('text/html; charset=utf-8');
print $template->output;

View File

@ -40,14 +40,17 @@ my $template = HTML::Template->new(
cache => 0,
filter => sub { $cgi->translate_template(@_) },
);
$template->param( SCRIPT_NAME => $ENV{SCRIPT_NAME} );
$template->param( TREE => $cgi->tree() );
$template->param( DIR => "$skin_dir/$skin" );
$template->param( CSS => $css );
$template->param( CSS_THEME => $css_theme );
$template->param( VERSION => $Lemonldap::NG::Manager::VERSION );
$template->param( LANG => shift @{ $cgi->{lang} } );
$template->param( PORTAL_URL => $cgi->{portal} );
$template->param( SCRIPT_NAME => $ENV{SCRIPT_NAME} );
$template->param( TREE => $cgi->tree() );
$template->param( DIR => "$skin_dir/$skin" );
$template->param( CSS => $css );
$template->param( CSS_THEME => $css_theme );
$template->param( VERSION => $Lemonldap::NG::Manager::VERSION );
$template->param( LANG => shift @{ $cgi->{lang} } );
$template->param( PORTAL_URL => $cgi->{portal} );
$template->param( LI_CLASS_CONFIGURATION => "" );
$template->param( LI_CLASS_SESSION => "active" );
$template->param( LI_CLASS_NOTIFICATION => "" );
print $cgi->header('text/html; charset=utf-8');
print $template->output;

View File

@ -13,9 +13,9 @@
</div>
<div class="collapse navbar-collapse" id="manager-menu">
<ul class="nav navbar-nav">
<li><a href="index.pl"><i class="glyphicon glyphicon-cog"></i> <lang en="Configuration" fr="Configuration"/></a></li>
<li><a href="sessions.pl"><i class="glyphicon glyphicon-user"></i> <lang en="Sessions" fr="Sessions"/></a></li>
<li><a href="notifications.pl"><i class="glyphicon glyphicon-bell"></i> <lang en="Notifications" fr="Notifications"/></a></li>
<li class="<TMPL_VAR NAME="LI_CLASS_CONFIGURATION">"><a href="index.pl"><i class="glyphicon glyphicon-cog"></i> <lang en="Configuration" fr="Configuration"/></a></li>
<li class="<TMPL_VAR NAME="LI_CLASS_SESSION">"><a href="sessions.pl"><i class="glyphicon glyphicon-user"></i> <lang en="Sessions" fr="Sessions"/></a></li>
<li class="<TMPL_VAR NAME="LI_CLASS_NOTIFICATION">"><a href="notifications.pl"><i class="glyphicon glyphicon-bell"></i> <lang en="Notifications" fr="Notifications"/></a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">