Delete link handle JavaScript disabled
This commit is contained in:
parent
24ae7ed5e3
commit
4399804e19
|
@ -61,10 +61,6 @@ class Admin::LinksController < ApplicationController
|
||||||
@link = Link.find(params[:id])
|
@link = Link.find(params[:id])
|
||||||
@link.destroy
|
@link.destroy
|
||||||
@link.destroy_i18n_variable
|
@link.destroy_i18n_variable
|
||||||
end
|
|
||||||
|
|
||||||
def delete
|
|
||||||
destroy
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {
|
format.html {
|
||||||
redirect_to admin_items_url
|
redirect_to admin_items_url
|
||||||
|
@ -73,4 +69,11 @@ class Admin::LinksController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def delete
|
||||||
|
respond_to do |format|
|
||||||
|
format.html {}
|
||||||
|
format.js { destroy }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
<% form_for :link, :url => admin_link_path(@link), :html => { :method => :delete } do |f| %>
|
||||||
|
<h2><%= t('sure?') %></h2>
|
||||||
|
<p>
|
||||||
|
<%= submit_tag t(:delete) %>
|
||||||
|
<%= link_back %>
|
||||||
|
</p>
|
||||||
|
<% end %>
|
Reference in New Issue