You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
2.0 KiB
Twig

{% extends "base_bootstrap.html.twig" %}
{% block head %}
{{ parent() }}
<script src="/js/clipboard.min.js"></script>
<script src="/js/invites.js"></script>
{% endblock %}
{% block content %}
<div class="container">
<div class="row">
<h2 id="certificates">Invites <small>You used {{ used_invites }} from your {{ max_invites == -1 ? 'infinite' : max_invites }} invites</small></h2>
</div>
{% if error %}
<div class="row">
<div class="alert alert-warning" role="alert">
{{ error }}
</div>
</div>
{% endif %}
<div class="row">
<table class="table">
<thead>
<tr>
<th>Invite</th>
<th>
{% if max_invites > used_invites or max_invites == -1 %}
<form action="/panel/invites/create" method="post">
<button class="btn btn-default pull-right" type="submit">Create new invite</button>
</form>
{% endif %}
</th>
</tr>
</thead>
<tbody>
{% for invite in invites %}
<tr>
<td>
<kbd>{{ invite.getInvite() }}</kbd>
</td>
<td>
<button class="btn btn-default copy pull-right" data-clipboard-text="{{ invite.getInvite() }}">Copy</button>
</td>
</tr>
{% else %}
<tr>
<td colspan="2">You don't have any invites :(</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endblock %}