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

72 lines
2.5 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_club_search}
2020-06-07 19:04:43 +03:00
{/block}
{block heading}
{_groups}
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 $clubs = iterator_to_array($clubs)}
{var $amount = sizeof($clubs)}
2020-06-07 19:04:43 +03:00
<table class="aui aui-table-list">
<thead>
<tr>
<th>ID</th>
<th>{_admin_title}</th>
<th>{_admin_author}</th>
<th>{_admin_description}</th>
<th>{_admin_shortcode}</th>
<th>{_admin_actions}</th>
2020-06-07 19:04:43 +03:00
</tr>
</thead>
<tbody>
<tr n:foreach="$clubs as $club">
<td>{$club->getId()}</td>
<td>
<span class="aui-avatar aui-avatar-xsmall">
<span class="aui-avatar-inner">
<img src="{$club->getAvatarUrl('miniscule')}" alt="{$club->getCanonicalName()}" style="object-fit: cover;" role="presentation" />
2020-06-07 19:04:43 +03:00
</span>
</span>
<a href="{$club->getURL()}">{$club->getCanonicalName()}</a>
</td>
<td>
2022-04-24 08:06:45 +03:00
{var $user = $club->getOwner()}
2020-06-07 19:04:43 +03:00
<span class="aui-avatar aui-avatar-xsmall">
<span class="aui-avatar-inner">
<img src="{$user->getAvatarUrl('miniscule')}" alt="{$user->getCanonicalName()}" role="presentation" />
2020-06-07 19:04:43 +03:00
</span>
</span>
<a href="{$user->getURL()}">{$user->getCanonicalName()}</a>
</td>
<td>{$club->getDescription() ?? "(" . tr("none") . ")"}</td>
2020-06-07 19:04:43 +03:00
<td>{$club->getShortCode()}</td>
<td>
<a class="aui-button aui-button-primary" href="/admin/clubs/id{$club->getId()}">
<span class="aui-icon aui-icon-small aui-iconfont-new-edit">{_edit}</span>
2020-06-07 19:04:43 +03:00
</a>
</td>
</tr>
</tbody>
</table>
<br/>
<div align="right">
2022-04-24 08:06:45 +03:00
{var $isLast = ((10 * (($_GET['p'] ?? 1) - 1)) + $amount) < $count}
2020-06-07 19:04:43 +03:00
<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}