{assign var="tab_width" value="300"}
-<table height="100%" cellspacing="0" cellpadding="0" border="0">
+<table height="100%" cellspacing="0" cellpadding="0" border="0" style="margin-left: auto; margin-right: auto;">
<tr>
<td valign="top" align="center"> <!-- This is to centrally align all our content. -->
- <!-- Top image -->
+ <!-- top image -->
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tr>
{if $user->custom_logo}
</td>
</tr>
</table>
- <!-- End of top image -->
+ <!-- end of top image -->
{if $authenticated}
- {if $user->isAdmin()}
+ {if $user->can('administer_site')}
- <!-- Sub menu for admin -->
+ <!-- sub menu for admin -->
<table cellspacing="0" cellpadding="3" width="100%" border="0">
<tr>
<td align="center" bgcolor="#d9d9d9" height="17" style="background-repeat: repeat-x;" background="../images/subm_bg.gif">
- <a class="mainMenu" href="admin_teams.php">{$i18n.menu.teams}</a> ·
+ <a class="mainMenu" href="admin_teams.php">{$i18n.menu.groups}</a> ·
<a class="mainMenu" href="admin_options.php">{$i18n.menu.options}</a>
</td>
</tr>
</table>
- <!-- End of sub menu for admin -->
+ <!-- end of sub menu for admin -->
{else}
- <!-- Sub menu for authorized user -->
+ <!-- sub menu for authorized user -->
<table cellspacing="0" cellpadding="3" width="100%" border="0">
<tr>
<td align="center" bgcolor="#d9d9d9" height="17" style="background-repeat: repeat-x;" background="../images/subm_bg.gif">
- {if !$user->isClient()}
+ {if $user->can('track_own_time') || $user->can('track_time')}
<a class="mainMenu" href="time.php">{$i18n.menu.time}</a>
{/if}
- {if $user->isPluginEnabled('ex') && !$user->isClient()}
+ {if $user->isPluginEnabled('ex') && ($user->can('track_own_expenses') || $user->can('track_expenses'))}
· <a class="mainMenu" href="expenses.php">{$i18n.menu.expenses}</a>
{/if}
- {if !$user->isClient() && ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
+ {if ($user->can('view_own_projects') || $user->can('manage_projects')) && ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
· <a class="mainMenu" href="projects.php">{$i18n.menu.projects}</a>
{/if}
- {if $user->canManageTeam() && ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
+ {if ($user->can('view_own_tasks') || $user->can('manage_tasks')) && $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode}
· <a class="mainMenu" href="tasks.php">{$i18n.menu.tasks}</a>
{/if}
- {if !$user->isClient()}
+ {if $user->can('view_users') || $user->can('manage_users')}
· <a class="mainMenu" href="users.php">{$i18n.menu.users}</a>
{/if}
- {if $user->canManageTeam() && $user->isPluginEnabled('cl')}
+ {if $user->isPluginEnabled('cl') && ($user->can('view_own_clients') || $user->can('manage_clients'))}
· <a class="mainMenu" href="clients.php">{$i18n.menu.clients}</a>
{/if}
</td>
</tr>
</table>
- <!-- End of sub menu for authorized user -->
+ <!-- end of sub menu for authorized user -->
{/if}
{/if}
- <!-- Output errors -->
+ <!-- output errors -->
{if $err->yes()}
<table cellspacing="4" cellpadding="7" width="{$tab_width}" border="0">
<tr>
</tr>
</table>
{/if}
- <!-- End of output errors -->
+ <!-- end of output errors -->
- <!-- Output messages -->
+ <!-- output messages -->
{if $msg->yes()}
<table cellspacing="4" cellpadding="7" width="{$tab_width}" border="0">
<tr>
</tr>
</table>
{/if}
- <!-- End of output messages -->
+ <!-- end of output messages -->