2021-03-14 16:08:46 +00:00
|
|
|
{% extends 'base.html' %}
|
|
|
|
{% block header %}
|
|
|
|
{% block title %}<h1>Token Übersicht</h1>{% endblock %}
|
2021-03-07 23:05:26 +00:00
|
|
|
|
2021-04-07 09:29:50 +00:00
|
|
|
<script src="../static/js/jquery-3.6.0.js"></script>
|
2021-03-14 16:08:46 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2021-04-07 09:29:50 +00:00
|
|
|
<table class="table">
|
|
|
|
<thead>
|
2021-03-07 22:19:44 +00:00
|
|
|
<td>Token</td>
|
|
|
|
<td>NutzerIn</td>
|
|
|
|
<td>Organisation</td>
|
|
|
|
<td>E-Mail</td>
|
|
|
|
<td>Gültig bis</td>
|
|
|
|
<td>Aktionen</td>
|
2021-04-07 09:29:50 +00:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
2021-03-07 22:19:44 +00:00
|
|
|
{% for t, data in assigned_tokens.items() %}
|
2021-08-30 19:03:30 +00:00
|
|
|
<tr
|
|
|
|
{% if loop.index % 2 %}
|
|
|
|
style="background-color: lightgrey"
|
|
|
|
{% else %}
|
|
|
|
style="background-color: mintcream"
|
|
|
|
{% endif %}
|
|
|
|
>
|
2021-03-07 22:19:44 +00:00
|
|
|
<td>{{ t }}</td>
|
|
|
|
{% for field in ['name', 'organization', 'email', 'valid_thru'] %}
|
|
|
|
<td>{{ data[field] if data[field] }}</td>
|
|
|
|
{% endfor %}
|
|
|
|
<td>
|
2022-01-27 22:56:48 +00:00
|
|
|
<a href="{{ url_for('door_app.edit_token', token=t) }}"><img src="static/edit.png" title="Editieren" alt="Edit"></a>
|
|
|
|
<a href="{{ url_for('door_app.deactivate_token', token=t) }}"><img src="static/stop.png" title="Deaktivieren" alt="Deactivate"></a>
|
|
|
|
<a href="{{ url_for('door_app.delete_token', token=t) }}"><img src="static/delete.png" title="Löschen" alt="Delete"></a>
|
2021-03-07 22:19:44 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
2021-08-30 19:03:30 +00:00
|
|
|
{% if inactive_tokens | length > 0 %}
|
|
|
|
<tr>
|
|
|
|
<td>Inaktive Tokens:</td>
|
|
|
|
</tr>
|
|
|
|
{% endif %}
|
2021-03-07 22:19:44 +00:00
|
|
|
{% for t, data in inactive_tokens.items() %}
|
2021-08-30 19:03:30 +00:00
|
|
|
<tr style="background-color: sandybrown">
|
2021-03-07 22:19:44 +00:00
|
|
|
<td>{{ t }}</td>
|
|
|
|
{% for field in ['name', 'organization', 'email', 'valid_thru'] %}
|
|
|
|
<td>{{ data[field] if data[field] }}</td>
|
|
|
|
{% endfor %}
|
|
|
|
<td>
|
2022-01-27 22:56:48 +00:00
|
|
|
<a href="{{ url_for('door_app.edit_token', token=t) }}"><img src="static/edit.png" title="Editieren" alt="Edit"></a>
|
|
|
|
<a href="{{ url_for('door_app.delete_token', token=t) }}"><img src="static/delete.png" title="Löschen" alt="Delete"></a>
|
2021-03-07 22:19:44 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
2021-04-07 09:29:50 +00:00
|
|
|
</tbody>
|
2021-03-07 22:19:44 +00:00
|
|
|
</table>
|
2022-01-27 22:56:48 +00:00
|
|
|
<form action="{{ url_for('door_app.backup_tokens') }}" method="get">
|
2021-04-06 15:52:17 +00:00
|
|
|
<input type="submit" value="Token Daten sichern">
|
|
|
|
</form>
|
2021-03-14 16:08:46 +00:00
|
|
|
{% endblock %}
|