X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=WEB-INF%2Ftemplates%2Fmobile%2Fusers.tpl;h=b3af8e206db891ee9e3c41820607a5afc5613953;hb=0c4f2c49ae759b4f4f9b5002d0a413f89b6498e6;hp=f4a8ec54634774558368c6c422b013a86baf32f7;hpb=4c32352c1c34231ff49937b751c491c4a0880328;p=timetracker.git
diff --git a/WEB-INF/templates/mobile/users.tpl b/WEB-INF/templates/mobile/users.tpl
index f4a8ec54..b3af8e20 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}
@@ -19,29 +19,17 @@
{foreach $active_users as $u}
- {if $user->uncompleted_indicators}
+ {if $uncompleted_indicators}
{/if}
- {if $user->isManager()}
+ {if $u.group_id != $user->group_id || $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}
@@ -56,43 +44,26 @@
{if $inactive_users}
-
+
-
{foreach $inactive_users as $u}
- {if $user->isManager()}
+ {if $u.group_id != $user->group_id || $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}
|