Skip to content

Commit

Permalink
Don't use AJAX to delete a topic from its own page.
Browse files Browse the repository at this point in the history
Well, not quite so obviously, anyway (Rails is generating some
JavaScript and a form behind the scenes).  Anyhow, doing it this way,
the controller renders html and a proper redirect, and the browser
respects it.  Fixes #4070.

Change-Id: I5477a12f746f4335202f7dd628f65da531038e23
Reviewed-on: https://gerrit.instructure.com/3022
Tested-by: Hudson <[email protected]>
Reviewed-by: Brian Whitmer <[email protected]>
  • Loading branch information
ccutrer committed Apr 11, 2011
1 parent bb84334 commit 7746b8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/discussion_topics/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<a href="#" class="add_entry_link button button-sidebar-wide"><%= image_tag "add.png", :alt => "" %> Add New Entry</a>
<% end %>
<% if can_do(@topic, @current_user, :delete) && !params[:combined] %>
<a href="#" class="delete_topic_link button button-sidebar-wide"><%= image_tag "delete.png", :alt => "" %> Delete Topic</a>
<%= link_to image_tag('delete.png') + " Delete Topic", context_url(@context, :context_discussion_topic_url, @topic), :method => :delete, :confirm => "Are you sure you want to delete this topic?", :class => "button button-sidebar-wide" %>
<% end %>
</p>
<div id="podcast_link_holder" style="<%= hidden unless @topic.podcast_enabled %>">
Expand Down

0 comments on commit 7746b8b

Please sign in to comment.