From: Nik Okuntseff Date: Thu, 21 Feb 2019 23:16:53 +0000 (+0000) Subject: Some more work in progress on timesheets. X-Git-Tag: timetracker_1.19-1~297 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=887a005ea99f044d266f489632b0a94a4acc99b2;p=timetracker.git Some more work in progress on timesheets. --- diff --git a/WEB-INF/lib/ttTimesheetHelper.class.php b/WEB-INF/lib/ttTimesheetHelper.class.php index 94b9beff..07f02f86 100644 --- a/WEB-INF/lib/ttTimesheetHelper.class.php +++ b/WEB-INF/lib/ttTimesheetHelper.class.php @@ -215,7 +215,7 @@ class ttTimesheetHelper { if ($user->isClient()) $client_part = "and ts.client_id = $user->client_id"; $sql = "select ts.id, ts.user_id, u.name as user_name, ts.client_id, c.name as client_name,". - " ts.name, ts.submitter_comment from tt_timesheets ts". + " ts.name, ts.submitter_comment, ts.submit_status from tt_timesheets ts". " left join tt_users u on (u.id = ts.user_id)". " left join tt_clients c on (c.id = ts.client_id)". " where ts.id = $timesheet_id and ts.group_id = $group_id and ts.org_id = $org_id $client_part and ts.status is not null"; diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 37f3de1e..86ccb33f 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- {/if} -{if $timesheet['submitter_comment']} +{if $not_client} + + {if $timesheet['submitter_comment']} + {/if} {/if}
 Anuko Time Tracker 1.18.37.4750 | Copyright © Anuko | +  Anuko Time Tracker 1.18.37.4751 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/timesheet_view.tpl b/WEB-INF/templates/timesheet_view.tpl index dbdd42de..c22df7ac 100644 --- a/WEB-INF/templates/timesheet_view.tpl +++ b/WEB-INF/templates/timesheet_view.tpl @@ -11,8 +11,11 @@ {if $timesheet['client_id']}
{$i18n.label.client}: {$timesheet['client_name']|escape}
{$i18n.label.submitted}: {if $timesheet.submit_status}{$i18n.label.yes}{else}{$i18n.label.no}{/if}
{$i18n.label.comment}: {$timesheet['submitter_comment']|escape}
diff --git a/timesheet_view.php b/timesheet_view.php index bbac161c..80b3b77a 100644 --- a/timesheet_view.php +++ b/timesheet_view.php @@ -50,7 +50,9 @@ if (!$timesheet) { $options = ttTimesheetHelper::getReportOptions($timesheet); $subtotals = ttReportHelper::getSubtotals($options); $totals = ttReportHelper::getTotals($options); +$notClient = !$user->isClient(); +$smarty->assign('not_client', $notClient); $smarty->assign('group_by_header', ttReportHelper::makeGroupByHeader($options)); $smarty->assign('timesheet', $timesheet); $smarty->assign('subtotals', $subtotals);