From: Nik Okuntseff Date: Sun, 25 Nov 2018 22:23:03 +0000 (+0000) Subject: Starting to use on behalf group properties. X-Git-Tag: timetracker_1.19-1~548 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=d374f7228d4ece31f60028d798f6dbdef78f7925;p=timetracker.git Starting to use on behalf group properties. --- diff --git a/WEB-INF/lib/ttGroup.class.php b/WEB-INF/lib/ttGroup.class.php index 2943438a..c12be778 100644 --- a/WEB-INF/lib/ttGroup.class.php +++ b/WEB-INF/lib/ttGroup.class.php @@ -84,8 +84,8 @@ class ttGroup { $this->date_format = $val['date_format']; $this->time_format = $val['time_format']; $this->week_start = $val['week_start']; - /* TODO: initialize other things here. $this->tracking_mode = $val['tracking_mode']; + /* TODO: initialize other things here. $this->project_required = $val['project_required']; $this->task_required = $val['task_required']; $this->record_type = $val['record_type']; diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index ccd1f961..5f97ae28 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -166,6 +166,16 @@ class ttUser { } } + // getDecimalMark returns decimal mark for active group. + function getDecimalMark() { + return ($this->behalfGroup ? $this->behalfGroup->decimal_mark : $this->decimal_mark); + } + + // getTrackingMode returns tracking mode for active group. + function getTrackingMode() { + return ($this->behalfGroup ? $this->behalfGroup->tracking_mode : $this->tracking_mode); + } + // The getActiveUser returns user id on behalf of whom the current user is operating. function getActiveUser() { return ($this->behalf_id ? $this->behalf_id : $this->id); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 13992f25..bd293c45 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- - + -{if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} +{if ($smarty.const.MODE_PROJECTS == $user->getTrackingMode() || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->getTrackingMode())}
 Anuko Time Tracker 1.18.28.4517 | Copyright © Anuko | +  Anuko Time Tracker 1.18.28.4518 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/user_add.tpl b/WEB-INF/templates/user_add.tpl index e1a05350..762f0528 100644 --- a/WEB-INF/templates/user_add.tpl +++ b/WEB-INF/templates/user_add.tpl @@ -78,10 +78,10 @@ function handleClientControl() { {$forms.userForm.role.control} {$forms.userForm.client.control}
{$i18n.form.users.default_rate} (0{$user->decimal_mark}00):{$i18n.form.users.default_rate} (0{$user->getDecimalMark()}00): {$forms.userForm.rate.control}
{$i18n.label.projects}: {$forms.userForm.projects.control}