From 7bbf86117b53639cfb221861b988ef67bcfa305e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez?= Date: Fri, 8 Nov 2013 13:33:17 +0000 Subject: [PATCH] Updated templates, and started to simplify templates structure --- server/src/uds/templates/404.html | 23 +++++------- server/src/uds/templates/500.html | 25 ++++++------- server/src/uds/templates/uds/html5/index.html | 2 +- server/src/uds/templates/uds/html5/login.html | 4 --- server/src/uds/templates/uds/html5/prefs.html | 2 +- .../uds/html5/service_not_ready.html | 19 ++++++++++ .../templates/uds/html5/show_transport.html | 21 +++++++++++ .../uds/html5/snippets/nav-right.html | 5 ++- .../templates/uds/html5/snippets/navbar.html | 36 ++++++++++++++++++- .../uds/html5/snippets/navbar_inner.html | 2 +- .../uds/html5/snippets/navbar_outter.html | 2 +- .../templates/uds/html5/templates/base.html | 2 +- .../uds/html5/templates/internal_page.html | 20 ----------- 13 files changed, 103 insertions(+), 60 deletions(-) create mode 100644 server/src/uds/templates/uds/html5/service_not_ready.html create mode 100644 server/src/uds/templates/uds/html5/show_transport.html diff --git a/server/src/uds/templates/404.html b/server/src/uds/templates/404.html index 85c45c1b6..827137a7c 100644 --- a/server/src/uds/templates/404.html +++ b/server/src/uds/templates/404.html @@ -1,22 +1,17 @@ -{% extends 'uds/html5/base.html' %} +{% extends "uds/html5/templates/base.html" %} +{% load i18n static %} +{% block title %}{% trans 'Page not found' %}{% endblock %} {% block css %} - + {% endblock %} {% block body %} -
-
-
-
+

Page Not Found Error 404


The page you requested could not be found, either contact your webmaster or try again. Use your browsers Back button to navigate to the page you have prevously come from

Or you could just press this neat little button:

- Take Me Home + Take Me Home
-
-
-
-
-{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/server/src/uds/templates/500.html b/server/src/uds/templates/500.html index e47e28dc8..c94202362 100644 --- a/server/src/uds/templates/500.html +++ b/server/src/uds/templates/500.html @@ -1,22 +1,17 @@ -{% extends 'uds/html5/base.html' %} +{% extends "uds/html5/templates/base.html" %} +{% load i18n static %} +{% block title %}{% trans 'Page not found' %}{% endblock %} {% block css %} - + {% endblock %} {% block body %} -
-
-
-
+

OoopsError 500


The server raised an unexpected error, either contact your webmaster or try again. Use your browsers Back button to navigate to the page you have prevously come from

Or you could just press this neat little button:

- Take Me Home -
-
-
-
-
-{% endblock %} \ No newline at end of file + Take Me Home +
+{% endblock %} diff --git a/server/src/uds/templates/uds/html5/index.html b/server/src/uds/templates/uds/html5/index.html index 7c16832d5..3799b20d1 100644 --- a/server/src/uds/templates/uds/html5/index.html +++ b/server/src/uds/templates/uds/html5/index.html @@ -1,4 +1,4 @@ -{% extends "uds/html5/templates/internal_page.html" %} +{% extends "uds/html5/templates/base.html" %} {% load i18n static html5 %} {% block title %}{% trans 'Available services list' %}{% endblock %} diff --git a/server/src/uds/templates/uds/html5/login.html b/server/src/uds/templates/uds/html5/login.html index 795df7013..b0ef6a8ad 100644 --- a/server/src/uds/templates/uds/html5/login.html +++ b/server/src/uds/templates/uds/html5/login.html @@ -62,10 +62,6 @@ {% endblock %} -{% block menu %} - {% include 'uds/html5/snippets/navbar_outter.html' %} -{% endblock %} - {% block body %}
diff --git a/server/src/uds/templates/uds/html5/prefs.html b/server/src/uds/templates/uds/html5/prefs.html index fdb930a04..fb36132f2 100644 --- a/server/src/uds/templates/uds/html5/prefs.html +++ b/server/src/uds/templates/uds/html5/prefs.html @@ -1,4 +1,4 @@ -{% extends "uds/html5/templates/internal_page.html" %} +{% extends "uds/html5/templates/base.html" %} {% load i18n %} {% load static %} diff --git a/server/src/uds/templates/uds/html5/service_not_ready.html b/server/src/uds/templates/uds/html5/service_not_ready.html new file mode 100644 index 000000000..1c4bd65a7 --- /dev/null +++ b/server/src/uds/templates/uds/html5/service_not_ready.html @@ -0,0 +1,19 @@ +{% extends "uds/html5/templates/base.html" %} +{% load i18n static %} + +{% block title %}{% trans 'Service not ready' %}{% endblock %} +{% block css %} + +{% endblock %} +{% block body %} +
+

{% trans 'Service not ready' %}

+
+

{% trans 'Service not ready at this moment. Please, try again in a while.' %}

+
{% trans 'The service you has requested was not ready, and is being created right now. It will be availabe in a while ' %}
+
+ {% trans "Back" %} +
+{% endblock %} \ No newline at end of file diff --git a/server/src/uds/templates/uds/html5/show_transport.html b/server/src/uds/templates/uds/html5/show_transport.html new file mode 100644 index 000000000..41a9b44ab --- /dev/null +++ b/server/src/uds/templates/uds/html5/show_transport.html @@ -0,0 +1,21 @@ +{% extends "uds/html5/templates/base.html" %} +{% load i18n static %} + +{% block body %} +
+
+
+
+ +{% endblock %} + +{% block js %} + +{% endblock %} \ No newline at end of file diff --git a/server/src/uds/templates/uds/html5/snippets/nav-right.html b/server/src/uds/templates/uds/html5/snippets/nav-right.html index a6410757d..dc36f4e9a 100644 --- a/server/src/uds/templates/uds/html5/snippets/nav-right.html +++ b/server/src/uds/templates/uds/html5/snippets/nav-right.html @@ -3,6 +3,9 @@ {% csrf_token %} - {% if logout %} + {% if user and not user.is_anonymous %}
  • {% trans 'logout'|capfirst %}
  • {% endif %} diff --git a/server/src/uds/templates/uds/html5/snippets/navbar.html b/server/src/uds/templates/uds/html5/snippets/navbar.html index afa015902..91d5a261e 100644 --- a/server/src/uds/templates/uds/html5/snippets/navbar.html +++ b/server/src/uds/templates/uds/html5/snippets/navbar.html @@ -10,5 +10,39 @@ Universal Desktop Services
    - {% block navbar %}{% endblock %} + + diff --git a/server/src/uds/templates/uds/html5/snippets/navbar_inner.html b/server/src/uds/templates/uds/html5/snippets/navbar_inner.html index 4c57304e3..5e375d7c8 100644 --- a/server/src/uds/templates/uds/html5/snippets/navbar_inner.html +++ b/server/src/uds/templates/uds/html5/snippets/navbar_inner.html @@ -5,6 +5,6 @@ - {% include "uds/html5/snippets/nav-right.html" with logout=True %} + {% include "uds/html5/snippets/nav-right.html" %}
    {% endblock %} diff --git a/server/src/uds/templates/uds/html5/snippets/navbar_outter.html b/server/src/uds/templates/uds/html5/snippets/navbar_outter.html index 4330f6757..357783a6e 100644 --- a/server/src/uds/templates/uds/html5/snippets/navbar_outter.html +++ b/server/src/uds/templates/uds/html5/snippets/navbar_outter.html @@ -2,6 +2,6 @@ {% load i18n static %} {% block navbar %} {% endblock %} diff --git a/server/src/uds/templates/uds/html5/templates/base.html b/server/src/uds/templates/uds/html5/templates/base.html index 181a7a05e..bbf19e0be 100644 --- a/server/src/uds/templates/uds/html5/templates/base.html +++ b/server/src/uds/templates/uds/html5/templates/base.html @@ -46,7 +46,7 @@ - {% block menu %}{% endblock %} + {% block menu %}{% include 'uds/html5/snippets/navbar.html' %}{% endblock %}
    {% block messages %} diff --git a/server/src/uds/templates/uds/html5/templates/internal_page.html b/server/src/uds/templates/uds/html5/templates/internal_page.html index 6171900ff..b067ad0ea 100644 --- a/server/src/uds/templates/uds/html5/templates/internal_page.html +++ b/server/src/uds/templates/uds/html5/templates/internal_page.html @@ -2,24 +2,4 @@ {% load i18n static html5 %} {% block js %} - -{% endblock %} -{% block menu %} - {% include 'uds/html5/snippets/navbar_inner.html' %} {% endblock %}