2020-06-03 16:38:30 +00:00
|
|
|
{% extends 'layout.html' %}
|
|
|
|
{% load humanize %}
|
|
|
|
{% block content %}
|
2020-09-30 04:45:59 +00:00
|
|
|
<div class="block">
|
2020-11-09 20:06:44 +00:00
|
|
|
<h1 class="title">Invites</h1>
|
2020-09-30 04:45:59 +00:00
|
|
|
<table class="table is-striped">
|
|
|
|
<tr>
|
|
|
|
<th>Link</th>
|
|
|
|
<th>Expires</th>
|
|
|
|
<th>Max uses</th>
|
|
|
|
<th>Times used</th>
|
|
|
|
</tr>
|
|
|
|
{% if not invites %}
|
|
|
|
<tr><td colspan="4">No active invites</td></tr>
|
|
|
|
{% endif %}
|
2020-06-03 16:38:30 +00:00
|
|
|
{% for invite in invites %}
|
|
|
|
<tr>
|
|
|
|
<td><a href="{{ invite.link }}">{{ invite.link }}</td>
|
|
|
|
<td>{{ invite.expiry|naturaltime }}</td>
|
|
|
|
<td>{{ invite.use_limit }}</td>
|
|
|
|
<td>{{ invite.times_used }}</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
2020-09-30 04:45:59 +00:00
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="block">
|
|
|
|
<h2 class="title is-4">Generate New Invite</h2>
|
|
|
|
|
2021-01-12 18:19:58 +00:00
|
|
|
<form name="invite" action="/invite/" method="post">
|
2020-09-30 04:45:59 +00:00
|
|
|
{% csrf_token %}
|
2020-11-06 23:08:40 +00:00
|
|
|
<div class="field is-grouped">
|
2020-09-30 04:45:59 +00:00
|
|
|
<div class="control">
|
|
|
|
<label class="label" for="id_expiry">Expiry:</label>
|
2020-11-06 23:08:40 +00:00
|
|
|
<div class="select">
|
|
|
|
{{ form.expiry }}
|
|
|
|
</div>
|
2020-09-30 04:45:59 +00:00
|
|
|
</div>
|
|
|
|
<div class="control">
|
|
|
|
<label class="label" for="id_use_limit">Use limit:</label>
|
2020-11-06 23:08:40 +00:00
|
|
|
<div class="select">
|
|
|
|
{{ form.use_limit }}
|
|
|
|
</div>
|
2020-09-30 04:45:59 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-06-03 16:38:30 +00:00
|
|
|
|
2020-09-30 04:45:59 +00:00
|
|
|
<button class="button is-primary" type="submit">Create Invite</button>
|
|
|
|
</form>
|
2020-06-03 16:38:30 +00:00
|
|
|
</div>
|
|
|
|
{% endblock %}
|