1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-22 13:34:04 +03:00

Added downloadables for clients

This commit is contained in:
Adolfo Gómez García 2015-04-23 07:07:14 +02:00
parent ef302205bc
commit 4ed20850ae
3 changed files with 19 additions and 9 deletions

View File

@ -1 +1 @@
/udsactor-opensuse-1.7.0.spec /udsactor-*1.*.spec

View File

@ -10,23 +10,23 @@
<div class="col-md-8 col-md-offset-2 bg-primary img-rounded"> <div class="col-md-8 col-md-offset-2 bg-primary img-rounded">
<h3>{% trans 'Download UDS Plugin for' %} {{ os|osName }}</h3> <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> <p>{% trans 'In order to be able to execute UDS services, you need to have UDS plugin installed.' %}</p>
<p class="text-center">{{ os|pluginDownloadUrl|safe }}</a></p> <div class="text-center">{{ os|pluginDownloadUrl|safe }}</div>
<h3>{% trans 'Or download another version' %}</h3> <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>{% trans 'In case that your platform has been incorrectly detected, you can download manually the version required for your Operating System' %}</p>
<p> <p>
{% if os != 'linux' %} {% if os != 'linux' %}
<p class="text-center"> <p class="text-center">
<a href="#" class="btn btn-warning">{% trans 'Linux UDS plugin' %}</a> <a href="{% url 'uds.web.views.client_downloads' os='Linux' %}" class="btn btn-warning">{% trans 'Linux UDS plugin' %}</a>
</p> </p>
{% endif %} {% endif %}
{% if os != 'windows' %} {% if os != 'windows' %}
<p class="text-center"> <p class="text-center">
<a href="#" class="btn btn-warning">{% trans 'Windows UDS plugin' %}</a> <a href="{% url 'uds.web.views.client_downloads' os='Windows' %}" class="btn btn-warning">{% trans 'Windows UDS plugin' %}</a>
</p> </p>
{% endif %} {% endif %}
{% if os != 'mac' %} {% if os != 'mac' %}
<p class="text-center"> <p class="text-center">
<a href="#" class="btn btn-warning">{% trans 'Mac OSX (>10.5) UDS plugin' %}</a> <a href="{% url 'uds.web.views.client_downloads' os='Mac' %}" class="btn btn-warning">{% trans 'Mac OSX (>10.5) UDS plugin' %}</a>
</p> </p>
{% endif %} {% endif %}
</p> </p>
@ -45,7 +45,7 @@
{% trans "In this case, you will have to manually download the plugin by using the menu on upper right corner." %}</p> {% 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"> <p class="text-center">
<a href="{% url 'uds.web.views.index' %}" class="btn btn-info"><i class="fa fa-home"></i> {% trans "Return" %}</a> <a href="{% url 'uds.web.views.index' %}" class="btn btn-info"><i class="fa fa-home"></i> {% trans "Return" %}</a>
</div> </p>
{% endif %} {% endif %}
</div> </div>
</div> </div>

View File

@ -217,9 +217,19 @@ def osName(os):
@register.filter(name='pluginDownloadUrl') @register.filter(name='pluginDownloadUrl')
def pluginDownloadUrl(os): def pluginDownloadUrl(os):
tmpl = '<a href="{url}" class="btn btn-success">' + _('Download UDS Plugin for') + ' {os}</a>' tmpl = '<a href="{url}" class="btn btn-success">' + _('Download UDS Plugin for') + ' {os}</a>'
if os == 'windows': if os == 'windows':
return tmpl.format(url=static('client/UDSClientSetup.exe'), os='Windows') return tmpl.format(url=static('clients/UDSClientSetup.exe'), os='Windows')
elif os == 'linux': elif os == 'linux':
return '2' linux_packages = (
('udsclient_1.7.5_all.deb', _('Debian based Linux')),
('udsclient-1.7.5-1.noarch.rpm', _('Red Hat based Linux (RH, Fedora, Centos, ...)')),
('udsclient-opensuse-1.7.5-1.noarch.rpm', _('Suse based Linux')),
('udsclient-1.7.5.tar.gz', _('Generic .tar.gz Linux'))
)
res = ''
for v in linux_packages:
res += '<p class="text-center">' + tmpl.format(url=static('clients/' + v[0]), os=v[1]) + '</p>'
return res
else: else:
return tmpl.format(url=static('client/UDSClient.dmg'), os='Mac OSX') return tmpl.format(url=static('clients/UDSClient.dmg'), os='Mac OSX')