2020-07-01 10:26:07 +00:00
|
|
|
{% extends "administration/base.html" %}
|
|
|
|
|
|
|
|
{% load i18n %}
|
|
|
|
{% load passbook_utils %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<section class="pf-c-page__main-section pf-m-light">
|
|
|
|
<div class="pf-c-content">
|
|
|
|
<h1>
|
2020-11-22 21:57:08 +00:00
|
|
|
<i class="pf-icon pf-icon-security"></i>
|
2020-07-01 10:26:07 +00:00
|
|
|
{% trans 'Tokens' %}
|
|
|
|
</h1>
|
|
|
|
<p>{% trans "Tokens are used throughout passbook for Email validation stages, Recovery keys and API access." %}</p>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
<section class="pf-c-page__main-section pf-m-no-padding-mobile">
|
|
|
|
<div class="pf-c-card">
|
|
|
|
{% if object_list %}
|
|
|
|
<div class="pf-c-toolbar">
|
|
|
|
<div class="pf-c-toolbar__content">
|
2020-10-03 17:32:01 +00:00
|
|
|
{% include 'partials/toolbar_search.html' %}
|
2020-07-01 10:26:07 +00:00
|
|
|
{% include 'partials/pagination.html' %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<table class="pf-c-table pf-m-compact pf-m-grid-xl" role="grid">
|
|
|
|
<thead>
|
|
|
|
<tr role="row">
|
2020-10-05 20:40:30 +00:00
|
|
|
<th role="columnheader" scope="col">{% trans 'Identifier' %}</th>
|
2020-07-01 10:26:07 +00:00
|
|
|
<th role="columnheader" scope="col">{% trans 'User' %}</th>
|
|
|
|
<th role="columnheader" scope="col">{% trans 'Expires?' %}</th>
|
|
|
|
<th role="columnheader" scope="col">{% trans 'Expiry Date' %}</th>
|
|
|
|
<th role="cell"></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody role="rowgroup">
|
|
|
|
{% for token in object_list %}
|
|
|
|
<tr role="row">
|
|
|
|
<th role="columnheader">
|
2020-10-05 20:40:30 +00:00
|
|
|
<div>{{ token.identifier }}</div>
|
2020-07-01 10:26:07 +00:00
|
|
|
</th>
|
|
|
|
<td role="cell">
|
|
|
|
<span>
|
|
|
|
{{ token.user }}
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
<td role="cell">
|
|
|
|
<span>
|
|
|
|
{{ token.expiring|yesno:"Yes,No" }}
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
<td role="cell">
|
|
|
|
<span>
|
2020-09-02 22:04:12 +00:00
|
|
|
{% if not token.expiring %}
|
|
|
|
-
|
|
|
|
{% else %}
|
2020-07-01 10:26:07 +00:00
|
|
|
{{ token.expires }}
|
2020-09-02 22:04:12 +00:00
|
|
|
{% endif %}
|
2020-07-01 10:26:07 +00:00
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
<td>
|
2020-11-21 15:16:34 +00:00
|
|
|
<pb-modal-button href="{% url 'passbook_admin:token-delete' pk=token.pk %}">
|
|
|
|
<button slot="trigger" class="pf-c-button pf-m-danger">
|
|
|
|
{% trans 'Delete' %}
|
|
|
|
</button>
|
|
|
|
<div slot="modal"></div>
|
|
|
|
</pb-modal-button>
|
2020-11-22 21:24:22 +00:00
|
|
|
<pb-token-copy-button identifier="{{ outpost.token_identifier }}">
|
|
|
|
{% trans 'Copy token' %}
|
|
|
|
</pb-token-copy-button>
|
2020-07-01 10:26:07 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2020-10-03 15:50:17 +00:00
|
|
|
<div class="pf-c-pagination pf-m-bottom">
|
2020-07-01 10:26:07 +00:00
|
|
|
{% include 'partials/pagination.html' %}
|
|
|
|
</div>
|
|
|
|
{% else %}
|
2020-10-03 17:32:01 +00:00
|
|
|
<div class="pf-c-toolbar">
|
|
|
|
<div class="pf-c-toolbar__content">
|
|
|
|
{% include 'partials/toolbar_search.html' %}
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-07-01 10:26:07 +00:00
|
|
|
<div class="pf-c-empty-state">
|
|
|
|
<div class="pf-c-empty-state__content">
|
2020-10-03 17:32:01 +00:00
|
|
|
<i class="fas fa-key pf-c-empty-state__icon" aria-hidden="true"></i>
|
2020-07-01 10:26:07 +00:00
|
|
|
<h1 class="pf-c-title pf-m-lg">
|
2020-07-06 15:43:20 +00:00
|
|
|
{% trans 'No Tokens.' %}
|
2020-07-01 10:26:07 +00:00
|
|
|
</h1>
|
|
|
|
<div class="pf-c-empty-state__body">
|
2020-10-03 17:32:01 +00:00
|
|
|
{% if request.GET.search != "" %}
|
|
|
|
{% trans "Your search query doesn't match any token." %}
|
|
|
|
{% else %}
|
2020-07-06 15:43:20 +00:00
|
|
|
{% trans 'Currently no tokens exist.' %}
|
2020-10-03 17:32:01 +00:00
|
|
|
{% endif %}
|
2020-07-01 10:26:07 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
{% endblock %}
|