X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/b33cf8ebaf54882a2238b660ba07936301077695..fc8a4455218bc71e17697f33c111b9dbc55f8047:/timesheets.php diff --git a/timesheets.php b/timesheets.php index 4a4eb66f..191f7492 100644 --- a/timesheets.php +++ b/timesheets.php @@ -46,9 +46,20 @@ if (!$user->isPluginEnabled('ts')) { } // End of access checks. -$timesheets = ttTimesheetHelper::getTimesheets($user->getUser()); +// TODO: determine user properly, using a dropdown. +$user_id = $user->getUser(); + +// TODO: fix this for client access. +$active_timesheets = ttTimesheetHelper::getActiveTimesheets($user_id); +$inactive_timesheets = ttTimesheetHelper::getInactiveTimesheets($user_id); +$show_client = $user->isPluginEnabled('cl') && !$user->isClient(); + +$smarty->assign('active_timesheets', $active_timesheets); +$smarty->assign('inactive_timesheets', $inactive_timesheets); +$smarty->assign('show_client', $show_client); +$smarty->assign('show_submit_status', !$user->isClient()); +$smarty->assign('show_approval_status', !$user->isClient()); -$smarty->assign('timesheets', $timesheets); $smarty->assign('title', $i18n->get('title.timesheets')); $smarty->assign('content_page_name', 'timesheets.tpl'); $smarty->display('index.tpl');