From 5d220e360454e7643eb5539fa329702cb5c273c5 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Wed, 9 Apr 2014 20:14:33 +0200 Subject: Management of users via the administrator's account. --- pyaggr3g470r/templates/admin/create_user.html | 29 ++++++++++++++++ pyaggr3g470r/templates/admin/dashboard.html | 44 ++++++++++++++++++++++++ pyaggr3g470r/templates/admin/user.html | 49 +++++++++++++++++++++++++++ 3 files changed, 122 insertions(+) create mode 100644 pyaggr3g470r/templates/admin/create_user.html create mode 100644 pyaggr3g470r/templates/admin/dashboard.html create mode 100644 pyaggr3g470r/templates/admin/user.html (limited to 'pyaggr3g470r/templates/admin') diff --git a/pyaggr3g470r/templates/admin/create_user.html b/pyaggr3g470r/templates/admin/create_user.html new file mode 100644 index 00000000..5a6838bd --- /dev/null +++ b/pyaggr3g470r/templates/admin/create_user.html @@ -0,0 +1,29 @@ +{% extends "layout.html" %} +{% block head%} +{{super()}} +{% endblock %} +{% block content %} +
+
+

{{ message|safe }}

+
+ {{ form.hidden_tag() }} + + {{ form.firstname.label }} + {{ form.firstname(class_="form-control") }} {% for error in form.firstname.errors %} {{ error }}
{% endfor %} + + {{ form.lastname.label }} + {{ form.lastname(class_="form-control") }} {% for error in form.lastname.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.submit(class_="btn") }} +
+
+
+{% endblock %} \ No newline at end of file diff --git a/pyaggr3g470r/templates/admin/dashboard.html b/pyaggr3g470r/templates/admin/dashboard.html new file mode 100644 index 00000000..2913d603 --- /dev/null +++ b/pyaggr3g470r/templates/admin/dashboard.html @@ -0,0 +1,44 @@ +{% extends "layout.html" %} +{% block head%} +{{super()}} +{% endblock %} +{% block content %} +
+

Registered users

+ + + + + + + + + + + + {% for user in users|sort(attribute="firstname") %} + + + + + + + + {% endfor %} + +
#FirstnameLastnameEmailActions
{{ loop.index }}{{ user.firstname }}{{ user.lastname }}{{ user.email }} + + + {% if user.apikey == "" %} + + {% else %} + + {% endif %} + +
+
+Add a new user +

+

As an administrator you are not listed in this table.

+
+{% endblock %} \ No newline at end of file diff --git a/pyaggr3g470r/templates/admin/user.html b/pyaggr3g470r/templates/admin/user.html new file mode 100644 index 00000000..767ff460 --- /dev/null +++ b/pyaggr3g470r/templates/admin/user.html @@ -0,0 +1,49 @@ +{% extends "layout.html" %} +{% block head%} +{{super()}} +{% endblock %} +{% block content %} +
+
+ Edit this user +

Membership

+

Contributor since {{ user.date_created.strftime('%A, %d %B %Y') }}.

+

Last seen: {{ user.last_seen.strftime('%A, %d %B %Y at %H:%M:%S') }}.

+
+
+ {% if user.feeds.all()|count == 0 %} +

This user is not subscribed to any feed.

+ {% else %} +

Feeds

+ + + + + + + + + + + + + {% for feed in user.feeds|sort(attribute="name") %} + + + + + + + + {% endfor %} + +
#NameFeed linkSite linkNumber of articlesActions
{{ loop.index }}{{ feed.title }}{{ feed.link }}{{ feed.site_link }}{{ feed.articles.all()|count }} + + + +
+ {% endif %} + Add a new feed +
+
+{% endblock %} \ No newline at end of file -- cgit