nekrochan/templates/staff/accounts.html

57 řádky
1.9 KiB
HTML
Surový Normální zobrazení Historie

2023-12-11 15:18:43 +00:00
{% import "../macros/staff-nav.html" as staff_nav %}
{% extends "base.html" %}
{% block title %}Účty{% endblock %}
{% block content %}
<h1 class="title">Účty</h1>
2023-12-25 13:53:44 +00:00
{% call staff_nav::staff_nav() %}
2023-12-11 15:18:43 +00:00
<hr>
<h2>Účty</h2>
<form method="post" action="/staff/actions/remove-accounts">
<div class="table-wrap">
2024-01-02 11:58:47 +00:00
<table class="data-table center">
2023-12-11 15:18:43 +00:00
<tr>
<th></th>
<th>Jméno</th>
<th>Vlastník</th>
<th>Vytvořen</th>
<th>Oprávnění</th>
</tr>
{% for account in accounts %}
<tr>
<td><input name="accounts[]" type="checkbox" value="{{ account.username }}" {% if !tcx.perms.owner() %}disabled=""{% endif %}></td>
<td>{{ account.username }}</td>
<td>{% if account.owner %}Ano{% else %}Ne{% endif %}</td>
<td>{{ account.created|czech_datetime }}</td>
<td>{{ account.permissions.0 }} <a href="/staff/permissions/{{ account.username }}">[Zobrazit]</a></td>
</tr>
{% endfor %}
</table>
</div>
{% if tcx.perms.owner() %}
<input class="button" type="submit" value="Odstranit vybrané">
{% endif %}
</form>
{% if tcx.perms.owner() %}
2023-12-16 18:05:47 +00:00
<hr>
2023-12-11 15:18:43 +00:00
<h2>Vytvořit účet</h2>
<form method="post" action="/staff/actions/create-account">
<table class="form-table">
<tr>
<td class="label">Jméno</td>
2024-01-15 15:06:25 +00:00
<td><input name="username" type="text" required=""></td>
2023-12-11 15:18:43 +00:00
</tr>
<tr>
<td class="label">Heslo</td>
2024-01-15 15:06:25 +00:00
<td><input name="password" type="password" required=""></td>
2023-12-11 15:18:43 +00:00
</tr>
<tr>
2024-01-15 15:06:25 +00:00
<td colspan="2"><input class="button" type="submit" value="Vytvořit účet"></td>
2023-12-11 15:18:43 +00:00
</tr>
</table>
</form>
{% endif %}
{% endblock %}