From 99b17e573c4879e1b30608b633fbff3576f35f91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Fri, 22 Apr 2016 05:20:30 +0200 Subject: [PATCH] adding semantic --- .../src/uds/templates/uds/semantic/about.html | 46 +++ .../uds/semantic/download_client.html | 74 ++++ .../uds/templates/uds/semantic/downloads.html | 21 + .../src/uds/templates/uds/semantic/error.html | 18 + .../src/uds/templates/uds/semantic/index.html | 369 ++++++++++++++++++ .../src/uds/templates/uds/semantic/login.html | 135 +++++++ .../src/uds/templates/uds/semantic/prefs.html | 14 + .../uds/semantic/service_not_ready.html | 26 ++ .../uds/semantic/simpleLauncher.html | 39 ++ .../simpleLauncherAlreadyLaunched.html | 36 ++ .../uds/semantic/snippets/navbar.html | 42 ++ .../uds/semantic/templates/base.html | 86 ++++ 12 files changed, 906 insertions(+) create mode 100644 server/src/uds/templates/uds/semantic/about.html create mode 100644 server/src/uds/templates/uds/semantic/download_client.html create mode 100644 server/src/uds/templates/uds/semantic/downloads.html create mode 100644 server/src/uds/templates/uds/semantic/error.html create mode 100644 server/src/uds/templates/uds/semantic/index.html create mode 100644 server/src/uds/templates/uds/semantic/login.html create mode 100644 server/src/uds/templates/uds/semantic/prefs.html create mode 100644 server/src/uds/templates/uds/semantic/service_not_ready.html create mode 100644 server/src/uds/templates/uds/semantic/simpleLauncher.html create mode 100644 server/src/uds/templates/uds/semantic/simpleLauncherAlreadyLaunched.html create mode 100644 server/src/uds/templates/uds/semantic/snippets/navbar.html create mode 100644 server/src/uds/templates/uds/semantic/templates/base.html diff --git a/server/src/uds/templates/uds/semantic/about.html b/server/src/uds/templates/uds/semantic/about.html new file mode 100644 index 000000000..151aae434 --- /dev/null +++ b/server/src/uds/templates/uds/semantic/about.html @@ -0,0 +1,46 @@ +{% extends "uds/html5/templates/base.html" %} +{% load i18n %} + +{% block body %} + +
+

Universal Desktop Services {{ version }}

+

© 2012-2015 Virtual Cable S.L.U.

+
+ +
+
+

{% trans 'You can access UDS Open Source code at' %} OpenUDS

+

{% trans 'UDS has been developed using these components:' %}

+ +

* {% trans 'If you found that we missed to mention any component, please let us know' %}

+

{% trans "Back" %}

+
+
+ +{% endblock %} \ No newline at end of file diff --git a/server/src/uds/templates/uds/semantic/download_client.html b/server/src/uds/templates/uds/semantic/download_client.html new file mode 100644 index 000000000..93f87e2a6 --- /dev/null +++ b/server/src/uds/templates/uds/semantic/download_client.html @@ -0,0 +1,74 @@ +{% extends "uds/html5/templates/base.html" %} +{% load i18n html5 static %} + +{% block title %} +{% trans 'Download UDS plugin for' %} {{ os|osName }} +{% endblock %} + +{% block body %} +
+
+

{% trans 'Download UDS Plugin for' %} {{ os|osName }}

+

{% trans 'In order to be able to execute UDS services, you need to have UDS plugin installed.' %}

+
{{ os|pluginDownloadUrl|safe }}
+

{% trans 'Or download another version' %}

+

{% trans 'In case that your platform has been incorrectly detected, you can download manually the version required for your Operating System' %}

+

+ {% if os != 'linux' %} +

+ {% trans 'Linux UDS plugin' %} +

+ {% endif %} + {% if os != 'windows' %} +

+ {% trans 'Windows UDS plugin' %} +

+ {% endif %} + {% if os != 'mac' %} +

+ {% trans 'Mac OSX (>10.5) UDS plugin' %} +

+ {% endif %} +

+ + {% if request.user %} +

{% trans 'If you already have UDS Plugin installed but this message persists to appear, you can disable automatic detection here' %}

+

+

+ +
+

+

{% trans "Please, note that disabling automatic detection will not trigger this page again in case you don't have the plugin installed." %}
+ {% trans "In this case, you will have to manually download the plugin by using the menu on upper right corner." %}

+

+ {% trans "Return" %} +

+ {% endif %} +
+
+{% endblock %} + +{% block js %} +{% if request.user %} + +{% endif %} +{% endblock %} diff --git a/server/src/uds/templates/uds/semantic/downloads.html b/server/src/uds/templates/uds/semantic/downloads.html new file mode 100644 index 000000000..a1d1464d8 --- /dev/null +++ b/server/src/uds/templates/uds/semantic/downloads.html @@ -0,0 +1,21 @@ +{% extends "uds/html5/templates/base.html" %} +{% load i18n %} + +{% block body %} +
+
+ {% trans "Downloads" %} +
+
+

{% trans "This page contains a list of downloadables provided by different modules" %}

+
+ {% for f in files %} + +

{{ f.name }}

+

{{ f.comment|safe }}

+
+ {% endfor %} +
+
+
+{% endblock %} diff --git a/server/src/uds/templates/uds/semantic/error.html b/server/src/uds/templates/uds/semantic/error.html new file mode 100644 index 000000000..3e30dbf5c --- /dev/null +++ b/server/src/uds/templates/uds/semantic/error.html @@ -0,0 +1,18 @@ +{% extends "uds/html5/templates/base.html" %} +{% load i18n static %} + +{% block title %}{% trans 'Error' %}{% endblock %} +{% block css %} + +{% endblock %} +{% block body %} +
+

{% trans 'An error occurred' %}

+
+

{% trans "Error" %}: {{ errorString }}

+
+ {% trans "Back to services list" %} +
+{% endblock %} \ No newline at end of file diff --git a/server/src/uds/templates/uds/semantic/index.html b/server/src/uds/templates/uds/semantic/index.html new file mode 100644 index 000000000..61eee08d3 --- /dev/null +++ b/server/src/uds/templates/uds/semantic/index.html @@ -0,0 +1,369 @@ +{% extends "uds/html5/templates/base.html" %} +{% load i18n html5 static %} +{% block title %}{% trans 'Available services list' %}{% endblock %} + +{% block body %} + +
+ {% for grp in groups %} +
+ + {% for ser in services %} + {% if ser.group.name == grp.name %} + {% if ser.transports %} +
+ {% with trans=ser.transports|first numTransports=ser.transports|length %} +
+
+ +
+ 16 %}class="with-tooltip" data-content="{{ser.name|capfirst}}"{% endif %}{% if ser.show_transports and numTransports > 1 %} style="width: 80%;"{% endif %}>{{ ser.name|capfirst|truncatechars:16 }} + {% if ser.show_transports and numTransports > 1 %} + + {% endif %} +
+ + {% if ser.show_transports and numTransports > 1 %} + + {% endif %} + + {% endwith %} +
+ {% endif %} + {% endif %} + {% endfor %} +
+ {% endfor %} +
+ + + + + + + {% if user.isStaff %} +
+
+ {% trans "Administrator info panel" %} +
+
+

{% trans "Ip" %}: {{ ip }}

+

{% trans "Networks" %}: {{ nets }}

+

{% trans "Transports" %}: {{ transports }}

+

{% trans "User Agent" %}: {{ request.META.HTTP_USER_AGENT }}

+

{% trans "OS" %}: {{ request.session.OS.OS }}

+
+
+ {% endif %} + +{% endblock %} + +{% block css %} + +{% endblock %} + +{% block js %} + {% pageReloadTime as reloadTime %} + +{% endblock %} diff --git a/server/src/uds/templates/uds/semantic/login.html b/server/src/uds/templates/uds/semantic/login.html new file mode 100644 index 000000000..a826ea34e --- /dev/null +++ b/server/src/uds/templates/uds/semantic/login.html @@ -0,0 +1,135 @@ +{% extends "uds/semantic/templates/base.html" %} +{% load i18n static html5 %} + +{% block title %}{% trans 'Welcome to UDS' %}{% endblock %} + +{% block js %} + +{% endblock %} + +{% block body %} + +
+ {% if form.errors %} +
+ + {% trans 'invalid credentials'|capfirst %} +
+ {% endif %} +
+ {% csrf_token %} + {% for hidden in form.hidden_fields %} + {{ hidden }} + {% endfor %} +
+ +{% endblock %} diff --git a/server/src/uds/templates/uds/semantic/prefs.html b/server/src/uds/templates/uds/semantic/prefs.html new file mode 100644 index 000000000..fb36132f2 --- /dev/null +++ b/server/src/uds/templates/uds/semantic/prefs.html @@ -0,0 +1,14 @@ +{% extends "uds/html5/templates/base.html" %} +{% load i18n %} +{% load static %} + +{% block title %}{% trans "UDS User Preferences" %}{% endblock %} + +{% block body %} +
+ {% csrf_token %} + {% autoescape off %}{{ prefs_form }}{% endautoescape %} + {% trans "Cancel" %} + +
+{% endblock %} \ No newline at end of file diff --git a/server/src/uds/templates/uds/semantic/service_not_ready.html b/server/src/uds/templates/uds/semantic/service_not_ready.html new file mode 100644 index 000000000..be6481a85 --- /dev/null +++ b/server/src/uds/templates/uds/semantic/service_not_ready.html @@ -0,0 +1,26 @@ +{% extends "uds/html5/templates/base.html" %} +{% load i18n static %} + +{% block title %}{% trans 'The service is not ready' %}{% endblock %} +{% block css %} + +{% endblock %} +{% if fromLauncher %} +{% block menu %}{% endblock %} +{% endif %} +{% block body %} +
+

{% trans 'The service is not ready' %}

+
+

{% trans 'The service is not ready at this moment. Please, try it again after a few seconds.' %}

+
{% trans 'The service you have requested was not ready, and it is being created right now. It will be availabe shortly' %}
+ {% if not fromLauncher %} +
+ {% trans "Back" %} + {% else %} +

{% trans 'Please, close this window and relaunch again after a while.' %}

+ {% endif %} +
+{% endblock %} \ No newline at end of file diff --git a/server/src/uds/templates/uds/semantic/simpleLauncher.html b/server/src/uds/templates/uds/semantic/simpleLauncher.html new file mode 100644 index 000000000..e92a60f08 --- /dev/null +++ b/server/src/uds/templates/uds/semantic/simpleLauncher.html @@ -0,0 +1,39 @@ +{% extends "uds/html5/templates/base.html" %} +{% load i18n html5 static %} + +{% block title %}{% trans 'Service launcher' %}{% endblock %} +{% block menu %}{% endblock %} + +{% block body %} +
+

{% trans 'UDS Service launcher' %}

+
+

{% trans 'The service you have requested is being launched.' %}

+
{% trans 'Please, note that reloading this page will not work.' %}
+
{% trans 'To relaunch service, you will have to do it from origin.' %}
+

+
+
{% trans 'If the service does not launchs automatically, probably you dont have the UDS plugin installed' %}
+
{% trans 'You can obtain it from the' %} {% trans 'UDS Plugin download page' %}
+
+{% endblock %} + + +{% block js %} + +{% endblock %} diff --git a/server/src/uds/templates/uds/semantic/simpleLauncherAlreadyLaunched.html b/server/src/uds/templates/uds/semantic/simpleLauncherAlreadyLaunched.html new file mode 100644 index 000000000..aece937b1 --- /dev/null +++ b/server/src/uds/templates/uds/semantic/simpleLauncherAlreadyLaunched.html @@ -0,0 +1,36 @@ +{% extends "uds/html5/templates/base.html" %} +{% load i18n html5 static %} + +{% block title %}{% trans 'Service launcher' %}{% endblock %} +{% block menu %}{% endblock %} + +{% block body %} +
+

{% trans 'UDS Service launcher' %}

+
+

{% trans 'Please, note that reloading this page will not work.' %}
+ {% trans 'Close this window and try to relaunch service from origin.' %}

+

+
{% trans 'You can obtain required UDS plugin from the' %} {% trans 'UDS Plugin download page' %}
+
+{% endblock %} + + +{% block js %} + +{% endblock %} diff --git a/server/src/uds/templates/uds/semantic/snippets/navbar.html b/server/src/uds/templates/uds/semantic/snippets/navbar.html new file mode 100644 index 000000000..3af7102c0 --- /dev/null +++ b/server/src/uds/templates/uds/semantic/snippets/navbar.html @@ -0,0 +1,42 @@ +{% load i18n html5 static %} + {% preferences_allowed as show_prefs %} + {% root_id as rootid %} + diff --git a/server/src/uds/templates/uds/semantic/templates/base.html b/server/src/uds/templates/uds/semantic/templates/base.html new file mode 100644 index 000000000..7efa415e8 --- /dev/null +++ b/server/src/uds/templates/uds/semantic/templates/base.html @@ -0,0 +1,86 @@ +{% load l10n i18n static html5 compress %}{% spaceless %} +{% get_current_language as LANGUAGE_CODE %} +{% get_available_languages as LANGUAGES %} +{% endspaceless %} + + + {% block title %}{% endblock %} + + + + + + {% block meta %}{% endblock %} + + {% block icon %}{% endblock %} + + + {% compress css %} + + + + {% block css %}{% endblock %} + {% endcompress %} + + + + + {% block menu %}{% include 'uds/semantic/snippets/navbar.html' %}{% endblock %} + {% ifbrowser ie<10 %} +
+ + {% trans 'Your browser is supported only partially. Please, upgrade it to a modern html5 browser like Firefox, Chrome, Opera, ... (IE must be 10 or better, and must also disable "Compatibility View Mode" for this site)' %} +
+ {% endifbrowser %} + +
+ {% block messages %} + {% if messages %} + {% for message in messages %} +
+ + {{ message }} +
+ {% endfor %} + {% endif %} + {% endblock %} + + {% block body %}{% endblock %} + +
+
+
+ + + + {% compress js %} + + + + + {% endcompress %} + + + {% compress js %} + {% block js %}{% endblock %} + {% endcompress %} + + +