You've already forked snikket-web-portal
52 lines
2.0 KiB
HTML
52 lines
2.0 KiB
HTML
{% extends "admin_app.html" %}
|
|
{% block head_lead %}
|
|
{{ super() }}
|
|
{% include "copy-snippet.html" %}
|
|
{% endblock %}
|
|
{% block content %}
|
|
<h1>{% trans %}Manage invitations{% endtrans %}</h1>
|
|
<form method="POST">{{ form.csrf_token }}
|
|
<div class="form layout-expanded">
|
|
<h2 class="form-title">{% trans %}Create new invitation{% endtrans %}</h2>
|
|
<p class="form-descr weak">{% trans %}Create a new invitation link to invite more users to your Snikket instance by clicking the button below.{% endtrans %}</p>
|
|
<div class="f-bbox">
|
|
{{ form.action_create_invite(class="primary") }}
|
|
</div>
|
|
</div>
|
|
<h2>{% trans %}Pending invitations{% endtrans %}</h2>
|
|
{% if invites %}
|
|
<table>
|
|
<col/>
|
|
<col/>
|
|
<col/>
|
|
<thead>
|
|
<tr>
|
|
<th>{% trans %}Created{% endtrans %}</th>
|
|
<th>{% trans %}Valid until{% endtrans %}</th>
|
|
<th>{% trans %}Actions{% endtrans %}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for invite in invites %}
|
|
<tr>
|
|
<td>{{ invite.created_at | format_date }}</td>
|
|
<td>{{ (invite.expires - now) | format_timedelta(add_direction=True) }}</td>
|
|
<td style="white-space: nowrap;">
|
|
{#- -#}
|
|
<a href="{{ url_for(".edit_invite", id_=invite.id_) }}" class="button secondary btn-more" title="{% trans %}Show invite details{% endtrans %}"><span class="a11y-only">{% trans %}Show invite details{% endtrans %}</span></a>
|
|
{#- -#}
|
|
<a class="button primary" title="{% trans %}Copy invite link to clipboard{% endtrans %}" aria-label="{% trans %}Copy invite link to clipboard{% endtrans %}" data-cliptext="{{ invite.landing_page }}" onclick="copy_to_clipboard(this); return false;"><span>📋</span></a>
|
|
{#- -#}
|
|
<button type="submit" class="secondary danger btn-delete" name="{{ form.action_revoke.name }}" value="{{ invite.id_ }}"><span class="a11y-only">{% trans %}Delete invitation{% endtrans %}</span></button>
|
|
{#- -#}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% else %}
|
|
<p>{% trans %}Currently, there are no pending invitations.{% endtrans %}</p>
|
|
{% endif %}
|
|
</form>
|
|
{% endblock %}
|