takahe/templates/admin/invites.html

56 lines
2.0 KiB
HTML
Raw Permalink Normal View History

{% extends "admin/base_main.html" %}
2022-12-20 00:51:53 -08:00
{% load activity_tags %}
2022-11-17 23:09:04 -08:00
{% block subtitle %}Invites{% endblock %}
{% block settings_content %}
<div class="view-options">
<span class="spacer"></span>
<a href="{% url "admin_invite_create" %}" class="button">Create New</a>
</div>
<table class="items">
2022-12-20 00:51:53 -08:00
{% for invite in page_obj %}
<tr>
<td class="icon">
2023-06-14 10:15:29 -07:00
<a href="{{ invite.urls.admin_view }}?page={{ page_obj.number }}" class="overlay"></a>
<i class="fa-solid fa-envelope"></i>
</td>
<td class="name">
2023-06-14 10:15:29 -07:00
<a href="{{ invite.urls.admin_view }}?page={{ page_obj.number }}" class="overlay"></a>
2022-12-20 00:51:53 -08:00
{{ invite.token }}
<small>
{% if invite.note %}
{{ invite.note }}
2022-12-20 00:51:53 -08:00
{% endif %}
</small>
</td>
<td class="stat">
{% if invite.expires %}
{% if invite.valid %}
{{ invite.expires|timeuntil }}
<small>until expiry</small>
{% else %}
<span class="bad">Expired</span>
{% endif %}
{% endif %}
2023-01-14 09:32:48 -08:00
</td>
<td class="stat">
{% if invite.uses %}
{{ invite.uses }}
{% else %}
Infinite
{% endif %}
<small>use{{ invite.uses|pluralize }} left</small>
2023-01-14 09:32:48 -08:00
</td>
</tr>
2022-12-20 00:51:53 -08:00
{% empty %}
<tr class="empty">
<td>
There are no invites yet.
</td>
</tr>
2022-12-20 00:51:53 -08:00
{% endfor %}
</table>
{% include "admin/_pagination.html" with nouns="invite,invites" %}
2022-11-17 23:09:04 -08:00
{% endblock %}