takahe/templates/admin/invites.html
Andrew Godwin 8f57aa5f37
UI/Domains Refactor
Redoes the UI to remove timelines, promote domains, and a lot of other things to support the refactor.
2023-05-03 22:42:37 -06:00

55 lines
1.9 KiB
HTML

{% extends "admin/base_main.html" %}
{% load activity_tags %}
{% 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">
{% for invite in page_obj %}
<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>
{{ invite.token }}
<small>
{% if invite.note %}
{{ invite.note }}
{% 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 %}
</td>
<td class="stat">
{% if invite.uses %}
{{ invite.uses }}
{% else %}
Infinite
{% endif %}
<small>use{{ invite.uses|pluralize }} left</small>
</td>
</tr>
{% empty %}
<tr class="empty">
<td>
There are no invites yet.
</td>
</tr>
{% endfor %}
</table>
{% include "admin/_pagination.html" with nouns="invite,invites" %}
{% endblock %}