2012-08-27 21:00:51 +02:00
|
|
|
<%
|
|
|
|
|
@not_done = @not_done_todos.select {|t| t.context_id == context.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
|
2012-12-16 17:03:23 +01:00
|
|
|
cache [context, @source_view, current_user.date.strftime("%Y%m%d"), @tag_name] do
|
2012-08-27 21:00:51 +02:00
|
|
|
%>
|
|
|
|
|
<div id="c<%= context.id %>" class="container context" style="display:<%= (collapsible && @not_done.empty?) ? "none" : "block" %>">
|
|
|
|
|
<h2>
|
2013-03-05 14:04:01 +01:00
|
|
|
<%= container_toggle("toggle_c#{context.id}") %>
|
|
|
|
|
<%= show_context_name(context) %>
|
2012-08-27 21:00:51 +02:00
|
|
|
</h2>
|
|
|
|
|
<div id="c_<%=context.id%>_target" class="context_target drop_target"></div>
|
|
|
|
|
<div id="c<%= context.id %>items" class="items toggle_target">
|
|
|
|
|
<div id="c<%= context.id %>empty-nd" style="display:<%= @not_done.empty? ? 'block' : 'none'%>;">
|
|
|
|
|
<div class="message"><p><%= t 'contexts.no_actions' %></p></div>
|
|
|
|
|
</div>
|
|
|
|
|
<%= render :partial => "todos/todo", :collection => @not_done, :locals => { :parent_container_type => "context" } %>
|
2007-03-30 04:36:52 +00:00
|
|
|
</div>
|
2012-03-23 14:04:55 +01:00
|
|
|
</div>
|
2012-11-14 22:01:43 -05:00
|
|
|
<% end %>
|