2012-09-19 17:13:29 +02:00
|
|
|
<%
|
2013-03-05 14:04:01 +01:00
|
|
|
@not_done = @not_done_todos.select {|t| t.project_id == project.id }
|
2012-09-19 17:13:29 +02:00
|
|
|
# invalidate the cache every day because of staleness or
|
|
|
|
|
# rendering of "due in x days" that change without touching updated at of the todo
|
2013-03-05 14:04:01 +01:00
|
|
|
cache [project, @source_view, current_user.date.strftime("%Y%m%d")] do
|
|
|
|
|
%>
|
|
|
|
|
<%= render :partial => "project_settings_container", :locals => {:project => project} if source_view_is :project %>
|
2012-08-27 21:00:51 +02:00
|
|
|
|
2013-03-05 14:04:01 +01:00
|
|
|
<div id="p<%= project.id %>" class="container project" style="display:<%= (collapsible && @not_done.empty?) ? "none" : "block" %>">
|
|
|
|
|
<h2>
|
|
|
|
|
<%= container_toggle("toggle_p#{project.id}") if collapsible %>
|
|
|
|
|
<%= source_view_is(:project) ? t('projects.actions_in_project_title') : show_project_name(project) %>
|
|
|
|
|
</h2>
|
2012-08-27 21:00:51 +02:00
|
|
|
<div id="p<%= project.id %>items" class="items toggle_target">
|
|
|
|
|
<div id="p<%= project.id %>empty-nd" style="display:<%= @not_done.empty? ? 'block' : 'none'%>;">
|
|
|
|
|
<div class="message"><p><%= t('projects.no_actions_in_project') %></p></div>
|
|
|
|
|
</div>
|
|
|
|
|
<%= render :partial => "todos/todo", :collection => @not_done, :locals => { :parent_container_type => "project" } %>
|
2007-03-30 04:36:52 +00:00
|
|
|
</div>
|
2009-04-18 23:50:12 +02:00
|
|
|
</div>
|
2013-03-05 14:04:01 +01:00
|
|
|
|
2012-11-14 22:01:43 -05:00
|
|
|
<% end %>
|