>
<%= project_state_group.length %><%= state.titlecase %> Projects
<%= link_to("Sort Alphabetically", alphabetize_projects_path(:state => state),
:class => "alphabetize_link", :title => "Sort these projects alphabetically") %>
<% apply_behavior '.alphabetize_link:click', :prevent_default => true do |page, element|
page.confirming 'Are you sure that you want to sort these projects alphabetically? This will replace the existing sort order.' do
page << "alphaSort = this.up('.alpha_sort');
alphaSort.startWaiting();"
page << remote_to_href(:complete => "alphaSort.stopWaiting()")
end
end
%>
<%= render :partial => 'project_listing', :collection => project_state_group %>
<%= sortable_element "list-#{state}-projects", get_listing_sortable_options("list-#{state}-projects") %>