Root pages
authorPetr Vobornik <pvoborni@redhat.com>
Tue, 28 Jan 2014 12:09:54 +0000 (13:09 +0100)
committerSimo Sorce <simo@redhat.com>
Mon, 17 Feb 2014 15:43:47 +0000 (10:43 -0500)
Signed-off-by: Petr Vobornik <pvoborni@redhat.com>
Reviewed-by: Simo Sorce <simo@redhat.com>
ipsilon/root.py
templates/index.html
templates/logout.html

index 279cbd4..034a7b3 100755 (executable)
@@ -42,4 +42,4 @@ class Root(Page):
         self.admin = Admin(self._site)
 
     def root(self):
         self.admin = Admin(self._site)
 
     def root(self):
-        return self._template('index.html', title='Root')
+        return self._template('index.html', title='Ipsilon')
index 1e21948..7d368cb 100644 (file)
@@ -1,41 +1,30 @@
-<!doctype html>
-<html lang="en">
-<head>
-    <meta charset="UTF-8"></meta>
-    <title>{{ title }}</title>
-    <link href="{{ basepath }}/ui/ipsilon.css" type="text/css" rel="stylesheet"></link>
-    <link href="{{ basepath }}/ui/favicon.ico" type="image/ico" rel="icon"></link>
-</head>
-<body>
-    <div id="container">
-        <div id="logo">
-            <p><a href="{{ basepath }}">Ipsilon</a></p>
-        </div>
-        <div id="admin">
-            {% if user.is_admin %}
-                <a href="{{ basepath }}/admin">admin</a>
-            {% endif %}
-        </div>
-        <div id="welcome">
-            {% if user.name %}
-                <p>Welcome {{ user.fullname }}</p>
-            {% endif %}
-        </div>
-        <div id="content">
-            {% if not user.name %}
-                <p>Please <a href="{{ basepath }}/login">Log In</a>
-            {% elif user.sites %}
-                <p>Registered application shortcuts:</p>
-                {% for site in user.sites %}
-                    <p><a href="{{ site.link }}">{{ site.name }}</a></p>
-                {% endfor %}
-            {% endif %}
-        </div>
-        <div id="logout">
-            {% if user.name %}
-                <p><a href="{{ basepath }}/logout">Log Out</a></p>
-            {% endif %}
-        </div>
-    </div>
-</body>
-</html>
+{% extends "master.html" %}
+{% block main %}
+<div class="col-sm-12">
+  <div id="welcome">
+    {% if user.name %}
+      <p>Welcome {{ user.fullname }}!</p>
+    {% endif %}
+  </div>
+  <div id="content">
+    {% if not user.name %}
+      <p>Please <a href="{{ basepath }}/login">Log In</a>
+    {% elif user.sites %}
+      <p>Registered application shortcuts:</p>
+        {% for site in user.sites %}
+          <p><a href="{{ site.link }}">{{ site.name }}</a></p>
+        {% endfor %}
+    {% endif %}
+  </div>
+  <div id="authenticated">
+    {% if user.name %}
+      <p>
+        {% if user.is_admin %}
+          <a href="{{ basepath }}/admin" id="admin">Administration</a> |
+        {% endif %}
+        <a href="{{ basepath }}/logout" id="logout">Log Out</a>
+      </p>
+    {% endif %}
+  </div>
+</div>
+{% endblock %}
\ No newline at end of file
index f6f61ac..016c9ab 100644 (file)
@@ -1,24 +1,12 @@
-<!doctype html>
-<html lang="en">
-<head>
-    <meta charset="UTF-8"></meta>
-    <title>{{ title }}</title>
-    <link href="{{ basepath }}/ui/ipsilon.css" type="text/css" rel="stylesheet"></link>
-    <link href="{{ basepath }}/ui/favicon.ico" type="image/ico" rel="icon"></link>
-</head>
-<body>
-    <div id="container">
-        <div id="logo">
-            <p><a href="{{ basepath }}">Ipsilon</a></p>
-        </div>
-        <div id="logout">
-            {% if user.name %}
-                <p>Something prevented a successful logout</p>
-                <p>You are still logged in as {{ user.fullname }}</p>
-            {% else %}
-                <p>Successfully logged out.</p>
-                <p>Return to <a href="{{ basepath }}">Home</a> page</p>
-            {% endif %}
-    </div>
-</body>
-</html>
+{% extends "master.html" %}
+{% block main %}
+<div id="logout" class="col-sm-12">
+{% if user.name %}
+    <p>Something prevented a successful logout</p>
+    <p>You are still logged in as {{ user.fullname }}</p>
+{% else %}
+    <p>Successfully logged out.</p>
+    <p>Return to <a href="{{ basepath }}/">Home</a> page</p>
+{% endif %}
+</div>
+{% endblock %}
\ No newline at end of file