58 řádky
2.0 KiB
HTML
Spustitelný soubor
58 řádky
2.0 KiB
HTML
Spustitelný soubor
{% import "../macros/staff-nav.html" as staff_nav %}
|
|
|
|
{% extends "base.html" %}
|
|
|
|
{% block title %}Účty{% endblock %}
|
|
|
|
{% block content %}
|
|
<h1 class="title">Účty</h1>
|
|
{% call staff_nav::staff_nav(tcx.perms) %}
|
|
<hr>
|
|
<h2>Účty</h2>
|
|
<form method="post" action="/staff/actions/remove-accounts">
|
|
<div class="table-wrap">
|
|
<table class="data-table">
|
|
<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>
|
|
<hr>
|
|
{% if tcx.perms.owner() %}
|
|
<h2>Vytvořit účet</h2>
|
|
<form method="post" action="/staff/actions/create-account">
|
|
<table class="form-table">
|
|
<tr>
|
|
<td class="label">Jméno</td>
|
|
<td><input name="username" type="text" required="required"></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label">Heslo</td>
|
|
<td><input name="password" type="password" required="required"></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="submit" colspan="2"><input class="button" type="submit" value="Vytvořit účet"></td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
<hr>
|
|
{% endif %}
|
|
{% endblock %}
|