mirror of
https://github.com/openvk/openvk
synced 2024-12-23 09:01:15 +03:00
9336a91623
Signed-off-by: Celestora <kitsuruko@gmail.com>
61 lines
2.1 KiB
XML
61 lines
2.1 KiB
XML
{extends "@layout.xml"}
|
|
|
|
{block title}
|
|
{_vouchers}
|
|
{/block}
|
|
|
|
{block headingWrap}
|
|
<a style="float: right;" class="aui-button aui-button-primary" href="/admin/vouchers/id0">
|
|
{_create}
|
|
</a>
|
|
|
|
<h1>{_vouchers}</h1>
|
|
{/block}
|
|
|
|
{block content}
|
|
<table class="aui aui-table-list">
|
|
<thead>
|
|
<tr>
|
|
<th>#</th>
|
|
<th>Серийный номер</th>
|
|
<th>Голоса</th>
|
|
<th>Рейгтинг</th>
|
|
<th>Осталось использований</th>
|
|
<th>Состояние</th>
|
|
<th>Действия</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr n:foreach="$vouchers as $voucher">
|
|
<td>{$voucher->getId()}</td>
|
|
<td>{$voucher->getFormattedToken()}</td>
|
|
<td>{$voucher->getCoins()}¢</td>
|
|
<td>{$voucher->getRating()}</td>
|
|
<td>{$voucher->getRemainingUsages() === INF ? "∞" : $voucher->getRemainingUsages()}</td>
|
|
<td>
|
|
{if $voucher->isExpired()}
|
|
<span class="aui-lozenge aui-lozenge-subtle aui-lozenge-removed">закончился</span>
|
|
{else}
|
|
<span class="aui-lozenge aui-lozenge-subtle aui-lozenge-success">активен</span>
|
|
{/if}
|
|
</td>
|
|
<td>
|
|
<a class="aui-button aui-button-primary" href="/admin/vouchers/id{$voucher->getId()}">
|
|
<span class="aui-icon aui-icon-small aui-iconfont-new-edit">Редактировать</span>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<br/>
|
|
|
|
<div align="right">
|
|
{var isLast = ((20 * (($_GET['p'] ?? 1) - 1)) + sizeof($vouchers)) < $count}
|
|
<a n:if="($_GET['p'] ?? 1) > 1" class="aui-button" href="?p={($_GET['p'] ?? 1) - 1}">
|
|
⭁ туда
|
|
</a>
|
|
<a n:if="$isLast" class="aui-button" href="?p={($_GET['p'] ?? 1) + 1}">
|
|
⭇ сюда
|
|
</a>
|
|
</div>
|
|
{/block}
|