Commit ec0f71a1ad2b1d4cceea1fa1f108a0a479a7bb73

Authored by Gabriela Navarro
1 parent e3d3992f

Fixing view of the box-organizer

Signed-off-by: David Carlos <ddavidcarlos1392@gmail.com>
Signed-off-by: Gabriela Navarro <navarro1703@gmail.com>
Showing 1 changed file with 14 additions and 8 deletions   Show diff stats
views/box_organizer/_download_block.html.erb
1 -<%= javascript_include_tag "edit-link-list.js" %>  
2 <div id='edit-download-block'> 1 <div id='edit-download-block'>
3 <ul class="link-list-header"> 2 <ul class="link-list-header">
4 <li class='download-list-name'><%= _('Name') %></li> 3 <li class='download-list-name'><%= _('Name') %></li>
@@ -10,15 +9,22 @@ @@ -10,15 +9,22 @@
10 </ul> 9 </ul>
11 10
12 <ul id="droppable-list-downloads"> 11 <ul id="droppable-list-downloads">
13 - <% for download in @block.downloads %>  
14 - <%= render :partial => 'download_list', :locals => {:download => download} %> 12 + <% if @block.downloads.count > 0 %>
  13 + <% for download in @block.downloads %>
  14 + <%= render :partial => 'download_list', :locals => {:download => download} %>
  15 + <% end %>
  16 + <% else %>
  17 + <div id = "new">
  18 + <% new = {'icon' => 'ok'} %>
  19 + <%= render :partial => 'download_list', :locals => {:download => new} %>
  20 + </div>
15 <% end %> 21 <% end %>
16 </ul> 22 </ul>
17 23
18 - <div id = "new" >  
19 - <% new = {'icon' => 'ok'} %>  
20 - <%= render :partial => 'download_list', :locals => {:download => new} %>  
21 - </div> 24 +<div id ="new-template" style="display: none">
  25 + <% new = {'icon' => 'ok'} %>
  26 + <%= render :partial => 'download_list', :locals => {:download => new} %>
  27 +</div>
22 28
23 -<%= link_to_function(_('New link'), 'add_new_link();', :class => 'button icon-add with-text') %> 29 +<%= link_to_function _('New link'), 'add_new_link(); return false', :class => 'button icon-add with-text download-new-link-button' %>
24 </div> 30 </div>