mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-26 17:21:00 +00:00
113db4ab3a
Also did a new table style for admin pages
65 lines
2.3 KiB
HTML
65 lines
2.3 KiB
HTML
{% extends "settings/base.html" %}
|
|
{% load activity_tags %}
|
|
|
|
{% block subtitle %}Invites{% endblock %}
|
|
|
|
{% block 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 %}
|
|
</time>
|
|
<td class="stat">
|
|
{% if invite.uses %}
|
|
{{ invite.uses }}
|
|
{% else %}
|
|
Infinite
|
|
{% endif %}
|
|
<small>use{{ invite.uses|pluralize }} left</small>
|
|
</time>
|
|
</tr>
|
|
{% empty %}
|
|
<tr class="empty">
|
|
<td>
|
|
There are no invites yet.
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</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>
|
|
{% endblock %}
|