Fixed header to print a revamped role name.
authorNik Okuntseff <support@anuko.com>
Sat, 24 Mar 2018 16:48:47 +0000 (16:48 +0000)
committerNik Okuntseff <support@anuko.com>
Sat, 24 Mar 2018 16:48:47 +0000 (16:48 +0000)
WEB-INF/templates/footer.tpl
WEB-INF/templates/header.tpl
charts.php

index 0f0b9fc..10499fb 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.17.69.4153 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.17.69.4154 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
index e0fd805..101c84a 100644 (file)
 {if $title}
       <table cellspacing="0" cellpadding="5" width="{$tab_width+20}" border="0">
         <tr><td class="sectionHeader"><div class="pageTitle">{$title}{if $timestring}: {$timestring}{/if}</div></td></tr>
-        <tr><td>{$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} <b>{$i18n.label.on_behalf} {$user->behalf_name|escape}</b>{/if}{if $user->team}, {$user->team|escape}{/if}</td></tr>
+        <tr><td>{$user->name|escape} - {$user->role_name|escape} {if $user->behalf_id > 0}<b>{$i18n.label.on_behalf} {$user->behalf_name|escape}</b>{/if}{if $user->team}, {$user->team|escape}{/if}</td></tr>
       </table>
 {/if}
       <!-- end of page title and user details -->
index 959cfe3..f2b01f1 100644 (file)
@@ -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',