tracks/app/views/contexts/_mobile_context.rhtml
2010-07-27 14:46:14 +08:00

14 lines
469 B
Text

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