From: Nik Okuntseff Date: Wed, 5 Dec 2018 17:29:56 +0000 (+0000) Subject: A bit more refactoring for subgroups. X-Git-Tag: timetracker_1.19-1~473 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=7b6cfb2cceac61a6e899590ac8ac9fa8cb326c6a;p=timetracker.git A bit more refactoring for subgroups. --- diff --git a/WEB-INF/templates/expenses.tpl b/WEB-INF/templates/expenses.tpl index 17b8c8fb..4eea0b8d 100644 --- a/WEB-INF/templates/expenses.tpl +++ b/WEB-INF/templates/expenses.tpl @@ -129,7 +129,7 @@ function recalculateCost() { {$forms.expensesForm.client.control} {/if} -{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} +{if $show_project} {$i18n.label.project} (*): {$forms.expensesForm.project.control} @@ -178,7 +178,7 @@ function recalculateCost() { {if $user->isPluginEnabled('cl')} {$i18n.label.client} {/if} - {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} + {if $show_project} {$i18n.label.project} {/if} {$i18n.label.item} @@ -190,7 +190,7 @@ function recalculateCost() { {if $user->isPluginEnabled('cl')} {$item.client|escape} {/if} - {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} + {if $show_project} {$item.project|escape} {/if} {$item.item|escape} diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 96fdee80..99e8d0ee 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.18.29.4591 | Copyright © Anuko | +  Anuko Time Tracker 1.18.29.4592 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/expenses.php b/expenses.php index fa844a22..eb11e73a 100644 --- a/expenses.php +++ b/expenses.php @@ -219,13 +219,14 @@ if ($request->isPost()) { } } +$smarty->assign('forms', array($form->getName()=>$form->toArray())); +$smarty->assign('show_project', $show_project); $smarty->assign('day_total', ttExpenseHelper::getTotalForDay($cl_date)); $smarty->assign('expense_items', ttExpenseHelper::getItems($cl_date)); $smarty->assign('predefined_expenses', $predefined_expenses); $smarty->assign('client_list', $client_list); $smarty->assign('project_list', $project_list); -$smarty->assign('forms', array($form->getName()=>$form->toArray())); -$smarty->assign('timestring', $selected_date->toString($user->date_format)); +$smarty->assign('timestring', $selected_date->toString($user->getDateFormat())); $smarty->assign('title', $i18n->get('title.expenses')); $smarty->assign('content_page_name', 'expenses.tpl'); $smarty->display('index.tpl');