<br>
<table cellspacing="0" cellpadding="4" width="100%" border="0">
<tr>
- <td align="center"> Anuko Time Tracker 1.18.37.4744 | Copyright © <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+ <td align="center"> Anuko Time Tracker 1.18.37.4745 | Copyright © <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>
else
$user_id = $users_for_client[0]['id']; // First found user for a client.
}
-
-
$group_id = $user->getGroup();
// Elements of timesheetsForm.
$form = new Form('timesheetsForm');
-if ($user->can('view_timesheets') || $user->can('view_all_timesheets') || $user->can('manage_timesheets') || $user->can('manage_all_timesheets')) {
- $rank = $user->getMaxRankForGroup($group_id);
- if ($user->can('track_own_time'))
- $options = array('group_id'=>$group_id,'status'=>ACTIVE,'max_rank'=>$rank,'include_self'=>true,'self_first'=>true);
- else
- $options = array('group_id'=>$group_id,'status'=>ACTIVE,'max_rank'=>$rank);
- $user_list = $user->getUsers($options);
+if ($user->can('view_timesheets') || $user->can('view_all_timesheets') || $user->can('view_client_timesheets')) {
+ // Prepare user list for dropdown.
+ if ($notClient) {
+ $rank = $user->can('view_all_timesheets') ? MAX_RANK : $user->getMaxRankForGroup($group_id);
+ if ($user->can('view_own_timesheets'))
+ $options = array('max_rank'=>$rank,'include_self'=>true,'self_first'=>true);
+ else
+ $options = array('max_rank'=>$rank);
+ $user_list = $user->getUsers($options);
+ } else
+ $user_list = $users_for_client; // Obtained above.
+
if (count($user_list) >= 1) {
$form->addInput(array('type'=>'combobox',
'onchange'=>'document.timesheetsForm.user_changed.value=1;document.timesheetsForm.submit();',