From b2618e9404b84cc62d4becb02436233a0d53b375 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Wed, 25 Nov 2015 22:45:43 +0100 Subject: Rfactorization. Just a start... --- web/templates/admin/create_user.html | 29 +++++++++++++++++ web/templates/admin/dashboard.html | 60 ++++++++++++++++++++++++++++++++++++ web/templates/admin/user.html | 19 ++++++++++++ 3 files changed, 108 insertions(+) create mode 100644 web/templates/admin/create_user.html create mode 100644 web/templates/admin/dashboard.html create mode 100644 web/templates/admin/user.html (limited to 'web/templates/admin') diff --git a/web/templates/admin/create_user.html b/web/templates/admin/create_user.html new file mode 100644 index 00000000..64387dce --- /dev/null +++ b/web/templates/admin/create_user.html @@ -0,0 +1,29 @@ +{% extends "layout.html" %} +{% block head%} +{{super()}} +{% endblock %} +{% block content %} +
+
+

{{ message | safe }}

+
+ {{ form.hidden_tag() }} + + {{ form.nickname.label }} + {{ form.nickname(class_="form-control") }} {% for error in form.nickname.errors %} {{ error }}
{% endfor %} + + {{ form.email.label }} + {{ form.email(class_="form-control") }} {% for error in form.email.errors %} {{ error }}
{% endfor %} + + {{ form.password.label }} + {{ form.password(class_="form-control") }} {% for error in form.password.errors %} {{ error }}
{% endfor %} + + {{ form.refresh_rate.label }} + {{ form.refresh_rate(class_="form-control") }} {% for error in form.refresh_rate.errors %} {{ error }}
{% endfor %} + +
+ {{ form.submit(class_="btn btn-default") }} +
+
+
+{% endblock %} diff --git a/web/templates/admin/dashboard.html b/web/templates/admin/dashboard.html new file mode 100644 index 00000000..25bd3883 --- /dev/null +++ b/web/templates/admin/dashboard.html @@ -0,0 +1,60 @@ +{% extends "layout.html" %} +{% block head%} +{{super()}} +{% endblock %} +{% block content %} +
+

{{ _('Registered users') }}

+ + + + + + + + + + + + {% for user in users|sort(attribute="last_seen")|reverse %} + + + {% if user.id == current_user.id %} + + {% else %} + + {% endif %} + + + + + {% endfor %} + +
#{{ _('Nickname') }}{{ _('Email') }}{{ _('Last seen') }}{{ _('Actions') }}
{{ loop.index }}{{ user.nickname }} (It's you!){{ user.nickname }}{{ user.email }}{{ user.last_seen }} + + + {% if user.id != current_user.id %} + {% if user.activation_key == "" %} + + {% else %} + + {% endif %} + + {% endif %} +
+{{ _('Add a new user') }} +

{{ _('Send notification messages') }}

+
+ {{ form.hidden_tag() }} + + {{ form.subject.label }} + {{ form.subject(class_="form-control") }} {% for error in form.subject.errors %} {{ error }}
{% endfor %} + + {{ form.message.label }} + {{ form.message(class_="form-control", rows=8) }} {% for error in form.message.errors %} {{ error }}
{% endfor %} + +
+ {{ form.submit(class_="btn btn-default") }} +
+
+{% endblock %} diff --git a/web/templates/admin/user.html b/web/templates/admin/user.html new file mode 100644 index 00000000..d1e08c0d --- /dev/null +++ b/web/templates/admin/user.html @@ -0,0 +1,19 @@ +{% extends "layout.html" %} +{% block head%} +{{super()}} +{% endblock %} +{% block content %} +
+
+ {{ _('Edit this user') }} +

{{ _('Membership') }}

+
+
+

{{ _('Member since') }} {{ user.date_created | datetime }}.

+

{{ _('Last seen:') }} {{ user.last_seen | datetime }}.

+
+
+
+ {% include "feed_list.html" %} +
+{% endblock %} -- cgit