From c7f2e7126f6f508487a23d0770ca4f8543278379 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 24 Mar 2018 22:16:05 +0000 Subject: [PATCH] Refactored mobile header to use access rights. --- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/mobile/header.tpl | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index c2bbeb8b..5f16dbdf 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.70.4161 | Copyright © Anuko | +  Anuko Time Tracker 1.17.70.4162 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/mobile/header.tpl b/WEB-INF/templates/mobile/header.tpl index 87d2c401..507a07e0 100644 --- a/WEB-INF/templates/mobile/header.tpl +++ b/WEB-INF/templates/mobile/header.tpl @@ -55,7 +55,7 @@ {if $authenticated} - {if $user->isAdmin()} + {if $user->can('administer_site')} @@ -73,22 +73,22 @@
-- 2.20.1
  - {if !$user->isClient()} + {if $user->can('track_own_time') || $user->can('track_time')} {$i18n.menu.time} {/if} - {if $user->isPluginEnabled('ex') && !$user->isClient()} + {if $user->isPluginEnabled('ex') && ($user->can('track_own_expenses') || $user->can('track_expenses'))} · {$i18n.menu.expenses} {/if} - {if !$user->isClient() && ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} + {if ($user->can('manage_projects') || $user->can('track_own_time') || $user->can('track_time')) && ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} · {$i18n.menu.projects} {/if} - {if $user->canManageTeam() && ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} + {if $user->can('manage_tasks') && $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode} · {$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('manage_clients')} · {$i18n.menu.clients} {/if}