You've already forked snikket-web-portal
- Manage members - Update name (Normally, I’d fix this up into the initial implementation commit, but things happened in between and the rebase would be painful.)
66 lines
2.1 KiB
HTML
66 lines
2.1 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>
|
|
{%- include "admin_create_invite_form.html" -%}
|
|
<h2>{% trans %}Pending invitations{% endtrans %}</h2>
|
|
{% if invites %}
|
|
<form method="POST">
|
|
{{- form.csrf_token -}}
|
|
<div class="elevated el-2"><table>
|
|
<col/>
|
|
<col class="collapsible"/>
|
|
<col class="collapsible"/>
|
|
<col/>
|
|
<thead>
|
|
<tr>
|
|
<th>{% trans %}Valid until{% endtrans %}</th>
|
|
<th class="collapsible">{% trans %}Reusable{% endtrans %}</th>
|
|
<th class="collapsible">{% trans %}Circle{% endtrans %}</th>
|
|
<th>{% trans %}Actions{% endtrans %}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for invite in invites %}
|
|
<tr>
|
|
<td>{{ (invite.expires - now) | format_timedelta(add_direction=True) }}</td>
|
|
<td class="collapsible">{% if invite.reusable %}{% trans %}Yes{% endtrans %}{% else %}{% trans
|
|
%}No{% endtrans %}{% endif %}</td>
|
|
<td class="collapsible">
|
|
{#- -#}
|
|
<ul class="inline">
|
|
{%- for group_id in invite.group_ids -%}
|
|
{%- set circle_info = circle_map[group_id] -%}
|
|
{%- if circle_info -%}
|
|
<li>{{ circle_map[group_id] | circle_name }}</li>
|
|
{%- else -%}
|
|
<li><em>{% trans %}deleted{% endtrans %}</em></li>
|
|
{%- endif -%}
|
|
{%- endfor -%}
|
|
</ul>
|
|
{#- -#}
|
|
</td>
|
|
<td class="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></form></div>
|
|
{% else %}
|
|
<p>{% trans %}Currently, there are no pending invitations.{% endtrans %}</p>
|
|
{% endif %}
|
|
{% endblock %}
|