Commit 6648e6ec authored by Leo Iannacone's avatar Leo Iannacone

added button to download current file

parent 68ed889f
......@@ -5,8 +5,15 @@ var Page_Distrubion = {
if (! data)
data = Utils.from_hash_to_data()
label = ''
if (Utils.check_data_file(data))
label = data.package.orig_name + '.' + data.file.name
if (Utils.check_data_file(data)) {
complete_name = data.package.orig_name + '.' + data.file.name
if (! data.file.path)
data.file.path = DEBOMATIC_STATIC + '/' + data.distribution.name + '/pool/' + data.package.orig_name + '/' + complete_name
label = complete_name + ' \
<a class="btn btn-link btn-lg" title="Download" href="' + data.file.path + '">\
<span class="glyphicon glyphicon-download-alt"></span>\
</a>'
}
else if (Utils.check_data_package(data))
label = data.package.orig_name
else if (Utils.check_data_distribution(data))
......
......@@ -12,6 +12,7 @@
<script src="/libs/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<script>
var DEBOMATIC_STATIC = '<%= paths.debomatic %>'
var AUTOSCROLL = <%= autoscroll %>
var DISTRIBUTION_PAGE = '<%= paths.distribution %>'
var HOSTNAME = '<%= host %><% if (port) { %>:<%= port%><% } %>'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment