<%% content_for :scripts do %> <%% end %> <%% unless @<%= singular_table_name %>.children.blank? %> <%%= semantic_form_for :index, :url => {:controller => "menus", :action => "bulk" } do |f| %> <%% @<%= singular_table_name %>.children.each do |menu| %> <%% end %>
All Title Children Resource Type Actions
<%%= check_box_tag 'menus[]', menu.id %> <%%= link_to menu.title, [:admin, menu] %> <%% unless menu.show_in_menu %> [Hidden] <%% end %> <%%= menu.children.count %> <%%= menu.resource.class unless menu.resource.class == NilClass %> <%%= link_to "Show", [:admin,menu], :class => "button small" %> <%%= link_to 'Edit', edit_admin_menu_path(menu), :class=>"button small" %> <%%= link_to 'Destroy', [:admin, menu], :confirm => 'Are you sure?', :method => :delete, :class=>"button small" %>
<%%= f.inputs :name => "Bulk Operations" do %> <%%= f.commit_button "Delete Selected" %> <%%= f.input :parent_id, :as => :select, :collection => nested_set_options(Menu) {|i| "#{'-' * i.level} #{i.title}" unless i.level > 1 }.to_a.reject{|i| i[0].nil?} %> <%%= f.commit_button "Move Selected" %> <%% end %> <%% end %> <%% end %>