magnetico-web/templates/Account/invites.html.twig

29 lines
875 B
Twig

<div class="row mb-3 mt-3">
<button type="button" class="btn btn-primary disabled" title="Not implemented">Request more</button>
</div>
<table class="table table-striped">
<thead>
<tr>
<th>#</th>
<th><i class="fas fa-external-link-alt"></i></th>
</tr>
</thead>
<tbody>
{# @var invite \App\Entity\Invite #}
{% for invite in invites %}
<tr>
<th scope="row">{{ loop.index }}</th>
<td>
{% if invite.usedBy %}
Used by <strong>{{ invite.usedBy.username }}</strong>.
{% else %}
{% set invite_url = url('user_register', { code: invite.code }) %}
<input class="form-control" type="url" value="{{ invite_url }}" readonly="readonly" onclick="this.select()">
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>