X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/c71ac60a3c6913ad64b22f367b994983ff77ca22..c14bc01ae221ece2c5b78c9c39b4902cb25154d6:/reports.php diff --git a/reports.php b/reports.php index fdb2d2ed..febfad79 100644 --- a/reports.php +++ b/reports.php @@ -178,6 +178,19 @@ if ($showPaidStatus) { )); } +// Add approved / not approved selector. +$showApproved = $user->isPluginEnabled('ap') && + ($user->can('view_own_reports') || $user->can('view_reports') || + $user->can('view_all_reports') || ($user->can('view_client_reports') && $user->can('view_client_unapproved'))); +if ($showApproved) { + $form->addInput(array('type'=>'combobox', + 'name'=>'approved', + 'style'=>'width: 250px;', + 'data'=>array('1'=>$i18n->get('dropdown.approved'),'2'=>$i18n->get('dropdown.not_approved')), + 'empty'=>array(''=>$i18n->get('dropdown.all')) + )); +} + // Add timesheet assignment selector. $showTimesheetDropdown = $user->isPluginEnabled('ts') && ($user->can('view_own_timesheets') || $user->can('view_timesheets') || @@ -189,8 +202,8 @@ if ($showTimesheetDropdown) { 'data'=>array(TIMESHEET_NOT_ASSIGNED=>$i18n->get('form.reports.include_not_assigned'), TIMESHEET_ASSIGNED=>$i18n->get('form.reports.include_assigned'), TIMESHEET_PENDING=>$i18n->get('form.reports.include_pending'), - TIMESHEET_APPROVED=>$i18n->get('form.reports.include_approved'), - TIMESHEET_NOT_APPROVED=>$i18n->get('form.reports.include_not_approved')), + TIMESHEET_APPROVED=>$i18n->get('dropdown.approved'), + TIMESHEET_NOT_APPROVED=>$i18n->get('dropdown.not_approved')), 'empty'=>array(''=>$i18n->get('dropdown.all')) )); } @@ -279,6 +292,8 @@ if ($showWorkUnits) $form->addInput(array('type'=>'checkbox','name'=>'chunits')); if ($showTimesheetCheckbox) $form->addInput(array('type'=>'checkbox','name'=>'chtimesheet')); +if ($showApproved) + $form->addInput(array('type'=>'checkbox','name'=>'chapproved')); // Add a hidden control for timesheet_user_id (who to generate a timesheet for). if ($showTimesheetCheckbox) @@ -428,6 +443,7 @@ $smarty->assign('show_cf_1_checkbox', $showCustomFieldCheckbox); $smarty->assign('show_project', $showProject); $smarty->assign('show_task', $showTask); $smarty->assign('show_billable', $showBillable); +$smarty->assign('show_approved', $showApproved); $smarty->assign('show_invoice_dropdown', $showInvoiceDropdown); $smarty->assign('show_invoice_checkbox', $showInvoiceCheckbox); $smarty->assign('show_paid_status', $showPaidStatus);