mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-19 07:26:10 +01:00
Ading a sort by number of tasks option
This commit is contained in:
parent
0673d67b62
commit
ee5c730f44
4 changed files with 30 additions and 1 deletions
|
|
@ -11,9 +11,21 @@
|
|||
end
|
||||
end
|
||||
%></div>
|
||||
|
||||
<div class="tasks_sort">
|
||||
<%= link_to("Sort 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 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>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue