From 6a1469de6d614ca05877668f4d50fd4fa3e0fd51 Mon Sep 17 00:00:00 2001 From: Gabriel Silva Date: Mon, 25 Jan 2016 19:27:54 +0000 Subject: [PATCH] Fixes download list item link --- src/noosfero-spb/software_communities/public/blocks/software-download.js | 2 +- src/noosfero-spb/software_communities/views/box_organizer/_download_file.html.erb | 2 +- src/noosfero-spb/software_communities/views/box_organizer/_download_list_item.html.erb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/noosfero-spb/software_communities/public/blocks/software-download.js b/src/noosfero-spb/software_communities/public/blocks/software-download.js index ba563cb..0661bba 100644 --- a/src/noosfero-spb/software_communities/public/blocks/software-download.js +++ b/src/noosfero-spb/software_communities/public/blocks/software-download.js @@ -11,7 +11,7 @@ modulejs.define('SoftwareDownload', ['jquery', 'NoosferoRoot'], function($, Noos } SoftwareDownload.prototype.selectFile = function(element) { - var path = $(element).find('.file-path').html(); + var path = "/" + noosfero.profile + "/" + $(element).find('.file-path').html(); var size = $(element).find('.file-size').html(); var download_option = $(element).find('.file-size').closest('.download-option'); diff --git a/src/noosfero-spb/software_communities/views/box_organizer/_download_file.html.erb b/src/noosfero-spb/software_communities/views/box_organizer/_download_file.html.erb index 8daf98e..17e3b17 100644 --- a/src/noosfero-spb/software_communities/views/box_organizer/_download_file.html.erb +++ b/src/noosfero-spb/software_communities/views/box_organizer/_download_file.html.erb @@ -1,5 +1,5 @@
  • - <%= file.full_name%> - <%= number_to_human_size(file.size, precision: 2) %> + <%= file.path %> - <%= number_to_human_size(file.size, precision: 2) %>
  • diff --git a/src/noosfero-spb/software_communities/views/box_organizer/_download_list_item.html.erb b/src/noosfero-spb/software_communities/views/box_organizer/_download_list_item.html.erb index ec1067c..372b9b0 100644 --- a/src/noosfero-spb/software_communities/views/box_organizer/_download_list_item.html.erb +++ b/src/noosfero-spb/software_communities/views/box_organizer/_download_list_item.html.erb @@ -25,7 +25,7 @@
  • - <%= labelled_form_field(_('Size'), text_field_tag('block[downloads][][size]', (defined? download) ? download[:size] : '')) %> + <%= required labelled_form_field(_('Size'), text_field_tag('block[downloads][][size]', (defined? download) ? download[:size] : '')) %>
  • <%= button_without_text(:delete, _('Delete'), "#" , { :onclick => 'softwareDownload.deleteDownload(this); return false', :class=>"delete-link-list-row" }) %>
  • -- libgit2 0.21.2