From: Nik Okuntseff Date: Sat, 24 Mar 2018 16:48:47 +0000 (+0000) Subject: Fixed header to print a revamped role name. X-Git-Tag: timetracker_1.19-1~954 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=b9fc6bb058ab933c980b72c54eea0b5afcab03e7;p=timetracker.git Fixed header to print a revamped role name. --- diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 0f0b9fc5..10499fb2 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.69.4153 | Copyright © Anuko | +  Anuko Time Tracker 1.17.69.4154 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/header.tpl b/WEB-INF/templates/header.tpl index e0fd8057..101c84a6 100644 --- a/WEB-INF/templates/header.tpl +++ b/WEB-INF/templates/header.tpl @@ -150,7 +150,7 @@ {if $title} - +
{$title}{if $timestring}: {$timestring}{/if}
{$user->name|escape}{if $user->isAdmin()} {$i18n.label.role_admin}{elseif $user->isManager()} {$i18n.label.role_manager}{elseif $user->canManageTeam()} {$i18n.label.role_comanager}{/if}{if $user->behalf_id > 0} {$i18n.label.on_behalf} {$user->behalf_name|escape}{/if}{if $user->team}, {$user->team|escape}{/if}
{$user->name|escape} - {$user->role_name|escape} {if $user->behalf_id > 0}{$i18n.label.on_behalf} {$user->behalf_name|escape}{/if}{if $user->team}, {$user->team|escape}{/if}
{/if} diff --git a/charts.php b/charts.php index 959cfe36..f2b01f16 100644 --- a/charts.php +++ b/charts.php @@ -47,8 +47,6 @@ if (!$user->isPluginEnabled('ch')) { exit(); } - - // Initialize and store date in session. $cl_date = $request->getParameter('date', @$_SESSION['date']); if(!$cl_date) { @@ -111,7 +109,7 @@ if ($request->isPost()) { } // If user has changed - set behalf_id accordingly in the session. if ($request->getParameter('onBehalfUser')) { - if($user->canManageTeam()) { + if($user->can('view_charts')) { unset($_SESSION['behalf_id']); unset($_SESSION['behalf_name']); @@ -129,7 +127,7 @@ if ($request->isPost()) { $chart_form = new Form('chartForm'); // User dropdown. Changes the user "on behalf" of whom we are working. -if ($user->canManageTeam()) { +if ($user->can('view_charts')) { $user_list = ttTeamHelper::getActiveUsers(array('putSelfFirst'=>true)); if (count($user_list) > 1) { $chart_form->addInput(array('type'=>'combobox',