Work in progress adding checks for enabled plugins for pages.
[timetracker.git] / WEB-INF / templates / mobile / users.tpl
index aab86d8..38c96ae 100644 (file)
           <td width="35%" class="tableHeader">{$i18n.label.person_name}</td>
           <td width="35%" class="tableHeader">{$i18n.label.login}</td>
           <td width="10%" class="tableHeader">{$i18n.form.users.role}</td>
-          <td width="10%" class="tableHeader">{$i18n.label.edit}</td>
         </tr>
   {if $active_users}
     {foreach $active_users as $u}
         <tr bgcolor="{cycle values="#f5f5f5,#dedee5"}">
-          <td>{$u.name|escape:'html'}</td>
+          <td>
+            {if $user->isManager()}
+              <a href="user_edit.php?id={$u.id}">{$u.name|escape:'html'}</a>
+            {else}
+              {if ($user->id == $u.id) || ($smarty.const.ROLE_CLIENT == $u.role) || ($smarty.const.ROLE_USER == $u.role)}
+                <a href="user_edit.php?id={$u.id}">{$u.name|escape:'html'}</a>
+              {else}
+                {$u.name|escape:'html'}
+              {/if}
+            {/if}
+          </td>
           <td>{$u.login|escape:'html'}</td>
       {if $smarty.const.ROLE_MANAGER == $u.role}
             <td>{$i18n.form.users.manager}</td>
             <td>{$i18n.label.client}</td>
       {elseif $smarty.const.ROLE_USER == $u.role}
             <td>{$i18n.label.user}</td>
-      {/if}
-      {if $user->isManager()}
-          <!-- Manager can edit everybody. -->
-          <td><a href="user_edit.php?id={$u.id}">{$i18n.label.edit}</a></td>
-      {else}
-          <!--  Comanager can edit self and clients or users but not manager and other comanagers. -->
-          <td>{if ($user->id == $u.id) || ($smarty.const.ROLE_CLIENT == $u.role) || ($smarty.const.ROLE_USER == $u.role)}<a href="user_edit.php?id={$u.id}">{$i18n.label.edit}</a>{/if}</td>
       {/if}
         </tr>
     {/foreach}
           <td width="35%" class="tableHeader">{$i18n.label.login}</td>
           <td width="10%" class="tableHeader">{$i18n.form.users.role}</td>
           <td width="10%" class="tableHeader">{$i18n.label.edit}</td>
-          <td width="10%" class="tableHeader">{$i18n.label.delete}</td>
         </tr>
     {foreach $inactive_users as $u}
         <tr bgcolor="{cycle values="#f5f5f5,#dedee5"}">
-          <td>{$u.name|escape:'html'}</td>
+          <td>
+            {if $user->isManager()}
+              <a href="user_edit.php?id={$u.id}">{$u.name|escape:'html'}</a>
+            {else}
+              {if ($user->id == $u.id) || ($smarty.const.ROLE_CLIENT == $u.role) || ($smarty.const.ROLE_USER == $u.role)}<a href="user_edit.php?id={$u.id}">{$u.name|escape:'html'}</a>{/if}
+            {/if}
+          </td>
           <td>{$u.login|escape:'html'}</td>
       {if $smarty.const.ROLE_MANAGER == $u.role}
             <td>{$i18n.form.users.manager}</td>
       {if $user->isManager()}
           <!-- Manager can edit everybody. -->
           <td><a href="user_edit.php?id={$u.id}">{$i18n.label.edit}</a></td>
-          <td>{if $smarty.const.ROLE_MANAGER != $u.role || $can_delete_manager}<a href="user_delete.php?id={$u.id}">{$i18n.label.delete}</a>{/if}</td>
       {else}
           <!--  Comanager can edit self and clients or users but not manager and other comanagers. -->
           <td>{if ($user->id == $u.id) || ($smarty.const.ROLE_CLIENT == $u.role) || ($smarty.const.ROLE_USER == $u.role)}<a href="user_edit.php?id={$u.id}">{$i18n.label.edit}</a>{/if}</td>
-          <td>{if ($user->id == $u.id) || ($smarty.const.ROLE_CLIENT == $u.role) || ($smarty.const.ROLE_USER == $u.role)}<a href="user_delete.php?id={$u.id}">{$i18n.label.delete}</a>{/if}</td>
       {/if}
         </tr>
     {/foreach}