mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-24 19:20:13 +01:00
31 lines
2 KiB
Text
31 lines
2 KiB
Text
<div class="project-state-group" id="list-<%= state %>-projects-container" <%= " style=\"display:none\"" if project_state_group.empty? %>>
|
|
<h2><span id="<%= state %>-projects-count" class="badge"><%= project_state_group.length %></span><%= state.titlecase %> Projects</h2>
|
|
<div class="menu_sort"><span class="sort_separator">Sort </span>
|
|
<div class="alpha_sort">
|
|
<%= link_to("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
|
|
%></div><span class="sort_separator"> | </span><div class="tasks_sort">
|
|
<%= link_to("By number of tasks", actionize_projects_path(:state => state),
|
|
:class => "actionize_link", :title => "Sort these projects by number of tasks") %>
|
|
<% apply_behavior '.actionize_link:click', :prevent_default => true do |page, element|
|
|
page.confirming 'Are you sure that you want to sort these projects by the number of tasks? This will replace the existing sort order.' do
|
|
page << "tasksSort = this.up('.tasks_sort');
|
|
tasksSort.startWaiting();"
|
|
page << remote_to_href(:complete => "tasksSort.stopWaiting()")
|
|
end
|
|
end
|
|
%></div>
|
|
</div>
|
|
|
|
<div id="list-<%= state %>-projects" class="project-list">
|
|
<%= render :partial => 'project_listing', :collection => project_state_group %>
|
|
</div>
|
|
<%= sortable_element "list-#{state}-projects", get_listing_sortable_options("list-#{state}-projects") %>
|
|
</div>
|