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
|
|
|
*}
|
|
|
|
|
2016-01-19 04:34:44 +02:00
|
|
|
{component_define_params params=[ 'users', 'pagination' ]}
|
|
|
|
|
|
|
|
{if $users}
|
2014-11-05 17:45:27 +02:00
|
|
|
<form method="post" enctype="multipart/form-data">
|
2015-04-29 10:08:20 +03:00
|
|
|
<table class="ls-table">
|
2014-11-05 17:45:27 +02:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="cell-name"></th>
|
2015-10-28 13:00:45 +02:00
|
|
|
<th class="ls-ta-c">{$aLang.blog.admin.role_administrator}</th>
|
|
|
|
<th class="ls-ta-c">{$aLang.blog.admin.role_moderator}</th>
|
|
|
|
<th class="ls-ta-c">{$aLang.blog.admin.role_reader}</th>
|
|
|
|
<th class="ls-ta-c">{$aLang.blog.admin.role_banned}</th>
|
2014-11-05 17:45:27 +02:00
|
|
|
</tr>
|
|
|
|
</thead>
|
2014-07-01 19:17:01 +03:00
|
|
|
|
2014-11-05 17:45:27 +02:00
|
|
|
<tbody>
|
2016-01-19 04:34:44 +02:00
|
|
|
{foreach $users as $blogUser}
|
2014-11-05 17:45:27 +02:00
|
|
|
{$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-04-29 10:08:20 +03:00
|
|
|
{component 'user' template='avatar' user=$user mods='inline' size='xxsmall'}
|
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()}
|
2015-10-28 13:00:45 +02:00
|
|
|
<td colspan="10" class="ls-ta-c">—</td>
|
2014-11-05 17:45:27 +02:00
|
|
|
{else}
|
2015-10-28 13:00:45 +02:00
|
|
|
<td class="ls-ta-c"><input type="radio" name="user_rank[{$user->getId()}]" value="administrator" {if $blogUser->getIsAdministrator()}checked{/if} /></td>
|
|
|
|
<td class="ls-ta-c"><input type="radio" name="user_rank[{$user->getId()}]" value="moderator" {if $blogUser->getIsModerator()}checked{/if} /></td>
|
|
|
|
<td class="ls-ta-c"><input type="radio" name="user_rank[{$user->getId()}]" value="reader" {if $blogUser->getUserRole() == $BLOG_USER_ROLE_USER}checked{/if} /></td>
|
|
|
|
<td class="ls-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
|
|
|
|
2016-01-19 04:34:44 +02:00
|
|
|
{component 'pagination' total=+$pagination.iCountPage current=+$pagination.iCurrentPage url="{$pagination.sBaseUrl}/page__page__/{$pagination.sGetParams}"}
|
2014-07-01 19:17:01 +03:00
|
|
|
{else}
|
2015-04-08 14:41:06 +03:00
|
|
|
{component 'blankslate' text=$aLang.blog.admin.alerts.empty}
|
2014-07-01 19:17:01 +03:00
|
|
|
{/if}
|