mirror of
https://github.com/dkmstr/openuds.git
synced 2025-01-08 21:18:00 +03:00
Advancend & sync
This commit is contained in:
parent
7a742c043b
commit
971015d33a
@ -49,7 +49,7 @@ class Images(ModelHandler):
|
|||||||
'''
|
'''
|
||||||
Handles the gallery REST interface
|
Handles the gallery REST interface
|
||||||
'''
|
'''
|
||||||
needs_admin = True
|
# needs_admin = True
|
||||||
|
|
||||||
path = 'gallery'
|
path = 'gallery'
|
||||||
model = Image
|
model = Image
|
||||||
|
@ -51,7 +51,7 @@ class ServicesPoolGroups(ModelHandler):
|
|||||||
'''
|
'''
|
||||||
Handles the gallery REST interface
|
Handles the gallery REST interface
|
||||||
'''
|
'''
|
||||||
needs_admin = True
|
# needs_admin = True
|
||||||
|
|
||||||
path = 'gallery'
|
path = 'gallery'
|
||||||
model = ServicesPoolGroup
|
model = ServicesPoolGroup
|
||||||
|
@ -64,7 +64,7 @@ import logging
|
|||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
__updated__ = '2015-09-04'
|
__updated__ = '2016-05-04'
|
||||||
|
|
||||||
# several constants as Width height, margins, ..
|
# several constants as Width height, margins, ..
|
||||||
WIDTH, HEIGHT = 1800, 1000
|
WIDTH, HEIGHT = 1800, 1000
|
||||||
@ -98,8 +98,8 @@ class AccessReport(UDSGeraldoReport):
|
|||||||
height=1 * cm,
|
height=1 * cm,
|
||||||
auto_expand_height=True,
|
auto_expand_height=True,
|
||||||
elements=(
|
elements=(
|
||||||
Label(text=_('Users access by date'), top=0.2 * cm, left=0, width=BAND_WIDTH,
|
# Label(text=_('Users access by date'), top=0.2 * cm, left=0, width=BAND_WIDTH,
|
||||||
style={'fontName': 'Helvetica-Bold', 'fontSize': 12, 'alignment': TA_CENTER}),
|
# style={'fontName': 'Helvetica-Bold', 'fontSize': 12, 'alignment': TA_CENTER}),
|
||||||
|
|
||||||
Label(text=_('Pool'), top=1.0 * cm, left=1.2 * cm,
|
Label(text=_('Pool'), top=1.0 * cm, left=1.2 * cm,
|
||||||
style={'fontName': 'Helvetica-Bold', 'fontSize': 9}),
|
style={'fontName': 'Helvetica-Bold', 'fontSize': 9}),
|
||||||
|
@ -4,8 +4,8 @@ gui.servicesPools = new GuiElement(api.servicesPools, "servicespools")
|
|||||||
# To allow fast admin navigation
|
# To allow fast admin navigation
|
||||||
gui.servicesPools.fastLink = (event, obj) ->
|
gui.servicesPools.fastLink = (event, obj) ->
|
||||||
gui.doLog 'FastLink clicked', obj
|
gui.doLog 'FastLink clicked', obj
|
||||||
event.preventDefault();
|
event.preventDefault()
|
||||||
event.stopPropagation();
|
event.stopPropagation()
|
||||||
$obj = $(obj);
|
$obj = $(obj);
|
||||||
if $obj.hasClass('goServiceLink')
|
if $obj.hasClass('goServiceLink')
|
||||||
vals = $obj.attr('href').substr(1).split(',')
|
vals = $obj.attr('href').substr(1).split(',')
|
||||||
|
@ -30,7 +30,7 @@ uds.counterGranurality = 2 # Every this seconds, reload time will be checked
|
|||||||
|
|
||||||
blockUI = (message) ->
|
blockUI = (message) ->
|
||||||
message = message or "<h1><span class=\"fa fa-spinner fa-spin\"></span> " + gettext("Contacting service...") + "</h1>"
|
message = message or "<h1><span class=\"fa fa-spinner fa-spin\"></span> " + gettext("Contacting service...") + "</h1>"
|
||||||
# $.blockUI
|
# $.blockUI
|
||||||
# message: message
|
# message: message
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -173,10 +173,13 @@ launchSafari = (el, url, alt) ->
|
|||||||
), 2800
|
), 2800
|
||||||
|
|
||||||
|
|
||||||
uds.launch = (el) ->
|
uds.launch = (el, url, alt) ->
|
||||||
url = el.attr('data-href')
|
if url is undefined
|
||||||
url = if url? then url else el.attr('href')
|
url = el.attr('data-href')
|
||||||
alt = el.attr('data-href-alt')
|
url = if url? then url else el.attr('href')
|
||||||
|
|
||||||
|
if alt is undefined
|
||||||
|
alt = el.attr('data-href-alt')
|
||||||
|
|
||||||
blockUI()
|
blockUI()
|
||||||
|
|
||||||
@ -187,7 +190,6 @@ uds.launch = (el) ->
|
|||||||
type: "GET"
|
type: "GET"
|
||||||
dataType: "json"
|
dataType: "json"
|
||||||
success: (data) ->
|
success: (data) ->
|
||||||
|
|
||||||
if data.error? and data.error isnt ''
|
if data.error? and data.error isnt ''
|
||||||
unblockUI()
|
unblockUI()
|
||||||
alert data.error
|
alert data.error
|
||||||
@ -218,7 +220,7 @@ uds.doLaunch = (el, url, alt) ->
|
|||||||
launchSafari el, url, alt
|
launchSafari el, url, alt
|
||||||
else if uds.ie
|
else if uds.ie
|
||||||
launchIE this, url, alt
|
launchIE this, url, alt
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
uds.onLink = ->
|
uds.onLink = ->
|
||||||
|
0
server/src/uds/static/semantic/css/semantic.min.css
vendored
Executable file → Normal file
0
server/src/uds/static/semantic/css/semantic.min.css
vendored
Executable file → Normal file
@ -1,4 +1,4 @@
|
|||||||
.uds-body {
|
/*.uds-body {
|
||||||
display: flex;
|
display: flex;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
.uds-content {
|
.uds-content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
{% block title %}{% trans 'Available services list' %}{% endblock %}
|
{% block title %}{% trans 'Available services list' %}{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
|
{% if groups|length > 1 %}
|
||||||
<ul class="nav nav-tabs nav-justified" id="services-tabs">
|
<ul class="nav nav-tabs nav-justified" id="services-tabs">
|
||||||
{% for grp in groups %}
|
{% for grp in groups %}
|
||||||
<li{% if forloop.first %} class="active"{% endif %} data-name='tab-services-{{ forloop.counter }}'>
|
<li{% if forloop.first %} class="active"{% endif %} data-name='tab-services-{{ forloop.counter }}'>
|
||||||
@ -13,7 +14,8 @@
|
|||||||
{% 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 %}
|
{% 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>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
{% endif %}
|
||||||
|
</ul>
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
{% for grp in groups %}
|
{% for grp in groups %}
|
||||||
<div class="tab-pane fade{% if forloop.first %} in active{% endif %}" id="tab-services-{{ forloop.counter }}">
|
<div class="tab-pane fade{% if forloop.first %} in active{% endif %}" id="tab-services-{{ forloop.counter }}">
|
||||||
@ -124,16 +126,16 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block css %}
|
{% block css %}
|
||||||
<style media="screen">
|
<style media="screen">
|
||||||
|
|
||||||
.tab-content {
|
.tab-content {
|
||||||
margin-top: 16px;
|
margin-top: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.with-tooltip {
|
.with-tooltip {
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
}
|
}
|
||||||
@ -194,8 +196,8 @@
|
|||||||
|
|
||||||
|
|
||||||
img.se-agranda {
|
img.se-agranda {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
opacity: .8;
|
opacity: .8;
|
||||||
-webkit-transform: scale(.8,.8);
|
-webkit-transform: scale(.8,.8);
|
||||||
transform: scale(.8,.8);
|
transform: scale(.8,.8);
|
||||||
-webkit-transition: all 0.3s 0s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
-webkit-transition: all 0.3s 0s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||||
@ -205,7 +207,7 @@
|
|||||||
li.active > a > img.se-agranda,
|
li.active > a > img.se-agranda,
|
||||||
img.se-agranda:hover,
|
img.se-agranda:hover,
|
||||||
img.se-agranda:focus {
|
img.se-agranda:focus {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
-webkit-transform: none;
|
-webkit-transform: none;
|
||||||
transform: none;
|
transform: none;
|
||||||
-webkit-transition: all 0.3s 0s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
-webkit-transition: all 0.3s 0s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||||
@ -270,7 +272,7 @@
|
|||||||
vars[hash[0]] = hash[1];
|
vars[hash[0]] = hash[1];
|
||||||
}
|
}
|
||||||
return vars;
|
return vars;
|
||||||
}
|
}
|
||||||
function launchURL(el) {
|
function launchURL(el) {
|
||||||
var $el = $(el);
|
var $el = $(el);
|
||||||
|
|
||||||
|
@ -24,11 +24,7 @@
|
|||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
<li><a href="{% url 'uds.web.views.about' %}">{% trans 'About' %}</a></li>
|
<li><a href="{% url 'uds.web.views.about' %}">{% trans 'About' %}</a></li>
|
||||||
<li class="dropdown">
|
<li class="dropdown">
|
||||||
{% for lang in LANGUAGES %}
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-comments-o"></i> {% trans LANGUAGE_INFO.name|capfirst %}<b class="caret"></b></a>
|
||||||
{% if lang.0 == LANGUAGE_CODE %}
|
|
||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-comments-o"></i> {% trans lang.1|capfirst %}<b class="caret"></b></a>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
{% for lang in LANGUAGES %}
|
{% for lang in LANGUAGES %}
|
||||||
{% if lang.0 != LANGUAGE_CODE %}
|
{% if lang.0 != LANGUAGE_CODE %}
|
||||||
@ -47,7 +43,7 @@
|
|||||||
<li><a href="{% url 'ClientDownload' %}"><span class="fa fa-download"></span> UDS Plugin</a></li>
|
<li><a href="{% url 'ClientDownload' %}"><span class="fa fa-download"></span> UDS Plugin</a></li>
|
||||||
{% if user.staff_member or user.is_admin %}
|
{% if user.staff_member or user.is_admin %}
|
||||||
<li><a href="{% url "uds.web.views.download" idDownload='' %}"><span class="fa fa-download"></span> {% trans "Downloads" %}</a></li>
|
<li><a href="{% url "uds.web.views.download" idDownload='' %}"><span class="fa fa-download"></span> {% trans "Downloads" %}</a></li>
|
||||||
{% ifbrowser ie<8 %}
|
{% ifbrowser ie<8 %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<li><a href="{% url "uds.admin.views.index" %}"><span class="fa fa-dashboard"></span> Dashboard</a></li>
|
<li><a href="{% url "uds.admin.views.index" %}"><span class="fa fa-dashboard"></span> Dashboard</a></li>
|
||||||
{% endifbrowser %}
|
{% endifbrowser %}
|
||||||
@ -59,7 +55,7 @@
|
|||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</nav>
|
</nav>
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{% load l10n i18n static html5 compress %}{% spaceless %}
|
{% load l10n i18n static html5 compress %}{% spaceless %}
|
||||||
{% get_current_language as LANGUAGE_CODE %}
|
{% get_current_language as LANGUAGE_CODE %}
|
||||||
{% get_available_languages as LANGUAGES %}
|
{% get_available_languages as LANGUAGES %}
|
||||||
|
{% get_language_info for LANGUAGE_CODE as LANGUAGE_INFO %}
|
||||||
<!DOCTYPE html>{% endspaceless %}
|
<!DOCTYPE html>{% endspaceless %}
|
||||||
<html lang='{{LANGUAGE_CODE}}'>
|
<html lang='{{LANGUAGE_CODE}}'>
|
||||||
<head>
|
<head>
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
|
{% if groups|length > 1 %}
|
||||||
<div class="ui top attached tabular menu">
|
<div class="ui top attached tabular menu">
|
||||||
{% for grp in groups %}
|
{% for grp in groups %}
|
||||||
<a class="tab {% if forloop.first %}active{% endif %} item" data-group="{{ grp.name }}">
|
<a class="tab {% if forloop.first %}active{% endif %} item" data-group="{{ grp.name }}">
|
||||||
@ -12,6 +13,7 @@
|
|||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
<div class="ui bottom attached segment">
|
<div class="ui bottom attached segment">
|
||||||
<p></p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
@ -21,11 +23,28 @@
|
|||||||
<i class="tag icon"></i> {% trans "Administrator info" %}
|
<i class="tag icon"></i> {% trans "Administrator info" %}
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui segment">
|
<div class="ui segment">
|
||||||
<p>{% trans "Ip" %}: {{ ip }}</p>
|
{% with request.ip_proxy|add:",No Proxy" as proxy %}
|
||||||
|
<p>{% trans "Ip" %}: {{ request.ip }}, {{ request.is_proxy|yesno:proxy }}</p>
|
||||||
|
{% endwith %}
|
||||||
<p>{% trans "Networks" %}: {{ nets }}</p>
|
<p>{% trans "Networks" %}: {{ nets }}</p>
|
||||||
<p>{% trans "Transports" %}: {{ transports }}</p>
|
<p>{% trans "Transports" %}: {{ transports }}</p>
|
||||||
<p>{% trans "User Agent" %}: {{ request.META.HTTP_USER_AGENT }}</p>
|
<p>{% trans "User Agent" %}: {{ request.META.HTTP_USER_AGENT }}</p>
|
||||||
<p>{% trans "OS" %}: {{ request.session.OS.OS }}</p>
|
<p>{% trans "Browser Info" %}: {{ request.os }}</p>
|
||||||
|
</div>
|
||||||
|
<div class="trans-placeholder">
|
||||||
|
<p></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ui basic modal info">
|
||||||
|
<i class="close icon"></i>
|
||||||
|
<div class="header info">
|
||||||
|
<p></p>
|
||||||
|
</div>
|
||||||
|
<div class="image content">
|
||||||
|
<div class="description info">
|
||||||
|
<p></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
@ -37,14 +56,17 @@
|
|||||||
<!-- preloading of templates -->
|
<!-- preloading of templates -->
|
||||||
{% js_template_path 'uds/semantic/tmpl' %}
|
{% js_template_path 'uds/semantic/tmpl' %}
|
||||||
{% js_template 'items' %}
|
{% js_template 'items' %}
|
||||||
|
{% js_template 'trans' %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block js %}
|
{% block js %}
|
||||||
<script>
|
<script>
|
||||||
var itemsTemplate = null;
|
var itemsTemplate = null;
|
||||||
|
var transTemplate = null;
|
||||||
|
|
||||||
var groups = {
|
var groups = {
|
||||||
{% for grp in groups %}
|
{% for grp in groups %}
|
||||||
"{{ grp.name }}": {
|
"{{ grp.name|escape }}": {
|
||||||
"items": [
|
"items": [
|
||||||
{% for ser in services %}
|
{% for ser in services %}
|
||||||
{% if ser.group.name == grp.name and ser.transports %}
|
{% if ser.group.name == grp.name and ser.transports %}
|
||||||
@ -69,16 +91,111 @@ var groups = {
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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 launch(el, url, alt) {
|
||||||
|
if ( url.substring(0, 7) == 'udsa://' ) {
|
||||||
|
uds.launch(el, url, alt);
|
||||||
|
} else {
|
||||||
|
window.location = url;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function showInfo(title, message) {
|
||||||
|
$('.header.info').html(title);
|
||||||
|
$('.description.info').html(message);
|
||||||
|
$('.modal.info').modal('show');
|
||||||
|
}
|
||||||
|
|
||||||
|
function canLaunch(item) {
|
||||||
|
if( item.not_accesible == true ) {
|
||||||
|
alert("Inaccesible");
|
||||||
|
} else if( item.maintenance == true ) {
|
||||||
|
showInfo('{% trans "In maintenance" %}', '{% trans "The service is currently in maintenance and cannot be accessed." %}');
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
function showSelectedTabItems() {
|
function showSelectedTabItems() {
|
||||||
|
{% if groups|length > 1 %}
|
||||||
var gName = $(".tab.active").attr('data-group');
|
var gName = $(".tab.active").attr('data-group');
|
||||||
|
{% else %}
|
||||||
|
var gName = "{{ groups.0.name }}";
|
||||||
|
{% endif %}
|
||||||
$('.attached.segment').html(itemsTemplate({
|
$('.attached.segment').html(itemsTemplate({
|
||||||
'data': groups[gName].items
|
'data': groups[gName].items
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
// $(".card").off();
|
||||||
|
$(".card").on('click', function(){
|
||||||
|
var gName = $('.tab.item.active').attr('data-group');
|
||||||
|
var index = $(this).attr('data-item');
|
||||||
|
var item = groups[gName].items[index];
|
||||||
|
if( canLaunch(item) == false ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
launch($(this), item.transports[0].link, "{% url 'uds.web.views.client_downloads' %}");
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.show-transports').on('click', function(event){
|
||||||
|
var card = $(this).parent().parent();
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
var gName = $('.tab.item.active').attr('data-group');
|
||||||
|
var index = $(this).closest('.card').attr('data-item');
|
||||||
|
var item = groups[gName].items[index];
|
||||||
|
if( canLaunch(item) == false ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// alert(groups[gName].items[index].transports[0]);
|
||||||
|
// Remove all previous modals
|
||||||
|
$('.ui.small.basic.modal').remove();
|
||||||
|
$('.trans-placeholder').html(transTemplate({
|
||||||
|
'data': item.transports
|
||||||
|
}));
|
||||||
|
$('.modal.transport')
|
||||||
|
.modal({
|
||||||
|
closable: true,
|
||||||
|
transition: "fly left",
|
||||||
|
offset: "",
|
||||||
|
onVisible: function() {
|
||||||
|
var $modal = $(this);
|
||||||
|
$('.transport-link').on('click', function(ev){
|
||||||
|
ev.preventDefault();
|
||||||
|
ev.stopPropagation();
|
||||||
|
$modal.modal('hide');
|
||||||
|
launch(card, $(this).attr('data-link'), "{% url 'uds.web.views.client_downloads' %}");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.modal('show')
|
||||||
|
;
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ready function
|
// Ready function
|
||||||
$(function(){
|
$(function(){
|
||||||
itemsTemplate = Handlebars.compile($("#tmpl_items").html());
|
itemsTemplate = Handlebars.compile($("#tmpl_items").html());
|
||||||
|
transTemplate = Handlebars.compile($("#tmpl_trans").html());
|
||||||
|
|
||||||
|
$('.modal.info').modal({
|
||||||
|
closable: true,
|
||||||
|
transition: "horizontal flip",
|
||||||
|
offset: "",
|
||||||
|
});
|
||||||
|
|
||||||
showSelectedTabItems();
|
showSelectedTabItems();
|
||||||
$(".tab.item").on('click', function(){
|
$(".tab.item").on('click', function(){
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
console.log(val, nonStandard);
|
console.log(val, nonStandard);
|
||||||
if( $.inArray(val.toString(), nonStandard) >= 0) {
|
if( $.inArray(val.toString(), nonStandard) >= 0) {
|
||||||
var vv = val;
|
var vv = val;
|
||||||
$("#login").hide(300, function() {
|
$("#loginform").hide(300, function() {
|
||||||
$.get('{%url "uds.web.views.customAuth" idAuth=''%}' + vv, function(data) {
|
$.get('{%url "uds.web.views.customAuth" idAuth=''%}' + vv, function(data) {
|
||||||
$('#nonStandardLogin').html(data);
|
$('#nonStandardLogin').html(data);
|
||||||
$('#nonStandard').show(300);
|
$('#nonStandard').show(300);
|
||||||
@ -62,7 +62,7 @@
|
|||||||
{% block body %}
|
{% block body %}
|
||||||
<div class="ui three column grid">
|
<div class="ui three column grid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="six wide column centered" id="login">
|
<div class="six wide column centered doubling stackable" id="login">
|
||||||
{% if form.errors %}
|
{% if form.errors %}
|
||||||
<div class="alert alert-dismissable alert-danger">
|
<div class="alert alert-dismissable alert-danger">
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||||
|
@ -1,42 +1,62 @@
|
|||||||
{% load i18n html5 static %}
|
{% load i18n html5 static %}
|
||||||
{% preferences_allowed as show_prefs %}
|
{% preferences_allowed as show_prefs %}
|
||||||
{% root_id as rootid %}
|
{% root_id as rootid %}
|
||||||
<div class="ui menu doubling grid">
|
<form id="form_language" action="{% url "django.views.i18n.set_language" %}" method="post">
|
||||||
|
{% csrf_token %}
|
||||||
|
<input type="hidden" name="language" id="id_language" value=""/>
|
||||||
|
</form>
|
||||||
|
<div class="computer tablet only ui menu grid">
|
||||||
<a class="header item" href="/">
|
<a class="header item" href="/">
|
||||||
<img class="ui mini spaced image" src="{% get_static_prefix %}img/udsicon.png">Universal Desktop Services
|
<img class="ui mini spaced image" src="{% get_static_prefix %}img/udsicon.png">Universal Desktop Services
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="right menu">
|
<div class="right menu">
|
||||||
<div class="item">
|
<div class="ui dropdown item">
|
||||||
<form id="form_language" action="{% url "django.views.i18n.set_language" %}" method="post">
|
{{ LANGUAGE_INFO.name }} <i class="dropdown icon"></i>
|
||||||
{% csrf_token %}
|
<div class="menu">
|
||||||
<select class="ui search selection dropdown" id="id_language" type="hidden" name="language">
|
{% for lang in LANGUAGES %}
|
||||||
{% for lang in LANGUAGES %}
|
<a class="item" onclick='$("#id_language").val("{{ lang.0 }}"); $("#form_language").submit()'>{% trans lang.1|capfirst %}</a>
|
||||||
<option value="{{ lang.0 }}"{% if lang.0 == LANGUAGE_CODE %} selected{%endif %}>{% trans lang.1|capfirst %}</option>
|
{% endfor %}
|
||||||
{% endfor %}
|
</div>
|
||||||
</select>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
<a class="item" href="{% url 'uds.web.views.about' %}">
|
<a class="item" href="{% url 'uds.web.views.about' %}">
|
||||||
{% trans 'About' %}
|
{% trans 'About' %}
|
||||||
</a>
|
</a>
|
||||||
{% if user and user.pk != None %}
|
{% include 'uds/semantic/snippets/user-menu.html' %}
|
||||||
<div class="item">
|
</div>
|
||||||
<div class="ui dropdown selection item">
|
</div>
|
||||||
<i class="user icon"></i> {{ user.real_name }}
|
|
||||||
<i class="dropdown icon"></i>
|
<div class="mobile only ui stackable menu grid">
|
||||||
<div class="menu">
|
<div class="ui styled fluid accordion">
|
||||||
{% if show_prefs and user.id != rootid %}
|
<div class="title">
|
||||||
<a class="item" href="{% url "uds.web.views.prefs" %}"><i class="edit icon"></i> {% trans 'Preferences' %}</a>
|
<img class="ui mini spaced image" src="{% get_static_prefix %}img/udsicon.png">
|
||||||
{% endif %}
|
Universal Desktop Services
|
||||||
<a class="item" href="{% url "ClientDownload" %}"><i class="disk download icon"></i> {% trans 'UDS Plugin' %}</a>
|
</div>
|
||||||
{% if user.staff_member or user.is_admin %}
|
<div class="content">
|
||||||
<a class="item" href="{% url "uds.web.views.download" idDownload='' %}"><i class="cloud download icon"></i> {% trans 'Downloads' %}</a>
|
<div class="ui styled fluid accordion">
|
||||||
<a class="item" href="{% url "uds.admin.views.index" %}"><i class="dashboard icon"></i> {% trans 'Dashboard' %}</a>
|
<div class="active title">
|
||||||
{% endif %}
|
<i class="dropdown icon"></i>
|
||||||
<a class="item" href="{% url "uds.web.views.logout" %}"><i class="toggle off icon"></i> {% trans 'Logout' %}</a>
|
What is a dog?
|
||||||
|
</div>
|
||||||
|
<div class="active content">
|
||||||
|
<p>A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.</p>
|
||||||
|
</div>
|
||||||
|
<div class="title">
|
||||||
|
<i class="dropdown icon"></i>
|
||||||
|
What kinds of dogs are there?
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
<p>There are many breeds of dogs. Each breed varies in size and temperament. Owners often select a breed of dog that they find to be compatible with their own lifestyle and desires from a companion.</p>
|
||||||
|
</div>
|
||||||
|
<div class="title">
|
||||||
|
<i class="dropdown icon"></i>
|
||||||
|
How do you acquire a dog?
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
<p>Three common ways for a prospective owner to acquire a dog is from pet shops, private owners, or shelters.</p>
|
||||||
|
<p>A pet shop may be the most convenient way to buy a dog. Buying a dog from a private owner allows you to assess the pedigree and upbringing of your dog before choosing to take it home. Lastly, finding your dog from a shelter, helps give a good home to a dog who may not find one so readily.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{% load l10n i18n static html5 compress %}{% spaceless %}
|
{% load l10n i18n static html5 compress %}{% spaceless %}
|
||||||
{% get_current_language as LANGUAGE_CODE %}
|
{% get_current_language as LANGUAGE_CODE %}
|
||||||
{% get_available_languages as LANGUAGES %}
|
{% get_available_languages as LANGUAGES %}
|
||||||
|
{% get_language_info for LANGUAGE_CODE as LANGUAGE_INFO %}
|
||||||
<!DOCTYPE html>{% endspaceless %}
|
<!DOCTYPE html>{% endspaceless %}
|
||||||
<html class="no-js" lang='{{LANGUAGE_CODE}}'>
|
<html class="no-js" lang='{{LANGUAGE_CODE}}'>
|
||||||
<head>
|
<head>
|
||||||
@ -23,7 +24,7 @@
|
|||||||
{% endcompress %}
|
{% endcompress %}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="uds-body">
|
<body>
|
||||||
<!-- Navigation bar -->
|
<!-- Navigation bar -->
|
||||||
{% block menu %}{% include 'uds/semantic/snippets/navbar.html' %}{% endblock %}
|
{% block menu %}{% include 'uds/semantic/snippets/navbar.html' %}{% endblock %}
|
||||||
{% ifbrowser ie<10 %}
|
{% ifbrowser ie<10 %}
|
||||||
@ -68,9 +69,9 @@
|
|||||||
$('.ui.dropdown')
|
$('.ui.dropdown')
|
||||||
.dropdown()
|
.dropdown()
|
||||||
;
|
;
|
||||||
$('#id_language').on('change', function() {
|
$('.ui.accordion')
|
||||||
$('#form_language').submit();
|
.accordion()
|
||||||
});
|
;
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<script type="text/coffeescript" charset="utf-8" src="{% get_static_prefix %}js/uds-client.coffee"></script>
|
<script type="text/coffeescript" charset="utf-8" src="{% get_static_prefix %}js/uds-client.coffee"></script>
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% verbatim %}
|
{% verbatim %}
|
||||||
<div class="ui five doubling link cards">
|
<div class="ui four doubling stackable link cards">
|
||||||
{{#each data}}
|
{{#each data}}
|
||||||
<div class="card">
|
<div class="card" data-item="{{ @index }}">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="right floated mini ui image">
|
<div class="right floated mini ui image">
|
||||||
<img src="{{ image }}">
|
<img src="{{ image }}">
|
||||||
@ -19,9 +19,9 @@
|
|||||||
{{# if show_transports }}
|
{{# if show_transports }}
|
||||||
{{# compare transports.length 1 operator=">" }}
|
{{# compare transports.length 1 operator=">" }}
|
||||||
<div class="extra content">
|
<div class="extra content">
|
||||||
<a>
|
<a class="show-transports">
|
||||||
<i class="open folder icon"></i>
|
<i class="open folder icon"></i>
|
||||||
{% endverbatim %}{% trans 'Transports' %}{% verbatim %}{{ transports.length }}
|
{% endverbatim %}{% trans 'Connections' %}{% verbatim %}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{{/ compare }}
|
{{/ compare }}
|
||||||
|
@ -226,10 +226,10 @@ def pluginDownloadUrl(os):
|
|||||||
return tmpl.format(url=static('clients/UDSClientSetup-{version}.exe'.format(version=CLIENT_VERSION)), os='Windows')
|
return tmpl.format(url=static('clients/UDSClientSetup-{version}.exe'.format(version=CLIENT_VERSION)), os='Windows')
|
||||||
elif os == 'linux':
|
elif os == 'linux':
|
||||||
linux_packages = (
|
linux_packages = (
|
||||||
('udsclient_{version}_all.deb'.format(version=CLIENT_VERSION), _('Debian based Linux')),
|
('udsclient_{version}_all.deb'.format(version=CLIENT_VERSION), _('Debian based Linux') + ' ' + _('(requires Python-2.7)')),
|
||||||
('udsclient-{version}-1.noarch.rpm'.format(version=CLIENT_VERSION), _('Red Hat based Linux (RH, Fedora, Centos, ...)')),
|
('udsclient-{version}-1.noarch.rpm'.format(version=CLIENT_VERSION), _('Red Hat based Linux (RH, Fedora, Centos, ...)') + ' ' + _('(requires Python-2.7)')),
|
||||||
('udsclient-opensuse-{version}-1.noarch.rpm'.format(version=CLIENT_VERSION), _('Suse based Linux')),
|
('udsclient-opensuse-{version}-1.noarch.rpm'.format(version=CLIENT_VERSION), _('Suse based Linux') + ' ' + _('(requires Python-2.7)')),
|
||||||
('udsclient-{version}.tar.gz'.format(version=CLIENT_VERSION), _('Generic .tar.gz Linux'))
|
('udsclient-{version}.tar.gz'.format(version=CLIENT_VERSION), _('Generic .tar.gz Linux') + ' ' + _('(requires Python-2.7)'))
|
||||||
)
|
)
|
||||||
res = ''
|
res = ''
|
||||||
for v in linux_packages:
|
for v in linux_packages:
|
||||||
|
Loading…
Reference in New Issue
Block a user