finish admin tasks
This commit is contained in:
22
templates/admin/user/index.html.tera
Normal file
22
templates/admin/user/index.html.tera
Normal file
@ -0,0 +1,22 @@
|
||||
{% extends "base" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>Users</h1>
|
||||
|
||||
{% for user in users %}
|
||||
<form action="/admin/user" method="post">
|
||||
<input type="hidden" name="id" value="{{ user.id }}" />
|
||||
Name: {{ user.name }}<br />
|
||||
Guest <input type="checkbox" name="is_guest" {% if user.is_guest %} checked="true"{% endif %} /><br />
|
||||
Cox <input type="checkbox" name="is_cox" {% if user.is_cox %} checked="true"{% endif %} /><br />
|
||||
Admin <input type="checkbox" name="is_admin" {% if user.is_admin %} checked="true"{% endif %} /><br />
|
||||
{% if user.pw %}
|
||||
<a href="/admin/user/{{ user.id }}/reset-pw">RESET PW</a>
|
||||
{% endif %}
|
||||
<input type="submit" />
|
||||
</form>
|
||||
<hr />
|
||||
{% endfor %}
|
||||
|
||||
{% endblock content %}
|
8
templates/auth/set-pw.html.tera
Normal file
8
templates/auth/set-pw.html.tera
Normal file
@ -0,0 +1,8 @@
|
||||
<h1>Passwort setzen</h1>
|
||||
|
||||
<form action="/auth/set-pw" method="post">
|
||||
<input type="hidden" name="userid" value="{{ userid }}" />
|
||||
<input type="password" name="password" placeholder="PW" />
|
||||
<input type="password" name="password_confirm" placeholder="Confirm PW"/>
|
||||
<input type="submit" />
|
||||
</form>
|
@ -4,6 +4,10 @@
|
||||
|
||||
{% if loggedin_user %}
|
||||
Hi {{ loggedin_user.name }}. <a href="/auth/logout">LOGOUT</a>
|
||||
|
||||
{% if loggedin_user.is_admin %}
|
||||
<a href="/admin/user">USER</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if flash %}
|
||||
|
Reference in New Issue
Block a user