diff --git a/src/noosfero-spb/software_communities/public/style.css b/src/noosfero-spb/software_communities/public/style.css index b1bc1e2..0ba3d8a 100644 --- a/src/noosfero-spb/software_communities/public/style.css +++ b/src/noosfero-spb/software_communities/public/style.css @@ -117,3 +117,27 @@ .catalog_rating_block { margin-top: 5px; } + +#droppable-list-downloads .download-forms{ + margin-bottom: 20px; + margin-left: 0; +} + +.download-forms ul li{ + margin-bottom: 10px; +} + +.download-forms ul li label{ + display: block; + margin-bottom: 5px; +} + +#edit-download-block ul.link-list-header{ + display: none; +} + +#edit-download-block{ + margin-top: 10px; +} + +/* end of profile_design download block */ diff --git a/src/noosfero-spb/software_communities/views/box_organizer/_download_block.html.erb b/src/noosfero-spb/software_communities/views/box_organizer/_download_block.html.erb index 6a621ec..623c058 100644 --- a/src/noosfero-spb/software_communities/views/box_organizer/_download_block.html.erb +++ b/src/noosfero-spb/software_communities/views/box_organizer/_download_block.html.erb @@ -1,12 +1,6 @@
- +

<%= _('Download options') %>

<% @block.downloads.each do |download| %> <%= render :partial => 'download_list', :locals => {:download => download} %> diff --git a/src/noosfero-spb/software_communities/views/box_organizer/_download_list.html.erb b/src/noosfero-spb/software_communities/views/box_organizer/_download_list.html.erb index 1cbd524..5565495 100644 --- a/src/noosfero-spb/software_communities/views/box_organizer/_download_list.html.erb +++ b/src/noosfero-spb/software_communities/views/box_organizer/_download_list.html.erb @@ -1,10 +1 @@ -
  • -
      -
    • <%= text_field_tag('block[downloads][][name]', download[:name], :class => "block_download_name") %>
    • -
    • <%= text_field_tag('block[downloads][][link]', download[:link], :class => "block_download_link") %>
    • -
    • <%= text_field_tag('block[downloads][][software_description]', download[:software_description], :class => "block_download_software_description") %>
    • -
    • <%= text_field_tag('block[downloads][][minimum_requirements]', download[:minimum_requirements], :class => "block_download_minimum_requirements") %>
    • -
    • <%= text_field_tag('block[downloads][][size]', download[:size], :class => "block_download_size") %>
    • -
    • <%= button_without_text(:delete, _('Delete'), "#" , { :onclick => 'softwareDownload.deleteDownload(this); return false', :class=>"delete-link-list-row" }) %>
    • -
    -
  • +<%= render :partial => 'box_organizer/download_list_template' %> diff --git a/src/noosfero-spb/software_communities/views/box_organizer/_download_list_template.html.erb b/src/noosfero-spb/software_communities/views/box_organizer/_download_list_template.html.erb index eb9e4cf..29b6e0a 100644 --- a/src/noosfero-spb/software_communities/views/box_organizer/_download_list_template.html.erb +++ b/src/noosfero-spb/software_communities/views/box_organizer/_download_list_template.html.erb @@ -1,10 +1,25 @@ -
  • -
      -
    • <%= text_field_tag('block[downloads][][name]', '', :class => "block_download_name") %>
    • -
    • <%= text_field_tag('block[downloads][][link]', '', :class => "block_download_link") %>
    • -
    • <%= text_field_tag('block[downloads][][software_description]', '', :class => "block_download_software_description") %>
    • -
    • <%= text_field_tag('block[downloads][][minimum_requirements]', '', :class => "block_download_minimum_requirements") %>
    • -
    • <%= text_field_tag('block[downloads][][size]', '', :class => "block_download_size") %>
    • -
    • <%= button_without_text(:delete, _('Delete'), "#" , { :onclick => 'softwareDownload.deleteDownload(this); return false', :class=>"delete-link-list-row" }) %>
    • +
    • +
        +
      • + <%= labelled_form_field(_('Name'), text_field_tag('block[downloads][][name]')) %> +
      • + +
      • + <%= labelled_form_field(_('Link'), text_field_tag('block[downloads][][link]')) %> +
      • + +
      • + <%= labelled_form_field(_('Platforms'), text_field_tag('block[downloads][][software_description]')) %> +
      • + +
      • + <%= labelled_form_field(_('Minimum Requirements'), text_field_tag('block[downloads][][minimum_requirements]')) %> +
      • + +
      • + <%= labelled_form_field(_('Size'), text_field_tag('block[downloads][][size]')) %> +
      • + +
      • <%= button_without_text(:delete, _('Delete'), "#" , { :onclick => 'softwareDownload.deleteDownload(this); return false', :class=>"delete-link-list-row" }) %>
    • -- libgit2 0.21.2