]> wagnertech.de Git - timetracker.git/commitdiff
A few fixes to users pages for subgroups.
authorNik Okuntseff <support@anuko.com>
Wed, 12 Dec 2018 18:48:35 +0000 (18:48 +0000)
committerNik Okuntseff <support@anuko.com>
Wed, 12 Dec 2018 18:48:35 +0000 (18:48 +0000)
WEB-INF/templates/footer.tpl
WEB-INF/templates/mobile/users.tpl
mobile/users.php
users.php

index d7560f9309139bd0e570c8c70e93f9bbf1de3bf8..51675b024fb2b793cdf727f26d9d7db187eebc0b 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.29.4637 | 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.29.4638 | 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 ae04bd448a30a9ae16adb88efc97918e4abc1ffb..b3af8e206db891ee9e3c41820607a5afc5613953 100644 (file)
@@ -22,7 +22,7 @@
             {if $uncompleted_indicators}
               <span class="uncompleted-entry{if $u.has_uncompleted_entry} active{/if}"{if $u.has_uncompleted_entry} title="{$i18n.form.users.uncompleted_entry}"{/if}></span>
             {/if}
             {if $uncompleted_indicators}
               <span class="uncompleted-entry{if $u.has_uncompleted_entry} active{/if}"{if $u.has_uncompleted_entry} title="{$i18n.form.users.uncompleted_entry}"{/if}></span>
             {/if}
-            {if $u.rank < $user->rank || ($u.rank == $user->rank && $u.id == $user->id)}
+            {if $u.group_id != $user->group_id || $u.rank < $user->rank || ($u.rank == $user->rank && $u.id == $user->id)}
               <a href="user_edit.php?id={$u.id}">{$u.name|escape}</a>
             {else}
               {$u.name|escape}
               <a href="user_edit.php?id={$u.id}">{$u.name|escape}</a>
             {else}
               {$u.name|escape}
@@ -54,7 +54,7 @@
     {foreach $inactive_users as $u}
         <tr bgcolor="{cycle values="#f5f5f5,#ffffff"}">
           <td>
     {foreach $inactive_users as $u}
         <tr bgcolor="{cycle values="#f5f5f5,#ffffff"}">
           <td>
-            {if $u.rank < $user->rank}
+            {if $u.group_id != $user->group_id || $u.rank < $user->rank}
               <a href="user_edit.php?id={$u.id}">{$u.name|escape}</a>
             {else}
               {$u.name|escape}
               <a href="user_edit.php?id={$u.id}">{$u.name|escape}</a>
             {else}
               {$u.name|escape}
index 0c54751de7e41f66f58b24e6fc8a4ae5385959d3..d6d08457ae1dfe14cb4109f2de1e076391777ed4 100644 (file)
@@ -40,15 +40,16 @@ if (!(ttAccessAllowed('view_users') || ttAccessAllowed('manage_users'))) {
 // End of access checks.
 
 // Prepare a list of active users.
 // End of access checks.
 
 // Prepare a list of active users.
+$rank = $user->getMaxRankForGroup($user->getGroup());
 if ($user->can('view_users'))
   $options = array('status'=>ACTIVE,'include_clients'=>true,'include_login'=>true,'include_role'=>true);
 else /* if ($user->can('manage_users')) */
 if ($user->can('view_users'))
   $options = array('status'=>ACTIVE,'include_clients'=>true,'include_login'=>true,'include_role'=>true);
 else /* if ($user->can('manage_users')) */
-  $options = array('status'=>ACTIVE,'max_rank'=>$user->rank-1,'include_clients'=>true,'include_self'=>true,'include_login'=>true,'include_role'=>true);
+  $options = array('status'=>ACTIVE,'max_rank'=>$rank,'include_clients'=>true,'include_self'=>true,'include_login'=>true,'include_role'=>true);
 $active_users = $user->getUsers($options);
 
 // Prepare a list of inactive users.
 if($user->can('manage_users')) {
 $active_users = $user->getUsers($options);
 
 // Prepare a list of inactive users.
 if($user->can('manage_users')) {
-  $options = array('status'=>INACTIVE,'max_rank'=>$user->rank-1,'include_clients'=>true,'include_login'=>true,'include_role'=>true);
+  $options = array('status'=>INACTIVE,'max_rank'=>$rank,'include_clients'=>true,'include_login'=>true,'include_role'=>true);
   $inactive_users = $user->getUsers($options);
 }
 
   $inactive_users = $user->getUsers($options);
 }
 
index d19ba7de6f46a105b439fa1776c5cc41c6e667ff..fd9e7593fb30c941858390f6d321b98a2c9ba120 100644 (file)
--- a/users.php
+++ b/users.php
@@ -39,15 +39,16 @@ if (!(ttAccessAllowed('view_users') || ttAccessAllowed('manage_users'))) {
 // End of access checks.
 
 // Prepare a list of active users.
 // End of access checks.
 
 // Prepare a list of active users.
+$rank = $user->getMaxRankForGroup($user->getGroup());
 if ($user->can('view_users'))
   $options = array('status'=>ACTIVE,'include_clients'=>true,'include_login'=>true,'include_role'=>true);
 else /* if ($user->can('manage_users')) */
 if ($user->can('view_users'))
   $options = array('status'=>ACTIVE,'include_clients'=>true,'include_login'=>true,'include_role'=>true);
 else /* if ($user->can('manage_users')) */
-  $options = array('status'=>ACTIVE,'max_rank'=>$user->rank-1,'include_clients'=>true,'include_self'=>true,'include_login'=>true,'include_role'=>true);
+  $options = array('status'=>ACTIVE,'max_rank'=>$rank,'include_clients'=>true,'include_self'=>true,'include_login'=>true,'include_role'=>true);
 $active_users = $user->getUsers($options);
 
 // Prepare a list of inactive users.
 if($user->can('manage_users')) {
 $active_users = $user->getUsers($options);
 
 // Prepare a list of inactive users.
 if($user->can('manage_users')) {
-  $options = array('status'=>INACTIVE,'max_rank'=>$user->rank-1,'include_clients'=>true,'include_login'=>true,'include_role'=>true);
+  $options = array('status'=>INACTIVE,'max_rank'=>$rank,'include_clients'=>true,'include_login'=>true,'include_role'=>true);
   $inactive_users = $user->getUsers($options);
 }
 
   $inactive_users = $user->getUsers($options);
 }