Delete page.
This commit is contained in:
1 parent
ddc7c74436
commit
7b5ea870a0
8 files changed
+41
-10
No files matched your search
@@ -37,7 +37,7 @@ class Admin::PagesController < ApplicationController
|
||||
flash.now[:notice] = t('admin.create_success_page')
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
redirect_to admin_item_url(@item)
|
||||
redirect_to admin_page_url(@item)
|
||||
}
|
||||
format.js {}
|
||||
end
|
||||
@@ -64,9 +64,21 @@ class Admin::PagesController < ApplicationController
|
||||
def destroy
|
||||
@item = Page.find(params[:id])
|
||||
@item.destroy
|
||||
@item.destroy_page_parts
|
||||
@item.destroy_i18n_variable
|
||||
|
||||
redirect_to admin_items_url( :parent_id => @item.parent_id )
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
redirect_to admin_items_url( :parent_id => @item.parent_id )
|
||||
}
|
||||
format.js {}
|
||||
end
|
||||
end
|
||||
|
||||
def delete
|
||||
respond_to do |format|
|
||||
format.html {}
|
||||
format.js { destroy }
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
Reference in new issue
Block a user