X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=timesheets.php;h=b7ce44b8489d1bb0893623d0f1a07d2b8bbf8aa8;hb=9819bb63bec83c13dd40ebb2ffc24df5fcfeda33;hp=650575e699825cd998097e46d8af3d6ed5f4ff11;hpb=bfbd5b318b37a66ece219e719734a60249781b6d;p=timetracker.git diff --git a/timesheets.php b/timesheets.php index 650575e6..b7ce44b8 100644 --- a/timesheets.php +++ b/timesheets.php @@ -57,7 +57,7 @@ if ($request->isPost()) { } // End of access checks. -// Determine user for which we display this page. +// Determine user for whom we display this page. if ($request->isPost() && $userChanged) { $user_id = $request->getParameter('user'); $user->setOnBehalfUser($user_id); @@ -67,6 +67,8 @@ if ($request->isPost() && $userChanged) { $group_id = $user->getGroup(); +$showFiles = $user->isPluginEnabled('at'); + // Elements of timesheetsForm. $form = new Form('timesheetsForm'); @@ -90,14 +92,15 @@ if ($user->can('track_time')) { } } -$active_timesheets = ttTimesheetHelper::getActiveTimesheets($user_id); -$inactive_timesheets = ttTimesheetHelper::getInactiveTimesheets($user_id); +$active_timesheets = ttTimesheetHelper::getActiveTimesheets(); +$inactive_timesheets = ttTimesheetHelper::getInactiveTimesheets(); $showClient = $user->isPluginEnabled('cl'); $smarty->assign('active_timesheets', $active_timesheets); $smarty->assign('inactive_timesheets', $inactive_timesheets); $smarty->assign('show_client', $showClient); +$smarty->assign('show_files', $showFiles); $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('title', $i18n->get('title.timesheets')); $smarty->assign('content_page_name', 'timesheets.tpl');