X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=time.php;h=615f2ef901bdbc3e8fa427284d52f23a988a1bd1;hb=148dd13e6cf7978bcb2103fe0bc75387b61b3b86;hp=4f0d5918b0542016c738c029f860f045bce0f3e3;hpb=fe8af9a04f7170a0623915f31610c6c4c3df4058;p=timetracker.git diff --git a/time.php b/time.php index 4f0d5918..615f2ef9 100644 --- a/time.php +++ b/time.php @@ -304,8 +304,7 @@ if ($request->isPost()) { $err->add($i18n->get('error.field'), $i18n->get('label.duration')); } if (!ttValidString($cl_note, true)) $err->add($i18n->get('error.field'), $i18n->get('label.note')); - if ($user->isPluginEnabled('tp') && strpos($cl_note, '%req%') !== false) { - // A %req% element is found in note. They have to be replaced by user. + if ($user->isPluginEnabled('tp') && !ttValidTemplateText($cl_note)) { $err->add($i18n->get('error.field'), $i18n->get('label.note')); } if (!ttTimeHelper::canAdd()) $err->add($i18n->get('error.expired')); @@ -397,11 +396,15 @@ if ($request->isPost()) { } // isPost $week_total = ttTimeHelper::getTimeForWeek($selected_date); +$showFiles = $user->isPluginEnabled('at'); +$timeRecords = $showFiles? ttTimeHelper::getRecordsWithFiles($user_id, $cl_date) : ttTimeHelper::getRecords($user_id, $cl_date); $smarty->assign('selected_date', $selected_date); $smarty->assign('week_total', $week_total); $smarty->assign('day_total', ttTimeHelper::getTimeForDay($cl_date)); -$smarty->assign('time_records', ttTimeHelper::getRecords($user_id, $cl_date)); +$smarty->assign('time_records', $timeRecords); +$smarty->assign('show_cf_1', $user->isPluginEnabled('cf')); +$smarty->assign('show_files', $showFiles); $smarty->assign('client_list', $client_list); $smarty->assign('project_list', $project_list); $smarty->assign('task_list', $task_list);