X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/f935dc9ad6911207122e22003f23ade7b62f8167..18ecb507a76c7960dd3d8d2c64264e1f4f4b8952:/timesheets.php diff --git a/timesheets.php b/timesheets.php index 63a1bb34..672e8597 100644 --- a/timesheets.php +++ b/timesheets.php @@ -100,14 +100,15 @@ $active_timesheets = ttTimesheetHelper::getActiveTimesheets($user_id); if ($notClient) $inactive_timesheets = ttTimesheetHelper::getInactiveTimesheets($user_id); -$show_client = $user->isPluginEnabled('cl') && $notClient; +$showClient = $user->isPluginEnabled('cl') && $notClient; +$canEdit = $notClient && ($user->can('manage_own_timesheets') || + $user->can('manage_timesheets') || $user->can('manage_all_timesheets')); $smarty->assign('active_timesheets', $active_timesheets); $smarty->assign('inactive_timesheets', $inactive_timesheets); -$smarty->assign('show_client', $show_client); -$smarty->assign('show_hint', $notClient); -$smarty->assign('show_submit_status', $notClient); -$smarty->assign('show_approval_status', $notClient); +$smarty->assign('show_client', $showClient); +$smarty->assign('not_client', $notClient); +$smarty->assign('can_edit', $canEdit); $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.timesheets')); $smarty->assign('content_page_name', 'timesheets.tpl');