From 739ca49e93d7bf534bfc401633a612e16ff19bc6 Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Tue, 28 Jan 2014 13:09:54 +0100 Subject: [PATCH] Root pages Signed-off-by: Petr Vobornik Reviewed-by: Simo Sorce --- ipsilon/root.py | 2 +- templates/index.html | 71 ++++++++++++++++++------------------------- templates/logout.html | 36 ++++++++-------------- 3 files changed, 43 insertions(+), 66 deletions(-) diff --git a/ipsilon/root.py b/ipsilon/root.py index 279cbd4..034a7b3 100755 --- a/ipsilon/root.py +++ b/ipsilon/root.py @@ -42,4 +42,4 @@ class Root(Page): self.admin = Admin(self._site) def root(self): - return self._template('index.html', title='Root') + return self._template('index.html', title='Ipsilon') diff --git a/templates/index.html b/templates/index.html index 1e21948..7d368cb 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,41 +1,30 @@ - - - - - {{ title }} - - - - -
- -
- {% if user.is_admin %} - admin - {% endif %} -
-
- {% if user.name %} -

Welcome {{ user.fullname }}

- {% endif %} -
-
- {% if not user.name %} -

Please Log In - {% elif user.sites %} -

Registered application shortcuts:

- {% for site in user.sites %} -

{{ site.name }}

- {% endfor %} - {% endif %} -
-
- {% if user.name %} -

Log Out

- {% endif %} -
-
- - +{% extends "master.html" %} +{% block main %} +
+
+ {% if user.name %} +

Welcome {{ user.fullname }}!

+ {% endif %} +
+
+ {% if not user.name %} +

Please Log In + {% elif user.sites %} +

Registered application shortcuts:

+ {% for site in user.sites %} +

{{ site.name }}

+ {% endfor %} + {% endif %} +
+
+ {% if user.name %} +

+ {% if user.is_admin %} + Administration | + {% endif %} + Log Out +

+ {% endif %} +
+
+{% endblock %} \ No newline at end of file diff --git a/templates/logout.html b/templates/logout.html index f6f61ac..016c9ab 100644 --- a/templates/logout.html +++ b/templates/logout.html @@ -1,24 +1,12 @@ - - - - - {{ title }} - - - - -
- -
- {% if user.name %} -

Something prevented a successful logout

-

You are still logged in as {{ user.fullname }}

- {% else %} -

Successfully logged out.

-

Return to Home page

- {% endif %} -
- - +{% extends "master.html" %} +{% block main %} +
+{% if user.name %} +

Something prevented a successful logout

+

You are still logged in as {{ user.fullname }}

+{% else %} +

Successfully logged out.

+

Return to Home page

+{% endif %} +
+{% endblock %} \ No newline at end of file -- 2.20.1