adding semantic

This commit is contained in:
Adolfo Gómez García 2016-04-22 05:20:30 +02:00
parent 701edb91f1
commit 99b17e573c
12 changed files with 906 additions and 0 deletions

View File

@ -0,0 +1,46 @@
{% extends "uds/html5/templates/base.html" %}
{% load i18n %}
{% block body %}
<div class="jumbotron">
<h2 class="text-center">Universal Desktop Services {{ version }}</h2>
<p class="text-center"><small><a href="http://www.udsenterprise.com" target="_blank"> &copy; 2012-2015 Virtual Cable S.L.U.</a></small></p>
</div>
<div class="row">
<div class="col-md-8 col-md-offset-2">
<p>{% trans 'You can access UDS Open Source code at' %} <a href="http://www.openuds.org" target="_blank">OpenUDS</a></p>
<p><h3>{% trans 'UDS has been developed using these components:' %}</h3></p>
<ul>
<li><a href="http://www.eclipse.org" target="_blank">Eclipse</a> as IDE with <a href="http://pydev.org/" target="_blank">pyDev</a></li>
<li><a href="https://www.djangoproject.com/" target="_blank">Django</a></li>
<li><a href="http://www.jcraft.com" target="_blank">Jsch</a></li>
<li><a href="http://guac-dev.org/" target="_blank">Guacamole</a></li>
<li><a href="https://github.com/django-compressor/django-compressor" target="_blank">Django compressor</a></li>
<li><a href="http://getbootstrap.com/" target="_blank">Bootstrap</a></li>
<li><a href="http://www.bootstrap-switch.org/" target="_blank">Bootstrap switch</a></li>
<li><a href="http://silviomoreto.github.io/bootstrap-select/" target="_blank">Bootstrap select</a></li>
<li><a href="http://www.virtuosoft.eu/code/bootstrap-touchspin/" target="_blank">Bootstrap touchspin</a></li>
<li><a href="http://fontawesome.io" target="_blank">Font Awesome by Dave Gandy</a></li>
<li><a href="http://coffeescript.org/" target="_blank">Coffescript</a></li>
<li><a href="http://sass-lang.com/" target="_blank">Sass</a>/<a href="http://compass-style.org/" target="_blank">Compass</a></li>
<li><a href="http://jquery.com/" target="_blank">jQuery</a></li>
<li><a href="http://handlebarsjs.com/" target="_blank">Handlebars</a></li>
<li><a href="https://github.com/carhartl/jquery-cookie" target="_blank">jQuery cookie</a></li>
<li><a href="http://jqueryvalidation.org/" target="_blank">jQuery validator</a></li>
<li><a href="http://malsup.com/jquery/block/" target="_blank">jQuery blockui</a></li>
<li><a href="http://www.flotcharts.org/" target="_blank">flot</a></li>
<li><a href="https://datatables.net/" target="_blank">jQuery datatables</a></li>
<li><a href="https://datatables.net/extras/tabletools/" target="_blank">jQuery Datatables tabletools</a></li>
<li><a href="https://github.com/eligrey/Blob.js/" target="_blank">Blob</a></li>
<li><a href="https://github.com/eligrey/FileSaver.js/" target="_blank">Filesaver</a></li>
<li><a href="http://kde-look.org/content/show.php/Crystal+Project?content=60475)" target="_blank">Crystal project icons</a></li>
<li><a href="https://github.com/NitruxSA/flattr-icons" target="_blank">Flattr Icons</a></li>
</ul>
<p><small>* {% trans 'If you found that we missed to mention any component, please let us know' %}</small></p>
<p class="text-center"><a href="{% url 'uds.web.views.index' %}" class="btn btn-lg btn-info"><i class="fa fa-home"></i> {% trans "Back" %}</a></p>
</div>
</div>
{% endblock %}

View File

@ -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 %}
<div class="row">
<div class="col-md-8 col-md-offset-2 bg-primary img-rounded">
<h3>{% trans 'Download UDS Plugin for' %} {{ os|osName }}</h3>
<p>{% trans 'In order to be able to execute UDS services, you need to have UDS plugin installed.' %}</p>
<div class="text-center">{{ os|pluginDownloadUrl|safe }}</div>
<h3>{% trans 'Or download another version' %}</h3>
<p>{% trans 'In case that your platform has been incorrectly detected, you can download manually the version required for your Operating System' %}</p>
<p>
{% if os != 'linux' %}
<p class="text-center">
<a href="{% url 'uds.web.views.client_downloads' os='Linux' %}" class="btn btn-warning">{% trans 'Linux UDS plugin' %}</a>
</p>
{% endif %}
{% if os != 'windows' %}
<p class="text-center">
<a href="{% url 'uds.web.views.client_downloads' os='Windows' %}" class="btn btn-warning">{% trans 'Windows UDS plugin' %}</a>
</p>
{% endif %}
{% if os != 'mac' %}
<p class="text-center">
<a href="{% url 'uds.web.views.client_downloads' os='Mac' %}" class="btn btn-warning">{% trans 'Mac OSX (>10.5) UDS plugin' %}</a>
</p>
{% endif %}
</p>
{% if request.user %}
<p>{% trans 'If you already have UDS Plugin installed but this message persists to appear, you can disable automatic detection here' %}</p>
<p>
<form>
<select id="plugin" class="selectpicker show-menu-arrow" data-width="100%" data-size="2" style="display: none;">
<option value="0">{% trans 'Automatic plugin detection is enabled' %}</option>
<option value="1">{% trans 'WARNING: Automatic plugin detection is disabled' %}</option>
</select>
</form>
</p>
<p>{% trans "Please, note that disabling automatic detection will not trigger this page again in case you don't have the plugin installed." %}<br/>
{% trans "In this case, you will have to manually download the plugin by using the menu on upper right corner." %}</p>
<p class="text-center">
<a href="{% url 'uds.web.views.index' %}" class="btn btn-info"><i class="fa fa-home"></i> {% trans "Return" %}</a>
</p>
{% endif %}
</div>
</div>
{% endblock %}
{% block js %}
{% if request.user %}
<script>
$(function(){
$("#plugin").on('change', function(){
$.ajax({
url: {% url 'PluginDetection' '' %} + $(this).val(),
type: "GET",
success: function(data) {
},
error: function(jqXHR, textStatus, errorThrown) {
alert(gettext('Error communicating with UDS: ') + textStatus);
}
});
}).val('{% preference _uds.bypassPluginDetection %}');
$('.selectpicker').selectpicker('render');
});
</script>
{% endif %}
{% endblock %}

View File

@ -0,0 +1,21 @@
{% extends "uds/html5/templates/base.html" %}
{% load i18n %}
{% block body %}
<div class="panel panel-info">
<div class="panel-heading">
{% trans "Downloads" %}
</div>
<div class="panel-body">
<p>{% trans "This page contains a list of downloadables provided by different modules" %}</p>
<div class="list-group">
{% for f in files %}
<a class="list-group-item" href="{% url "uds.web.views.download" idDownload=f.id %}">
<h4 class="list-group-item-heading">{{ f.name }}</h4>
<p class="list-group-item-text">{{ f.comment|safe }}</p>
</a>
{% endfor %}
</div>
</div>
</div>
{% endblock %}

View File

@ -0,0 +1,18 @@
{% extends "uds/html5/templates/base.html" %}
{% load i18n static %}
{% block title %}{% trans 'Error' %}{% endblock %}
{% block css %}
<style>
.center {text-align: center; margin-left: auto; margin-right: auto; margin-bottom: auto; margin-top: auto;}
</style>
{% endblock %}
{% block body %}
<div class="jumbotron center">
<h1>{% trans 'An error occurred' %}</h1>
<br />
<p>{% trans "Error" %}: <b class="text-danger">{{ errorString }}</b></p>
<br />
<a href="{% url 'uds.web.views.index' %}" class="btn btn-lg btn-info"><i class="fa fa-home"></i> {% trans "Back to services list" %}</a>
</div>
{% endblock %}

View File

@ -0,0 +1,369 @@
{% extends "uds/html5/templates/base.html" %}
{% load i18n html5 static %}
{% block title %}{% trans 'Available services list' %}{% endblock %}
{% block body %}
<ul class="nav nav-tabs nav-justified" id="services-tabs">
{% for grp in groups %}
<li{% if forloop.first %} class="active"{% endif %} data-name='tab-services-{{ forloop.counter }}'>
<a href="#tab-services-{{ forloop.counter }}" data-toggle="tab">
<img src="{% url 'galleryImage' grp.imageUuid %}" class="img-round se-agranda" style="width: 40px;">
{{ grp.name }}
</a>
{% comment %}<a href="#tab-services-{{ forloop.counter }}" data-toggle="tab" style="background: url('{% url 'galleryImage' grp.imageUuid %}') no-repeat left; display: block; background-size: 32px; min-width: 128px; padding-left: 32px; height: 40px;">{{ grp.name }}</a>{% endcomment %}
</li>
{% endfor %}
</ul>
<div class="tab-content">
{% for grp in groups %}
<div class="tab-pane fade{% if forloop.first %} in active{% endif %}" id="tab-services-{{ forloop.counter }}">
{% for ser in services %}
{% if ser.group.name == grp.name %}
{% if ser.transports %}
<div class="service-container">
{% with trans=ser.transports|first numTransports=ser.transports|length %}
<div class="service{% if ser.maintenance %} maintenance{% endif %}{% if ser.not_accesible %} notaccesible{% endif %}{% if ser.in_use %} inuse{% endif %}"
{% if ser.maintenance %}
data-content="{% trans "Under maintenance" %}"
{% elif ser.not_accesible %}
data-content="{% trans "Access limited by calendar" %}"
{% elif ser.in_use %}
data-content="{%trans "Currently in use" %}"
{% endif %}
data-href="{{ trans.link }}"
data-href-alt="{% url 'uds.web.views.client_downloads' %}">
<div class="service-image">
<img class="se-agranda" src="{% url "uds.web.views.serviceImage" idImage=ser.imageId %}" />
</div>
<span {% if ser.name|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 }}</span>
{% if ser.show_transports and numTransports > 1 %}
<span class="gear"><span class="fa fa-gear fa-spin"> </span></span>
{% endif %}
</div>
{% if ser.show_transports and numTransports > 1 %}
<div class="modal fade in">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title text-center">{% trans "Connections" %}</h4>
</div>
<div class="modal-body">
<ul class="transports">
{% for trans in ser.transports %}
<li><a class="uds-service-transport" data-href-alt="{% url 'uds.web.views.client_downloads' %}" href="{{ trans.link }}"><img class="transport" src="{% url "uds.web.views.transportIcon" idTrans=trans.id %}" alt="{{ trans.name }}" />{{ trans.name }}</a></li>
{% endfor %}
</ul>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
{% endif %}
{% endwith %}
</div>
{% endif %}
{% endif %}
{% endfor %}
</div>
{% endfor %}
</div>
<div class="modal fade" id="maintenance-dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">{% trans "Service under maintenance" %}</h4>
</div>
<div class="modal-body text-center">
<p>{% trans "This service is in maintenance mode." %}</p>
<p>{% trans "Please, retry access in a while." %}</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div class="modal fade" id="notaccesible-dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">{% trans "Service access not allowed" %}</h4>
</div>
<div class="modal-body text-center">
<p>{% trans "This service is currently not accesible due to schedule restrictions" %}</p>
<p>{% trans "Please, retry access in a while." %}</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
{% if user.isStaff %}
<div class="panel panel-warning">
<div class="panel-heading">
{% trans "Administrator info panel" %}
</div>
<div class="panel-body">
<p>{% trans "Ip" %}: {{ ip }}</p>
<p>{% trans "Networks" %}: {{ nets }}</p>
<p>{% trans "Transports" %}: {{ transports }}</p>
<p>{% trans "User Agent" %}: {{ request.META.HTTP_USER_AGENT }}</p>
<p>{% trans "OS" %}: {{ request.session.OS.OS }}</p>
</div>
</div>
{% endif %}
{% endblock %}
{% block css %}
<style media="screen">
.tab-content {
margin-top: 16px;
}
.with-tooltip {
z-index: 1000;
}
ul.transports > li {
list-style-type: none;
}
img.transport {
display: inline-block;
vertical-align: middle;
height: 32px;
width: 32px;
margin-right: 8px;
margin-bottom: 8px;
}
div.service-container {
display: inline-block;
width: 140px;
height: 162px;
margin: 0px 8px 24px 8px;
}
div.service {
/*background-color: #FAFAFA;*/
/*background-image: url("{% get_static_prefix %}/img/uds-small-back.png");*/
padding: 6px;
/*border: 1px solid #BABABA;
border-radius: 2px;*/
display: block;
position: relative;
width: 100%;
height: 100%;
box-shadow: 6px 6px 5px #E0E0E0;
cursor: pointer;
}
div.service.disabled {
opacity: 0.4;
filter: alpha(opacity=40);
}
div.service.maintenance {
opacity: 0.6;
filter: alpha(opacity=60);
}
div.service.inuse {
background-color: #DCDCFF;
}
div.service-image {
width: 128px;
height: 128px;
}
img.se-agranda {
max-width: 100%;
opacity: .8;
-webkit-transform: scale(.8,.8);
transform: scale(.8,.8);
-webkit-transition: all 0.3s 0s cubic-bezier(0.175, 0.885, 0.32, 1.275);
transition: all 0.3s 0s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
li.active > a > img.se-agranda,
img.se-agranda:hover,
img.se-agranda:focus {
opacity: 1;
-webkit-transform: none;
transform: none;
-webkit-transition: all 0.3s 0s cubic-bezier(0.175, 0.885, 0.32, 1.275);
transition: all 0.3s 0s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
div.service.over:not(.disabled) {
background-color: #F0F0F0;
animation: pulse 0.5s infinite alternate;
-webkit-animation-name: pulse;
-webkit-animation-duration: 0.8s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: alternate;
}
@keyframes pulse {
from { box-shadow: 0px 0px 3px 3px #0066cc; }
to { box-shadow: 0px 0px 8px 5px #0066cc; }
}
@-webkit-keyframes pulse {
from { box-shadow: 0px 0px 3px 3px #0066cc; }
to { box-shadow: 0px 0px 8px 5px #0066cc; }
}
div.service > img {
width: 100%;
}
div.service > span {
display: inline-block;
position: absolute;
vertical-align: bottom;
text-align: center;
left: 0px;
bottom: 0px;
width: 100%;
}
div.service > span.gear {
text-align: right;
padding-right: 12px;
}
span.gear > span.fa {
cursor: zoom-in;
}
</style>
{% endblock %}
{% block js %}
{% pageReloadTime as reloadTime %}
<script>
function getUrlVars() {
var vars = [], hash;
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for(var i = 0; i < hashes.length; i++)
{
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
return vars;
}
function launchURL(el) {
var $el = $(el);
uds.resetReloadCounter(); // Resets page update
url = $el.attr('data-href');
url = url != null ? url : $el.attr('href');
if ( url.substring(0, 7) == 'udsa://' ) {
uds.launch($el);
} else {
window.location = url;
}
}
$(function() {
var autorun = {% if autorun %}true{% else %}false{% endif %};
uds.reloadCounterBase = {{ reloadTime }};
uds.reloadCounterBase /= uds.counterGranurality;
uds.resetReloadCounter();
$('.with-tooltip').popover({container: 'body', trigger: 'hover', delay: { show: 500, hide: 100 }, placement: 'auto bottom'});
$('.inuse').popover({container: 'body', trigger: 'hover', delay: { show: 500, hide: 100 }, placement: 'auto top'});
$('div.service:not(.maintenance, .notaccesible)').on("click", function (event){
var url, el;
event.preventDefault();
launchURL(this);
return false;
}).on("mouseenter mouseleave", function (event) {
$(this).toggleClass('over');
});
$('.uds-service-transport').on("click", function (event){
var url, el, modal;
event.preventDefault();
modal = $(this).parent().parent().parent().parent().parent().parent();
modal.modal('hide');
// check url
el = $(this)
url = el.attr('data-href');
url = url != null ? url : el.attr('href');
if ( url.substring(0, 7) == 'udsa://' ) {
uds.launch(el);
} else {
window.location = url;
}
return false;
})
$('div.service:not(.maintenance, .notaccesible) > span.gear > span.fa').on("click", function (event) {
event.stopPropagation();
event.preventDefault();
$(this).parent().parent().next().modal();
return false;
});
$(".maintenance").click( function(event) {
$('#maintenance-dialog').modal({
keyboard: false
})
return false;
});
$(".notaccesible").click( function(event) {
$('#notaccesible-dialog').modal({
keyboard: false
})
return false;
});
if( autorun ) {
if( $('.service').length > 0)
launchURL($('.service')[0]);
autorun = false;
}
uds.setReload();
// Select the correct tab if needed (on reload)
var tab = getUrlVars().tab;
if (tab != undefined) {
$("ul#services-tabs a[href='#" + tab + "']").tab('show')
}
});
</script>
{% endblock %}

View File

@ -0,0 +1,135 @@
{% extends "uds/semantic/templates/base.html" %}
{% load i18n static html5 %}
{% block title %}{% trans 'Welcome to UDS' %}{% endblock %}
{% block js %}
<script type="text/javascript">
function chkNonStandardAuth(val, nonStandard) {
console.log(val, nonStandard);
if( $.inArray(val.toString(), nonStandard) >= 0) {
var vv = val;
$("#login").hide(300, function() {
$.get('{%url "uds.web.views.customAuth" idAuth=''%}' + vv, function(data) {
$('#nonStandardLogin').html(data);
$('#nonStandard').show(300);
});
});
}
}
$(function() {
var nonStandard = $('#id_nonStandard').val();
if( nonStandard.length == 0 )
nonStandard = [];
else
nonStandard = nonStandard.split(',');
var standard = $('#id_standard').val();
if( standard.length == 0 )
standard = [];
else
standard = standard.split(',');
$('#id_authenticator').change(function() {
chkNonStandardAuth($(this).val(), nonStandard)
});
if( standard.length > 0 ) {
$('#backToLogin').click(function() {
$('#id_authenticator').val(standard[0]);
$('#nonStandard').hide(300, function() {
$('#nonStandardLogin').html('');
$("#login").show(300);
});
return false;
});
} else {
$('#divBackToLogin').html('');
}
// Check initial value (may default auth is non Standard)
chkNonStandardAuth($('#id_authenticator').val(), nonStandard);
// Sets button to submit
$('.ui.button.signin').on('click', function() {
$('#loginform').submit();
});
});
</script>
{% endblock %}
{% block body %}
<div class="ui container one column" id="login">
{% if form.errors %}
<div class="alert alert-dismissable alert-danger">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{% trans 'invalid credentials'|capfirst %}
</div>
{% endif %}
<form id="loginform" name="loginform" method="post">
{% csrf_token %}
{% for hidden in form.hidden_fields %}
{{ hidden }}
{% endfor %}
<div class="ui raised segment signin">
<h3 class="ui inverted blue block header"> {% trans 'Welcome to UDS' %} {{ version }}</h3>
<div class="ui one column grid basic segment">
<div class="column">
<div class="ui blue stacked segment">
<div class="ui form">
<div class="field">
<label> {% trans "Username" %} </label>
<div class="ui left labeled icon input">
<input type="text" id="id_{{form.user.name}}" name="{{form.user.name}}">
<i class="user icon"></i>
</div>
</div>
<div class="field">
<label> {% trans "Password" %} </label>
<div class="ui left labeled icon input">
<input type="password" id="id_{{form.password.name}}" name="{{form.password.name}}">
<i class="lock icon"></i>
</div>
</div>
{% if form.fields.authenticator.choices|length > 1 %}
<div class="inline field">
<label> {% trans "Authenticator" %} </label>
<select class="ui fluid dropdown" name="{{ form.authenticator.name }}" id="id_{{ form.authenticator.name }}">
{% for val, txt in form.fields.authenticator.choices %}
<option value="{{ val }}">{{ txt }}</option>
{% endfor %}
</select>
</div>
{% endif %}
<div class="ui vertical animated blue small button signin">
<div class="visible content"> {% trans "Log In" %} </div>
<div class="hidden content">
<i class="sign in icon"></i>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
<div id="nonStandard" style="display: none">
<div id="nonStandardLogin" class="form">
non standard logins
</div>
<div id="divBackToLogin">
<a href="#" id="backToLogin" title="{% trans "Back to login" %}">{% trans "Back to login" %}</a>
</div>
</div>
<div class="row" id="customHtml">
{% autoescape off %}
{{ customHtml }}
{% endautoescape %}
</div>
</div>
{% endblock %}

View File

@ -0,0 +1,14 @@
{% extends "uds/html5/templates/base.html" %}
{% load i18n %}
{% load static %}
{% block title %}{% trans "UDS User Preferences" %}{% endblock %}
{% block body %}
<form name="form1" method="post" class="form-preferences">
{% csrf_token %}
{% autoescape off %}{{ prefs_form }}{% endautoescape %}
<a href="{% url "uds.web.views.index" %}" class="btn btn-warning">{% trans "Cancel" %}</a>
<button type="submit" class="btn btn-success pull-right">{% trans "Save Preferences" %}</button>
</form>
{% endblock %}

View File

@ -0,0 +1,26 @@
{% extends "uds/html5/templates/base.html" %}
{% load i18n static %}
{% block title %}{% trans 'The service is not ready' %}{% endblock %}
{% block css %}
<style>
.center {text-align: center; margin-left: auto; margin-right: auto; margin-bottom: auto; margin-top: auto;}
</style>
{% endblock %}
{% if fromLauncher %}
{% block menu %}{% endblock %}
{% endif %}
{% block body %}
<div class="jumbotron center">
<h1> {% trans 'The service is not ready' %}</h1>
<br />
<p>{% trans 'The service is not ready at this moment. Please, try it again after a few seconds.' %}</p>
<h5>{% trans 'The service you have requested was not ready, and it is being created right now. It will be availabe shortly' %}</h5>
{% if not fromLauncher %}
<br />
<a href="{% url 'uds.web.views.index' %}" class="btn btn-lg btn-info"><i class="fa fa-home"></i> {% trans "Back" %}</a>
{% else %}
<p class="text-danger">{% trans 'Please, close this window and relaunch again after a while.' %}</p>
{% endif %}
</div>
{% endblock %}

View File

@ -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 %}
<div class="jumbotron text-center service bg-primary" data-href="{{ link }}">
<h1> {% trans 'UDS Service launcher' %}</h1>
<br />
<p>{% trans 'The service you have requested is being launched.' %}</p>
<h5>{% trans 'Please, note that reloading this page will not work.' %}</h5>
<h5>{% trans 'To relaunch service, you will have to do it from origin.' %}</h5>
</p>
<br />
<h6>{% trans 'If the service does not launchs automatically, probably you dont have the UDS plugin installed' %}</h6>
<h6>{% trans 'You can obtain it from the' %} <a href="{% url 'ClientDownload' %}">{% trans 'UDS Plugin download page' %}</a></h6>
</div>
{% endblock %}
{% block js %}
<script>
function launchURL(el) {
var $el = $(el);
url = $el.attr('data-href');
url = url != null ? url : $el.attr('href');
if ( url.substring(0, 7) == 'udsa://' ) {
uds.launch($el);
} else {
window.location = url;
}
}
$(function() {
launchURL($('.service')[0]);
});
</script>
{% endblock %}

View File

@ -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 %}
<div class="jumbotron text-center service bg-primary">
<h1> {% trans 'UDS Service launcher' %}</h1>
<br />
<p class="text-danger">{% trans 'Please, note that reloading this page will not work.' %}<br/>
{% trans 'Close this window and try to relaunch service from origin.' %}</p>
</p>
<h6>{% trans 'You can obtain required UDS plugin from the' %} <a href="{% url 'ClientDownload' %}">{% trans 'UDS Plugin download page' %}</a></h6>
</div>
{% endblock %}
{% block js %}
<script>
function launchURL(el) {
var $el = $(el);
url = $el.attr('data-href');
url = url != null ? url : $el.attr('href');
if ( url.substring(0, 7) == 'udsa://' ) {
uds.launch($el);
} else {
window.location = url;
}
}
$(function() {
launchURL($('.service')[0]);
});
</script>
{% endblock %}

View File

@ -0,0 +1,42 @@
{% load i18n html5 static %}
{% preferences_allowed as show_prefs %}
{% root_id as rootid %}
<div class="ui menu">
<a class="header item" href="/">
<img class="ui mini spaced image" src="{% get_static_prefix %}img/udsicon.png">Universal Desktop Services
</a>
<div class="right menu">
<div class="item">
<form id="form_language" action="{% url "django.views.i18n.set_language" %}" method="post">
{% csrf_token %}
<select class="ui search selection dropdown" id="id_language" type="hidden" name="language">
{% for lang in LANGUAGES %}
<option value="{{ lang.0 }}"{% if lang.0 == LANGUAGE_CODE %} selected{%endif %}>{% trans lang.1|capfirst %}</option>
{% endfor %}
</select>
</form>
</div>
<a class="item" href="{% url 'uds.web.views.about' %}">
{% trans 'About' %}
</a>
{% if user and user.pk != None %}
<div class="item">
<div class="ui dropdown item">
<i class="user icon"></i> {{ user.real_name }}
<i class="dropdown icon"></i>
<div class="menu">
{% if show_prefs and user.id != rootid %}
<a class="item" href="{% url "uds.web.views.prefs" %}"><i class="edit icon"></i> {% trans 'Preferences' %}</a>
{% endif %}
<a class="item" href="{% url "ClientDownload" %}"><i class="disk download icon"></i> {% trans 'UDS Plugin' %}</a>
{% if user.staff_member or user.is_admin %}
<a class="item" href="{% url "uds.web.views.download" idDownload='' %}"><i class="cloud download icon"></i> {% trans 'Downloads' %}</a>
<a class="item" href="{% url "uds.admin.views.index" %}"><i class="dashboard icon"></i> {% trans 'Dashboard' %}</a>
{% endif %}
<a class="item" href="{% url "uds.web.views.logout" %}"><i class="toggle off icon"></i> {% trans 'Logout' %}</a>
</div>
</div>
</div>
{% endif %}
</div>
</div>

View File

@ -0,0 +1,86 @@
{% load l10n i18n static html5 compress %}{% spaceless %}
{% get_current_language as LANGUAGE_CODE %}
{% get_available_languages as LANGUAGES %}
<!DOCTYPE html>{% endspaceless %}
<html class="no-js" lang='{{LANGUAGE_CODE}}'>
<head>
<title>{% block title %}{% endblock %}</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="mobile-web-app-capable" content="yes">
<meta name="robots" content="noindex, nofollow" />
{% block meta %}{% endblock %}
{% block icon %}<link href="{% get_static_prefix %}img/favicon.png?v=2" rel="icon" type="image/x-icon" />{% endblock %}
<!-- semantic -->
{% compress css %}
<link href="{% get_static_prefix %}semantic/css/semantic.min.css" rel="stylesheet" media="screen">
<link href="{% get_static_prefix %}semantic/css/uds.css" rel="stylesheet" media="screen">
{% block css %}{% endblock %}
{% endcompress %}
</head>
<body class="uds-body">
<!-- Navigation bar -->
{% block menu %}{% include 'uds/semantic/snippets/navbar.html' %}{% endblock %}
{% ifbrowser ie<10 %}
<div class="alert alert-dismissable alert-danger">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{% 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)' %}
</div>
{% endifbrowser %}
<!-- End of menu -->
<div class="container uds-content">
{% block messages %}
{% if messages %}
{% for message in messages %}
<div class="alert alert-dismissable {{ message.tags }}">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
{{ message }}
</div>
{% endfor %}
{% endif %}
{% endblock %}
<!-- Content -->
{% block body %}{% endblock %}
<!-- End of content -->
</div> <!-- End of container -->
<div class="st-sticky-push"></div>
</div>
<footer class="footer">
<div class="container">
{% block footer %}
<a href="http://www.udsenterprise.com">UDS Enterprise Edition. &copy; 2012-2016 Virtual Cable S.L.U.</a>
{% endblock %}
</div>
</footer>
<script src="{% url 'uds.web.views.jsCatalog' LANGUAGE_CODE %}"></script>
{% compress js %}
<script src="{% get_static_prefix %}semantic/js/jquery.min.js"></script>
<script src="{% get_static_prefix %}semantic/js/semantic.min.js"></script>
<script>
var clientRest = "/" + "{% url 'ClientAccessEnabler' 'x' 'x' %}".split("/")[1];
var bypassPluginDetection = "{% preference _uds.bypassPluginDetection %}" == "1";
$(function() {
$('.ui.dropdown')
.dropdown()
;
$('#id_language').on('change', function() {
$('#form_language').submit();
});
})
</script>
<script type="text/coffeescript" charset="utf-8" src="{% get_static_prefix %}js/uds-client.coffee"></script>
{% endcompress %}
{% compress js %}
{% block js %}{% endblock %}
{% endcompress %}
</body>
</html>