tracks/app/views/contexts/_context.rhtml
2009-09-27 22:38:21 -04:00

19 lines
994 B
Text

<% @not_done = @not_done_todos.select {|t| t.context_id == context.id } %>
<div id="c<%= context.id %>" class="container context" <%= "style=\"display:none\"" if collapsible && @not_done.empty? %>>
<h2>
<% if collapsible -%>
<a href="#" class="container_toggle" id="toggle_c<%= context.id %>"><%= image_tag("collapse.png") %></a>
<% end -%>
<% if source_view_is :context %>
<span id="context_name"><%= context.name %></span>
<% else %>
<%= link_to_context( context ) %>
<% end %>
</h2>
<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>Currently there are no incomplete actions in this context</p></div>
</div>
<%= render :partial => "todos/todo", :collection => @not_done, :locals => { :parent_container_type => "context" } %>
</div><!-- [end:items] -->
</div><!-- [end:c<%= context.id %>] -->