mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-10 06:32:36 +01:00
Project and context view can now be grouped by context and project (using view menu)
This commit is contained in:
parent
591e20c9f1
commit
0a57a68a87
10 changed files with 34 additions and 15 deletions
|
|
@ -2,11 +2,8 @@
|
|||
@not_done = @not_done_todos.select {|t| t.project_id == project.id }
|
||||
# invalidate the cache every day because of staleness or
|
||||
# rendering of "due in x days" that change without touching updated at of the todo
|
||||
cache [project, @source_view, current_user.date.strftime("%Y%m%d")] do
|
||||
cache [project, @source_view, current_user.date.strftime("%Y%m%d"), @tag_name] do
|
||||
-%>
|
||||
<% if source_view_is :project -%>
|
||||
<%= render :partial => "project_settings_container", :locals => {:project => project} %>
|
||||
<% end -%>
|
||||
<%=
|
||||
title = source_view_is(:project) ? t('projects.actions_in_project_title') : show_project_name(project)
|
||||
|
||||
|
|
|
|||
|
|
@ -5,11 +5,18 @@
|
|||
:suppress_project => true,
|
||||
:parent_container_type => 'project'
|
||||
}
|
||||
if @not_done_todos.count == 0
|
||||
# force project view so one empty container will be shown with an empty message
|
||||
@group_view_by = 'project'
|
||||
end
|
||||
show_empty_containers = (@group_view_by == 'project')
|
||||
-%>
|
||||
<div id="display_box">
|
||||
<%= project_next_prev %>
|
||||
|
||||
<%= render :partial => @project, :locals => {:settings => {:collapsible => false, :show_empty_containers => true, :parent_container_type => 'project' }} %>
|
||||
<%= render :partial => "project_settings_container", :locals => {:project => @project} %>
|
||||
|
||||
<%= show_grouped_todos({:collapsible => false, :show_empty_containers => show_empty_containers, :parent_container_type => 'project' }) %>
|
||||
|
||||
<%= show_deferred_pending_todos(@deferred_todos, @pending_todos, deferred_pending_options) %>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue