-{if $user->canManageTeam()}
+{if $user->can('manage_users')}
+ {if $group_dropdown}
+{$forms.usersForm.open} {* usersForm consists only of one dropdown group control *}
+
+
+ {$i18n.label.group}: {$forms.usersForm.group.control} |
+
+
+{$forms.usersForm.close}
+ {/if}
+
{if $inactive_users}
{/if}
-
-
-
+
+
+
@@ -21,29 +31,19 @@
{foreach $active_users as $u}
- {if $user->uncompleted_indicators}
+ {if $uncompleted_indicators}
{/if}
{$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}
- {if $user->isManager()}
-
+ {$u.role_name|escape} |
+ {if $u.group_id != $user->group_id || $u.rank < $user->rank || ($u.rank == $user->rank && $u.id == $user->id)}
{$i18n.label.edit} |
- {if $smarty.const.ROLE_MANAGER != $u.role || $can_delete_manager}{$i18n.label.delete}{/if} |
+ {if $u.id != $user->id}{$i18n.label.delete} | {else} | {/if}
{else}
-
- {if ($user->id == $u.id) || ($smarty.const.ROLE_CLIENT == $u.role) || ($smarty.const.ROLE_USER == $u.role)}{$i18n.label.edit}{/if} |
- {if ($user->id == $u.id) || ($smarty.const.ROLE_CLIENT == $u.role) || ($smarty.const.ROLE_USER == $u.role)}{$i18n.label.delete}{/if} |
+ |
+ |
{/if}
{/foreach}
@@ -53,7 +53,7 @@
@@ -62,9 +62,9 @@
-
-
-
+
+
+
@@ -72,23 +72,13 @@
{$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}
- {if $user->isManager()}
-
+ {$u.role_name|escape} |
+ {if $u.group_id != $user->group_id || $u.rank < $user->rank}
{$i18n.label.edit} |
- {if $smarty.const.ROLE_MANAGER != $u.role || $can_delete_manager}{$i18n.label.delete}{/if} |
+ {$i18n.label.delete} |
{else}
-
- {if ($user->id == $u.id) || ($smarty.const.ROLE_CLIENT == $u.role) || ($smarty.const.ROLE_USER == $u.role)}{$i18n.label.edit}{/if} |
- {if ($user->id == $u.id) || ($smarty.const.ROLE_CLIENT == $u.role) || ($smarty.const.ROLE_USER == $u.role)}{$i18n.label.delete}{/if} |
+ |
+ |
{/if}
{/foreach}
@@ -98,7 +88,7 @@
@@ -114,15 +104,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}
|