]> wagnertech.de Git - timetracker.git/commitdiff
Starting to use on behalf group properties.
authorNik Okuntseff <support@anuko.com>
Sun, 25 Nov 2018 22:23:03 +0000 (22:23 +0000)
committerNik Okuntseff <support@anuko.com>
Sun, 25 Nov 2018 22:23:03 +0000 (22:23 +0000)
WEB-INF/lib/ttGroup.class.php
WEB-INF/lib/ttUser.class.php
WEB-INF/templates/footer.tpl
WEB-INF/templates/user_add.tpl

index 2943438a692a0746bc3c177b0536a4ff0dbc89e6..c12be77886a53308d801f77d299335b07bca18ec 100644 (file)
@@ -84,8 +84,8 @@ class ttGroup {
       $this->date_format = $val['date_format'];
       $this->time_format = $val['time_format'];
       $this->week_start = $val['week_start'];
       $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'];
       $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'];
       $this->project_required = $val['project_required'];
       $this->task_required = $val['task_required'];
       $this->record_type = $val['record_type'];
index ccd1f961e46cc0374797f5306067089ef22a3266..5f97ae28b4dde7270c1ae88408b9312c78d64ab5 100644 (file)
@@ -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);
   // 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);
index 13992f25f505918c1a8358611356e096eb2d2b76..bd293c455d1c85556bb7cfd7910d1e34a0e85df0 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.18.28.4517 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.18.28.4518 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
index e1a0535028e0bdaec355a2eb5dd582c946d00fdc..762f0528e481c873bba9587129b5539efa2f9c76 100644 (file)
@@ -78,10 +78,10 @@ function handleClientControl() {
       <td>{$forms.userForm.role.control} {$forms.userForm.client.control}</td>
     </tr>
     <tr>
       <td>{$forms.userForm.role.control} {$forms.userForm.client.control}</td>
     </tr>
     <tr>
-      <td align="right">{$i18n.form.users.default_rate}&nbsp;(0{$user->decimal_mark}00):</td>
+      <td align="right">{$i18n.form.users.default_rate}&nbsp;(0{$user->getDecimalMark()}00):</td>
       <td>{$forms.userForm.rate.control}</td>
     </tr>
       <td>{$forms.userForm.rate.control}</td>
     </tr>
-{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())}
     <tr valign="top">
       <td align="right">{$i18n.label.projects}:</td>
       <td>{$forms.userForm.projects.control}</td>
     <tr valign="top">
       <td align="right">{$i18n.label.projects}:</td>
       <td>{$forms.userForm.projects.control}</td>