%li{:id => dom_id_for(section, :container), :class => 'menu' }
  %div{ :id => dom_id_for(section, :item), :class => @investigation.changeable?(current_user) ? 'item movable' : 'item' }
    %div.action_menu
      %div.action_menu_header_left   
        =link_to name_for_component(section), section
      %div.action_menu_header_right   
        %ul.menu
          - if (section.changeable?(current_user))
            %li= link_to 'duplicate', duplicate_section_url(section)
            / %li= link_to 'edit', section
            / %li.menu=toggle_more section
            %li.menu=link_to_remote 'delete', :confirm => "delete section #{section.name}?", :url => { :controller => 'investigations', :action => 'delete_section', :params => {:id=>section.investigation.id, :section_id => section.id}}, :html => {:class=>"delete"}
    %div{:id => dom_id_for(section, :details), :class => 'content', :style =>'display:block;'}
      = section.description
      %ul.tiny
      - section.pages.each_with_index do |page, i|
        %li.tiny
          = link_to "page: #{i+1}: #{page.name}", page
          %span.tiny= page.description

%li{:id => dom_id_for(section, :container), :class => 'menu' }
  %div{ :id => dom_id_for(section, :item), :class => section.investigation.changeable?(current_user) ? 'item movable' : 'item' }
    %div.action_menu
      %div.action_menu_header_left   
        =link_to name_for_component(section), section
      %div.action_menu_header_right   
        %ul.menu
          - if (section.changeable?(current_user))
            %li= link_to 'duplicate', duplicate_section_url(section)
            / %li= link_to 'edit', section
            / %li.menu=toggle_more section
            %li.menu=link_to_remote 'delete', :confirm => "delete section #{section.name}?", :url => { :controller => 'investigations', :action => 'delete_section', :params => {:id=>section.investigation.id, :section_id => section.id}}, :html => {:class=>"delete"}
    %div{:id => dom_id_for(section, :details), :class => 'content', :style =>'display:block;'}
      = section.description
      %ul.tiny
      - section.pages.each_with_index do |page, i|
        %li.tiny
          = link_to "page: #{i+1}: #{page.name}", page
          %span.tiny= page.description

Fix for error on "add section"
Fix for error on "add section"
