mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-24 19:20:13 +01:00
17 lines
623 B
Text
17 lines
623 B
Text
<%
|
|
new_context_todo_params = {:format => :m}
|
|
new_context_todo_params[:from_context] = context.id
|
|
|
|
# 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') %><span class="ctx-add"><%= link_to t('+'), new_todo_path(new_context_todo_params) %></span></h2>
|
|
<ul class="c">
|
|
<%= render :partial => "todos/todo",
|
|
:collection => @not_done,
|
|
:locals => { :parent_container_type => "context" }-%>
|
|
</ul>
|
|
<% end -%>
|