2022-11-18 07:09:04 +00:00
|
|
|
{% extends "settings/base.html" %}
|
2022-12-20 08:51:53 +00:00
|
|
|
{% load activity_tags %}
|
2022-11-18 07:09:04 +00:00
|
|
|
|
|
|
|
{% block subtitle %}Invites{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2022-12-20 08:51:53 +00:00
|
|
|
<form>
|
|
|
|
<div class="buttons">
|
|
|
|
<a href="{% url "admin_invite_create" %}" class="button">Create New</a>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<section class="icon-menu">
|
|
|
|
{% for invite in page_obj %}
|
|
|
|
<a class="option" href="{{ invite.urls.admin_view }}">
|
|
|
|
<i class="fa-solid fa-envelope"></i>
|
|
|
|
<span class="handle">
|
|
|
|
{{ invite.token }}
|
|
|
|
|
|
|
|
<small>
|
2022-12-22 07:03:21 +00:00
|
|
|
{% if invite.expires %}
|
|
|
|
Expires in {{ invite.expires|timeuntil }}
|
2022-12-26 16:42:35 +00:00
|
|
|
{% if invite.note %}|{% endif %}
|
2022-12-22 07:03:21 +00:00
|
|
|
{% endif %}
|
2022-12-26 16:42:35 +00:00
|
|
|
{% if invite.note %}
|
|
|
|
{{ invite.note }}
|
2022-12-20 08:51:53 +00:00
|
|
|
{% endif %}
|
|
|
|
</small>
|
|
|
|
</span>
|
2022-12-22 07:03:21 +00:00
|
|
|
<time>
|
|
|
|
{% if invite.uses %}
|
|
|
|
{{ invite.uses }} use{{ invite.uses|pluralize }} left
|
|
|
|
{% else %}
|
|
|
|
Infinite uses
|
|
|
|
{% endif %}
|
|
|
|
</time>
|
2022-12-20 08:51:53 +00:00
|
|
|
</a>
|
|
|
|
{% empty %}
|
|
|
|
<p class="option empty">
|
|
|
|
There are no unused invites.
|
|
|
|
</p>
|
|
|
|
{% endfor %}
|
|
|
|
<div class="load-more">
|
|
|
|
{% if page_obj.has_previous %}
|
|
|
|
<a class="button" href=".?page={{ page_obj.previous_page_number }}">Previous Page</a>
|
|
|
|
{% endif %}
|
|
|
|
{% if page_obj.has_next %}
|
|
|
|
<a class="button" href=".?page={{ page_obj.next_page_number }}">Next Page</a>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</section>
|
2022-11-18 07:09:04 +00:00
|
|
|
{% endblock %}
|