tracks/app/views/contexts/_context.m.erb
2012-05-12 13:37:36 +02:00

14 lines
438 B
Text

<%
# select actions from this context
@not_done = @not_done_todos.select {|t| t.context_id == context.id }
if not @not_done.empty?
# only show a context when there are actions in it
-%>
<h2><%= link_to context.name, context_path(context, :format => 'm') %></h2>
<ul class="c">
<%= render :partial => "todos/todo",
:collection => @not_done,
:locals => { :parent_container_type => "context" }-%>
</ul>
<% end -%>