2021-10-07 11:47:30 +03:00
|
|
|
{extends "@layout.xml"}
|
|
|
|
|
|
|
|
{block title}
|
|
|
|
{_vouchers}
|
|
|
|
{/block}
|
|
|
|
|
2021-10-07 11:48:55 +03:00
|
|
|
{block headingWrap}
|
|
|
|
<a style="float: right;" class="aui-button aui-button-primary" href="/admin/vouchers/id0">
|
|
|
|
{_create}
|
|
|
|
</a>
|
2022-04-24 09:02:23 +03:00
|
|
|
|
2021-10-07 11:48:55 +03:00
|
|
|
<h1>{_vouchers}</h1>
|
2021-10-07 11:47:30 +03:00
|
|
|
{/block}
|
|
|
|
|
|
|
|
{block content}
|
|
|
|
<table class="aui aui-table-list">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2022-04-24 09:02:23 +03:00
|
|
|
<th>ID</th>
|
|
|
|
<th>{_admin_voucher_serial}</th>
|
|
|
|
<th>{_coins}</th>
|
|
|
|
<th>{_admin_voucher_rating}</th>
|
|
|
|
<th>{_usages_left}</th>
|
|
|
|
<th>{_admin_voucher_status}</th>
|
|
|
|
<th>{_admin_actions}</th>
|
2021-10-07 11:47:30 +03:00
|
|
|
</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()}
|
2022-04-24 09:02:23 +03:00
|
|
|
<span class="aui-lozenge aui-lozenge-subtle aui-lozenge-removed">{_admin_voucher_status_closed}</span>
|
2021-10-07 11:47:30 +03:00
|
|
|
{else}
|
2022-04-24 09:02:23 +03:00
|
|
|
<span class="aui-lozenge aui-lozenge-subtle aui-lozenge-success">{_admin_voucher_status_opened}</span>
|
2021-10-07 11:47:30 +03:00
|
|
|
{/if}
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<a class="aui-button aui-button-primary" href="/admin/vouchers/id{$voucher->getId()}">
|
2022-04-24 09:02:23 +03:00
|
|
|
<span class="aui-icon aui-icon-small aui-iconfont-new-edit">{_edit}</span>
|
2021-10-07 11:47:30 +03:00
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<br/>
|
2022-04-24 09:02:23 +03:00
|
|
|
|
2021-10-07 11:47:30 +03:00
|
|
|
<div align="right">
|
2022-04-24 08:06:45 +03:00
|
|
|
{var $isLast = ((20 * (($_GET['p'] ?? 1) - 1)) + sizeof($vouchers)) < $count}
|
2022-04-24 09:02:23 +03:00
|
|
|
|
|
|
|
<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>
|
2021-10-07 11:47:30 +03:00
|
|
|
</div>
|
|
|
|
{/block}
|