mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-28 21:08:48 +01:00
enable group by project for tickler
This commit is contained in:
parent
8b464112ad
commit
caec4f214a
2 changed files with 7 additions and 1 deletions
|
|
@ -590,10 +590,12 @@ class TodosController < ApplicationController
|
|||
@page_title = t('todos.deferred_tasks_title')
|
||||
|
||||
@contexts_to_show = @contexts = current_user.contexts
|
||||
@projects_to_show = @projects = current_user.projects
|
||||
|
||||
includes = params[:format]=='xml' ? [:context, :project] : Todo::DEFAULT_INCLUDES
|
||||
|
||||
@not_done_todos = current_user.todos.deferred.includes(includes) + current_user.todos.pending.includes(includes)
|
||||
@todos_without_project = @not_done_todos.select{|t|t.project.nil?}
|
||||
@down_count = @count = @not_done_todos.size
|
||||
|
||||
respond_to do |format|
|
||||
|
|
|
|||
|
|
@ -2,7 +2,11 @@
|
|||
|
||||
<%= empty_message_holder("deferred_pending", @not_done_todos.empty?) %>
|
||||
|
||||
<%= render :partial => @contexts, :locals => { :settings => {:collapsible => true} } %>
|
||||
<%= show_grouped_todos %>
|
||||
|
||||
<% if @group_view_by == 'project' -%>
|
||||
<%= show_todos_without_project(@todos_without_project) -%>
|
||||
<% end -%>
|
||||
|
||||
</div>
|
||||
<div id="input_box">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue