tracks/app/views/contexts/_context.rhtml
Eric Allen 59b367a711 Todo editing and deletion working beautifully.
Removing UJS caused the home page to stop rendering due to references to
apply_behavior. I had to take care of that before I could proceed at all.

Some Autocomplete stuff has been yanked out and needs to go back in at some point.

Had to replace Protoload with jQuery.blockUI. It's a bit bigger, but oh well.
2009-09-07 16:58:26 -04:00

22 lines
1.3 KiB
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 class="in_place_editor_field" id="context_name_in_place_editor"><%= context.name %></span>
<%= in_place_editor 'context_name_in_place_editor', {
:url => { :controller => 'contexts', :action => 'update', :id => context.id, :field => 'name', :update_context_name => true, :escape => false},
:options=>"{method:'put'}", :script => true } %>
<% 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 %>] -->