Commit 6a1469de6d614ca05877668f4d50fd4fa3e0fd51
1 parent
0ea94593
Exists in
refactor_download_block
Fixes download list item link
Signed-off-by: Luciano Prestes <lucianopcbr@gmail.com> Signed-off-by: Gabriel Silva <gabriel93.silva@gmail.com> Signed-off-by: ArthurJahn <stutrzbecher@gmail.com>
Showing
3 changed files
with
3 additions
and
3 deletions
Show diff stats
src/noosfero-spb/software_communities/public/blocks/software-download.js
... | ... | @@ -11,7 +11,7 @@ modulejs.define('SoftwareDownload', ['jquery', 'NoosferoRoot'], function($, Noos |
11 | 11 | } |
12 | 12 | |
13 | 13 | SoftwareDownload.prototype.selectFile = function(element) { |
14 | - var path = $(element).find('.file-path').html(); | |
14 | + var path = "/" + noosfero.profile + "/" + $(element).find('.file-path').html(); | |
15 | 15 | var size = $(element).find('.file-size').html(); |
16 | 16 | |
17 | 17 | var download_option = $(element).find('.file-size').closest('.download-option'); | ... | ... |
src/noosfero-spb/software_communities/views/box_organizer/_download_file.html.erb
1 | 1 | <li> |
2 | 2 | <a onclick="softwareDownload.selectFile(this)"> |
3 | - <span class="file-path"><%= file.full_name%></span> - <span class="file-size"><%= number_to_human_size(file.size, precision: 2) %></span> | |
3 | + <span class="file-path"><%= file.path %></span> - <span class="file-size"><%= number_to_human_size(file.size, precision: 2) %></span> | |
4 | 4 | </a> |
5 | 5 | </li> | ... | ... |
src/noosfero-spb/software_communities/views/box_organizer/_download_list_item.html.erb
... | ... | @@ -25,7 +25,7 @@ |
25 | 25 | </li> |
26 | 26 | |
27 | 27 | <li> |
28 | - <%= labelled_form_field(_('Size'), text_field_tag('block[downloads][][size]', (defined? download) ? download[:size] : '')) %> | |
28 | + <%= required labelled_form_field(_('Size'), text_field_tag('block[downloads][][size]', (defined? download) ? download[:size] : '')) %> | |
29 | 29 | </li> |
30 | 30 | |
31 | 31 | <li class='delete-download-button'><%= button_without_text(:delete, _('Delete'), "#" , { :onclick => 'softwareDownload.deleteDownload(this); return false', :class=>"delete-link-list-row" }) %></li> | ... | ... |