X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=WEB-INF%2Ftemplates%2Fmobile%2Fusers.tpl;h=e2b815f1b35f2dc82cd3b8202cb3c16dbcf8ff4f;hb=32e0397e34d3092eb2b89411ab97ee288f88038a;hp=5ca38fedf8200eb5b8bc0a0209048a056e500d97;hpb=e3ed046e205a14772a8157def21fea9a14acdde8;p=timetracker.git
diff --git a/WEB-INF/templates/mobile/users.tpl b/WEB-INF/templates/mobile/users.tpl
index 5ca38fed..e2b815f1 100644
--- a/WEB-INF/templates/mobile/users.tpl
+++ b/WEB-INF/templates/mobile/users.tpl
@@ -5,7 +5,7 @@
-{if $user->canManageTeam()}
+{if $user->can('manage_users')}
{if $inactive_users}
@@ -22,26 +22,14 @@
{if $user->uncompleted_indicators}
{/if}
- {if $user->isManager()}
+ {if $u.rank < $user->rank || ($u.rank == $user->rank && $u.id == $user->id)}
{$u.name|escape}
{else}
- {if ($user->id == $u.id) || ($smarty.const.ROLE_CLIENT == $u.role) || ($smarty.const.ROLE_USER == $u.role)}
- {$u.name|escape}
- {else}
- {$u.name|escape}
- {/if}
+ {$u.name|escape}
{/if}
{$u.login|escape} |
- {if $smarty.const.ROLE_MANAGER == $u.role}
- {$i18n.form.users.manager} |
- {elseif $smarty.const.ROLE_COMANAGER == $u.role}
- {$i18n.form.users.comanager} |
- {elseif $smarty.const.ROLE_CLIENT == $u.role}
- {$i18n.label.client} |
- {elseif $smarty.const.ROLE_USER == $u.role}
- {$i18n.label.user} |
- {/if}
+ {$u.role_name|escape} |
{/foreach}
{/if}
@@ -50,55 +38,38 @@
{if $inactive_users}
-
+
-
{foreach $inactive_users as $u}
- {if $user->isManager()}
+ {if $u.rank < $user->rank}
{$u.name|escape}
{else}
- {if ($user->id == $u.id) || ($smarty.const.ROLE_CLIENT == $u.role) || ($smarty.const.ROLE_USER == $u.role)}{$u.name|escape}{/if}
+ {$u.name|escape}
{/if}
|
{$u.login|escape} |
- {if $smarty.const.ROLE_MANAGER == $u.role}
- {$i18n.form.users.manager} |
- {elseif $smarty.const.ROLE_COMANAGER == $u.role}
- {$i18n.form.users.comanager} |
- {elseif $smarty.const.ROLE_CLIENT == $u.role}
- {$i18n.label.client} |
- {elseif $smarty.const.ROLE_USER == $u.role}
- {$i18n.label.user} |
- {/if}
- {if $user->isManager()}
-
- {$i18n.label.edit} |
- {else}
-
- {if ($user->id == $u.id) || ($smarty.const.ROLE_CLIENT == $u.role) || ($smarty.const.ROLE_USER == $u.role)}{$i18n.label.edit}{/if} |
- {/if}
+ {$u.role_name|escape} |
{/foreach}
-
@@ -114,15 +85,7 @@
{$u.name|escape} |
{$u.login|escape} |
- {if $smarty.const.ROLE_MANAGER == $u.role}
- {$i18n.form.users.manager} |
- {elseif $smarty.const.ROLE_COMANAGER == $u.role}
- {$i18n.form.users.comanager} |
- {elseif $smarty.const.ROLE_CLIENT == $u.role}
- {$i18n.label.client} |
- {elseif $smarty.const.ROLE_USER == $u.role}
- {$i18n.label.user} |
- {/if}
+ {$u.role_name|escape} |
{/foreach}
|