One more fix to header output.
[timetracker.git] / WEB-INF / templates / header.tpl
index b307f4c..1d66221 100644 (file)
 
 {assign var="tab_width" value="700"}
 
-<!--  101% height here is a workaround for Firefox shifting content horizontally when scrollbar appears / disappears.
-See https://bugzilla.mozilla.org/show_bug.cgi?id=279425.
-With 101% height we essentially force the scrollbar to always appear. -->
-<table height="101%" cellspacing="0" cellpadding="0" width="100%" border="0">
+<table height="100%" cellspacing="0" cellpadding="0" width="100%" border="0">
   <tr>
     <td valign="top" align="center"> <!-- This is to centrally align all our content. -->
 
@@ -105,7 +102,7 @@ With 101% height we essentially force the scrollbar to always appear. -->
             &middot; <a class="mainMenu" href="expenses.php">{$i18n.menu.expenses}</a>
     {/if}
             {if !$user->isClient()}&middot; {/if}<a class="mainMenu" href="reports.php">{$i18n.menu.reports}</a>
-    {if ($user->canManageTeam() || $user->isClient()) && $user->isPluginEnabled('iv')}
+    {if $user->isPluginEnabled('iv') && ($user->can('manage_invoices') || $user->can('view_own_invoices'))}
             &middot; <a class="mainMenu" href="invoices.php">{$i18n.title.invoices}</a>
     {/if}
     {if ($user->isPluginEnabled('ch') && !$user->isClient()) && ($smarty.const.MODE_PROJECTS == $user->tracking_mode
@@ -115,13 +112,13 @@ With 101% height we essentially force the scrollbar to always appear. -->
     {if !$user->isClient() && ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
             &middot; <a class="mainMenu" href="projects.php">{$i18n.menu.projects}</a>
     {/if}
-    {if $user->canManageTeam() && ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
+    {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode) && $user->can('manage_tasks')}
             &middot; <a class="mainMenu" href="tasks.php">{$i18n.menu.tasks}</a>
     {/if}
     {if !$user->isClient()}
             &middot; <a class="mainMenu" href="users.php">{$i18n.menu.users}</a>
     {/if}
-    {if $user->canManageTeam() && $user->isPluginEnabled('cl')}
+    {if $user->isPluginEnabled('cl') && $user->can('manage_clients')}
             &middot; <a class="mainMenu" href="clients.php">{$i18n.menu.clients}</a>
     {/if}
     {if $user->isManager()}
@@ -153,7 +150,7 @@ With 101% height we essentially force the scrollbar to always appear. -->
 {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:'html'}{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:'html'}</b>{/if}{if $user->team}, {$user->team|escape:'html'}{/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 -->