2022-11-17 23:09:04 -08:00
|
|
|
{% extends "settings/base.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 content %}
|
2023-01-10 19:31:50 -08:00
|
|
|
<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 %}
|
2023-01-10 19:31:50 -08:00
|
|
|
<tr>
|
|
|
|
<td class="icon">
|
|
|
|
<a href="{{ invite.urls.admin_view }}" class="overlay"></a>
|
|
|
|
<i class="fa-solid fa-envelope"></i>
|
|
|
|
</td>
|
|
|
|
<td class="name">
|
|
|
|
<a href="{{ invite.urls.admin_view }}" class="overlay"></a>
|
2022-12-20 00:51:53 -08:00
|
|
|
{{ invite.token }}
|
|
|
|
<small>
|
2022-12-26 08:42:35 -08:00
|
|
|
{% if invite.note %}
|
|
|
|
{{ invite.note }}
|
2022-12-20 00:51:53 -08:00
|
|
|
{% endif %}
|
|
|
|
</small>
|
2023-01-10 19:31:50 -08:00
|
|
|
</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 %}
|
|
|
|
</time>
|
|
|
|
<td class="stat">
|
2022-12-21 23:03:21 -08:00
|
|
|
{% if invite.uses %}
|
2023-01-10 19:31:50 -08:00
|
|
|
{{ invite.uses }}
|
2022-12-21 23:03:21 -08:00
|
|
|
{% else %}
|
2023-01-10 19:31:50 -08:00
|
|
|
Infinite
|
2022-12-21 23:03:21 -08:00
|
|
|
{% endif %}
|
2023-01-10 19:31:50 -08:00
|
|
|
<small>use{{ invite.uses|pluralize }} left</small>
|
2022-12-21 23:03:21 -08:00
|
|
|
</time>
|
2023-01-10 19:31:50 -08:00
|
|
|
</tr>
|
2022-12-20 00:51:53 -08:00
|
|
|
{% empty %}
|
2023-01-10 19:31:50 -08:00
|
|
|
<tr class="empty">
|
|
|
|
<td>
|
|
|
|
There are no invites yet.
|
|
|
|
</td>
|
|
|
|
</tr>
|
2022-12-20 00:51:53 -08:00
|
|
|
{% endfor %}
|
2023-01-10 19:31:50 -08:00
|
|
|
</table>
|
|
|
|
<div class="pagination">
|
|
|
|
{% if page_obj.has_previous %}
|
|
|
|
<a class="button" href=".?page={{ page_obj.previous_page_number }}">Previous Page</a>
|
|
|
|
{% endif %}
|
|
|
|
{% if page_obj.paginator.count %}
|
|
|
|
<span class="count">{{ page_obj.paginator.count }} invite{{page_obj.paginator.count|pluralize }}</span>
|
|
|
|
{% endif %}
|
|
|
|
{% if page_obj.has_next %}
|
|
|
|
<a class="button" href=".?page={{ page_obj.next_page_number }}">Next Page</a>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2022-11-17 23:09:04 -08:00
|
|
|
{% endblock %}
|