Context delete working

This commit is contained in:
Eric Allen 2009-10-07 11:36:43 -04:00
parent 550a0e4955
commit c5bb41db82

View file

@ -19,7 +19,15 @@
<% else %>
<span class="grey">VISIBLE</span>
<% end %>
<a class="delete_context_button" href="<%= formatted_context_path(context, :js) %>" title="delete the context '<%= context.name %>'"><%= image_tag( "blank.png", :title => "Delete context", :class=>"delete_item") %></a>
<%= link_to_remote(
image_tag( "blank.png", :title => "Delete context", :class=>"delete_item"),
:url => {:controller => 'contexts', :action => 'destroy', :id => context.id},
:method => 'delete',
:with => "'_source_view=#{@source_view}'",
:before => "$('#{dom_id(context)}').block({message:null});",
:complete => "$('#{dom_id(context)}').unblock();",
:confirm => "Are you sure you want to delete the context '#{context.name}'?"
) %>
<%= link_to_remote(
image_tag( "blank.png", :title => "Edit context", :class=>"edit_item"),
:url => {:controller => 'contexts', :action => 'edit', :id => context.id},