diff options
author | Marian Sigler <m@qjym.de> | 2012-10-01 01:39:17 +0200 |
---|---|---|
committer | Marian Sigler <m@qjym.de> | 2012-10-01 01:39:17 +0200 |
commit | 1cf89afc3c3d7fc9735597c768501ede19206a69 (patch) | |
tree | 23b8e08adfe8d0ed4e62936d12e12121dbffef5f /templates | |
parent | e712284e6dacc85677da480ff0be03c524d85d9a (diff) | |
download | web-1cf89afc3c3d7fc9735597c768501ede19206a69.tar.gz web-1cf89afc3c3d7fc9735597c768501ede19206a69.tar.bz2 web-1cf89afc3c3d7fc9735597c768501ede19206a69.zip |
Add admin panel: Allow creation of usernames that are in the blacklist.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/admin_create_account.html | 19 | ||||
-rw-r--r-- | templates/admin_index.html | 8 | ||||
-rw-r--r-- | templates/admin_view_blacklist.html | 19 | ||||
-rw-r--r-- | templates/base.html | 3 |
4 files changed, 49 insertions, 0 deletions
diff --git a/templates/admin_create_account.html b/templates/admin_create_account.html new file mode 100644 index 0000000..744cbef --- /dev/null +++ b/templates/admin_create_account.html @@ -0,0 +1,19 @@ +{%- extends 'base.html' %} +{%- from '_macros.html' import render_field, render_submit, render_csrf %} +{%- set title = 'Account erstellen' %} +{%- block content %} +<p> + Hier kannst du einen Account erstellen, auch wenn der gewünschte + Benutzername in der Blacklist steht. +</p> +<p> + Der Benutzer bekommt eine Mail, mit der er sich dann ganz normal + ein Passwort setzen kann. +</p> +<form action="" method="post" class="form-horizontal"> + {{ render_field(form.username, autofocus="autofocus") }} + {{ render_field(form.mail) }} + {{ render_submit(value='Link verschicken')}} + {{ render_csrf(form) }} +</form> +{%- endblock %} diff --git a/templates/admin_index.html b/templates/admin_index.html new file mode 100644 index 0000000..6275bcc --- /dev/null +++ b/templates/admin_index.html @@ -0,0 +1,8 @@ +{%- extends 'base.html' %} +{%- set title = 'Admin-Interface' %} +{%- block content %} +<ul> + <li><a href="{{ url_for('admin_create_account') }}">Account erstellen</a></li> + <li><a href="{{ url_for('admin_view_blacklist') }}">Blacklist anzeigen</a></li> +</ul> +{%- endblock %} diff --git a/templates/admin_view_blacklist.html b/templates/admin_view_blacklist.html new file mode 100644 index 0000000..4f203f6 --- /dev/null +++ b/templates/admin_view_blacklist.html @@ -0,0 +1,19 @@ +{%- extends 'base.html' %} +{%- set title = 'Blacklist anzeigen' %} +{%- block content %} +<nav> + <ul> + {%- if start %} + <li><a href="{{ url_for('admin_view_blacklist') }}">Alle</a></li> + {%- endif %} + {%- for l in next_letters %} + <li><a href="{{ url_for('admin_view_blacklist', start=start+l) }}">{{ l }}</a></li> + {%- endfor %} + </ul> +</nav> +<ul> + {%- for e in entries %} + <li>{{ e }}</li> + {%- endfor %} +</ul> +{%- endblock %} diff --git a/templates/base.html b/templates/base.html index 4f2b22b..4123d7f 100644 --- a/templates/base.html +++ b/templates/base.html @@ -33,6 +33,9 @@ <ul> {%- if g.user %} <li>Angemeldet als <strong>{{ g.user.uid }}</strong></li> + {%- if g.user.uid in config.get('ADMIN_USERS', []) %} + <li><a href="{{ url_for('admin') }}">Admin</a></li> + {%- endif %} <li><a href="{{ url_for('logout') }}">Abmelden</a></li> {%- else %} <li>Nicht angemeldet</li> |