You've already forked snikket-web-portal
55 lines
1.9 KiB
HTML
55 lines
1.9 KiB
HTML
{% extends "admin_app.html" %}
|
|
{% from "library.j2" import action_button, icon, clipboard_button, form_button, custom_form_button %}
|
|
{% 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">
|
|
{%- call form_button("create_link", form.action_create_invite, class="primary") %}{% endcall -%}
|
|
</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;">
|
|
{%- call action_button("more", url_for(".edit_invite", id_=invite.id_), class="secondary") -%}
|
|
{% trans %}Show invite details{% endtrans %}
|
|
{%- endcall -%}
|
|
{%- call clipboard_button(invite.landing_page, class="primary") -%}
|
|
{% trans %}Copy invite link to clipboard{% endtrans %}
|
|
{%- endcall -%}
|
|
{%- call custom_form_button("remove_link", form.action_revoke.name, invite.id_, class="secondary danger", slim=True) -%}
|
|
{% trans %}Delete invitation{% endtrans %}
|
|
{%- endcall -%}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% else %}
|
|
<p>{% trans %}Currently, there are no pending invitations.{% endtrans %}</p>
|
|
{% endif %}
|
|
</form>
|
|
{% endblock %}
|