openvk/Web/Presenters/templates/Admin/Users.xml

71 lines
2.6 KiB
XML
Raw Permalink Normal View History

2020-06-07 19:04:43 +03:00
{extends "@layout.xml"}
2022-04-24 08:06:45 +03:00
{var $search = true}
2020-06-07 19:04:43 +03:00
{block title}
{_admin_user_search}
2020-06-07 19:04:43 +03:00
{/block}
{block heading}
{_users}
2020-06-07 19:04:43 +03:00
{/block}
{block searchTitle}
{include title}
{/block}
2020-06-07 19:04:43 +03:00
{block content}
2022-04-24 08:06:45 +03:00
{var $users = iterator_to_array($users)}
{var $amount = sizeof($users)}
2020-06-07 19:04:43 +03:00
<table class="aui aui-table-list">
<thead>
<tr>
<th>ID</th>
<th>UUID</th>
<th>{_admin_name}</th>
<th>{_gender}</th>
<th>{_admin_shortcode}</th>
<th>{_registration_date}</th>
<th>{_admin_actions}</th>
2020-06-07 19:04:43 +03:00
</tr>
</thead>
<tbody>
<tr n:foreach="$users as $user">
<td>{$user->getId()}</td>
<td>{$user->getChandlerGUID()}</td>
2020-06-07 19:04:43 +03:00
<td>
<span class="aui-avatar aui-avatar-xsmall">
<span class="aui-avatar-inner">
<img src="{$user->getAvatarUrl('miniscule')}" alt="{$user->getCanonicalName()}" style="object-fit: cover;" role="presentation" />
2020-06-07 19:04:43 +03:00
</span>
</span>
2020-06-07 19:04:43 +03:00
<a href="{$user->getURL()}">{$user->getCanonicalName()}</a>
<span n:if="$user->isBanned()" class="aui-lozenge aui-lozenge-subtle aui-lozenge-removed">{_admin_banned}</span>
2020-06-07 19:04:43 +03:00
</td>
<td>{$user->isFemale() ? tr("female") : tr("male")}</td>
<td>{$user->getShortCode() ?? "(" . tr("none") . ")"}</td>
2020-06-07 19:04:43 +03:00
<td>{$user->getRegistrationTime()}</td>
<td>
<a class="aui-button aui-button-primary" href="/admin/users/id{$user->getId()}">
<span class="aui-icon aui-icon-small aui-iconfont-new-edit">{_edit}</span>
2020-06-07 19:04:43 +03:00
</a>
2021-09-11 19:25:57 +03:00
{if $thisUser->getChandlerUser()->can("substitute")->model('openvk\Web\Models\Entities\User')->whichBelongsTo(0)}
<a class="aui-button" href="/setSID/{$user->getChandlerUser()->getId()}?hash={rawurlencode($csrfToken)}">
<span class="aui-icon aui-icon-small aui-iconfont-sign-in">{_admin_loginas}</span>
</a>
{/if}
2020-06-07 19:04:43 +03:00
</td>
</tr>
</tbody>
</table>
<br/>
<div align="right">
2022-04-24 08:06:45 +03:00
{var $isLast = ((20 * (($_GET['p'] ?? 1) - 1)) + $amount) < $count}
<a n:if="($_GET['p'] ?? 1) > 1" class="aui-button" href="?p={($_GET['p'] ?? 1) - 1}">&laquo;</a>
<a n:if="$isLast" class="aui-button" href="?p={($_GET['p'] ?? 1) + 1}">&raquo;</a>
2020-06-07 19:04:43 +03:00
</div>
{/block}