2014-07-01 19:17:01 +03:00
|
|
|
{**
|
|
|
|
* Управление пользователями блога
|
2014-11-05 17:45:27 +02:00
|
|
|
*
|
|
|
|
* @param object $users
|
|
|
|
* @param array $pagination
|
2014-07-01 19:17:01 +03:00
|
|
|
*}
|
|
|
|
|
2014-11-05 17:45:27 +02:00
|
|
|
{if $smarty.local.users}
|
|
|
|
<form method="post" enctype="multipart/form-data">
|
|
|
|
<table class="table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="cell-name"></th>
|
|
|
|
<th class="ta-c">{$aLang.blog.admin.role_administrator}</th>
|
|
|
|
<th class="ta-c">{$aLang.blog.admin.role_moderator}</th>
|
|
|
|
<th class="ta-c">{$aLang.blog.admin.role_reader}</th>
|
|
|
|
<th class="ta-c">{$aLang.blog.admin.role_banned}</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
2014-07-01 19:17:01 +03:00
|
|
|
|
2014-11-05 17:45:27 +02:00
|
|
|
<tbody>
|
|
|
|
{foreach $smarty.local.users as $blogUser}
|
|
|
|
{$user = $blogUser->getUser()}
|
2014-07-01 19:17:01 +03:00
|
|
|
|
2014-11-05 17:45:27 +02:00
|
|
|
<tr>
|
|
|
|
<td class="cell-name">
|
2015-01-03 10:19:49 +02:00
|
|
|
{component 'user' template='item' user=$user}
|
2014-11-05 17:45:27 +02:00
|
|
|
</td>
|
2014-07-01 19:17:01 +03:00
|
|
|
|
2014-11-05 17:45:27 +02:00
|
|
|
{if $user->getId() == $oUserCurrent->getId()}
|
|
|
|
<td colspan="10" class="ta-c">—</td>
|
|
|
|
{else}
|
2014-12-01 09:30:28 +02:00
|
|
|
<td class="ta-c"><input type="radio" name="user_rank[{$user->getId()}]" value="administrator" {if $blogUser->getIsAdministrator()}checked{/if} /></td>
|
|
|
|
<td class="ta-c"><input type="radio" name="user_rank[{$user->getId()}]" value="moderator" {if $blogUser->getIsModerator()}checked{/if} /></td>
|
|
|
|
<td class="ta-c"><input type="radio" name="user_rank[{$user->getId()}]" value="reader" {if $blogUser->getUserRole() == $BLOG_USER_ROLE_USER}checked{/if} /></td>
|
|
|
|
<td class="ta-c"><input type="radio" name="user_rank[{$user->getId()}]" value="ban" {if $blogUser->getUserRole() == $BLOG_USER_ROLE_BAN}checked{/if} /></td>
|
2014-11-05 17:45:27 +02:00
|
|
|
{/if}
|
|
|
|
</tr>
|
|
|
|
{/foreach}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2014-07-01 19:17:01 +03:00
|
|
|
|
2014-11-05 17:45:27 +02:00
|
|
|
{* Скрытые поля *}
|
2015-01-03 10:19:49 +02:00
|
|
|
{component 'field' template='hidden.security-key'}
|
2014-07-01 19:17:01 +03:00
|
|
|
|
2014-11-05 17:45:27 +02:00
|
|
|
{* Кнопки *}
|
2015-01-03 10:19:49 +02:00
|
|
|
{component 'button' name='submit_blog_admin' text=$aLang.common.save mods='primary'}
|
2014-11-05 17:45:27 +02:00
|
|
|
</form>
|
2014-07-01 19:17:01 +03:00
|
|
|
|
2015-01-03 10:19:49 +02:00
|
|
|
{component 'pagination' paging=$smarty.local.pagination}
|
2014-07-01 19:17:01 +03:00
|
|
|
{else}
|
2015-01-03 10:19:49 +02:00
|
|
|
{component 'alert' text=$aLang.blog.admin.alerts.empty mods='empty'}
|
2014-07-01 19:17:01 +03:00
|
|
|
{/if}
|