X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=WEB-INF%2Ftemplates%2Fheader.tpl;h=8555447b587f870c904865b5d78e7e85cc4c37fc;hb=1567369ac1fb744b704cacbe77542f55e410d61b;hp=ce8e229c51aa792347d39965d0a52b33262cdffa;hpb=0dfc4dda20c54e173938eaf196f8e071ce790830;p=timetracker.git
diff --git a/WEB-INF/templates/header.tpl b/WEB-INF/templates/header.tpl
index ce8e229c..8555447b 100644
--- a/WEB-INF/templates/header.tpl
+++ b/WEB-INF/templates/header.tpl
@@ -20,14 +20,11 @@
{assign var="tab_width" value="700"}
-
-
+
-
+
{if $user->custom_logo}
@@ -54,11 +51,11 @@ With 101% height we essentially force the scrollbar to always appear. -->
-
+
{if $authenticated}
- {if $user->isAdmin()}
-
+ {if $user->can('administer_site')}
+
-
+
-
+
-
+
{else}
-
+
-
+
-
+
- {if !$user->isClient()}
+ {if $user->exists() && ($user->can('track_own_time') || $user->can('track_time'))}
{$i18n.menu.time}
{/if}
- {if $user->isPluginEnabled('ex') && !$user->isClient()}
+ {if $user->exists() && $user->isPluginEnabled('ex') && ($user->can('track_own_expenses') || $user->can('track_expenses'))}
· {$i18n.menu.expenses}
{/if}
- {if !$user->isClient()}· {/if}{$i18n.menu.reports}
- {if ($user->canManageTeam() || $user->isClient()) && $user->isPluginEnabled('iv')}
+ {if $user->exists() && ($user->can('view_own_reports') || $user->can('view_reports'))}
+ · {$i18n.menu.reports}
+ {/if}
+ {if $user->exists() && $user->isPluginEnabled('iv') && ($user->can('view_own_invoices') || $user->can('manage_invoices'))}
· {$i18n.title.invoices}
{/if}
- {if ($user->isPluginEnabled('ch') && !$user->isClient()) && ($smarty.const.MODE_PROJECTS == $user->tracking_mode
- || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode || $user->isPluginEnabled('cl'))}
+ {if ($user->exists() && $user->isPluginEnabled('ch') && ($user->can('view_own_charts') || $user->can('view_charts'))) &&
+ ($smarty.const.MODE_PROJECTS == $user->getTrackingMode() || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->getTrackingMode() ||
+ $user->isPluginEnabled('cl'))}
· {$i18n.menu.charts}
{/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->getTrackingMode() || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->getTrackingMode())}
· {$i18n.menu.projects}
{/if}
- {if $user->canManageTeam() && ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)}
+ {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->getTrackingMode() && ($user->can('view_own_tasks') || $user->can('manage_tasks')))}
· {$i18n.menu.tasks}
{/if}
- {if !$user->isClient()}
+ {if $user->can('view_users') || $user->can('manage_users')}
· {$i18n.menu.users}
{/if}
- {if $user->canManageTeam() && $user->isPluginEnabled('cl')}
+ {if $user->isPluginEnabled('cl') && ($user->can('view_own_clients') || $user->can('manage_clients'))}
· {$i18n.menu.clients}
{/if}
- {if $user->isManager()}
+ {if $user->can('export_data')}
· {$i18n.menu.export}
{/if}
|
-
+
{/if}
{else}
-
+
|