Archived
Remove files which should be deleted in previous commit
This commit is contained in:
1 parent
2f9dcf7791
commit
8a4cffae8f
100 files changed
-5991
No files matched your search
@@ -1,54 +0,0 @@
|
||||
class Admin::ComponentsController < ApplicationController
|
||||
|
||||
layout "admin"
|
||||
before_filter :authenticate_user!
|
||||
before_filter :find_parent_item
|
||||
|
||||
def show
|
||||
#TODO
|
||||
end
|
||||
|
||||
def new
|
||||
@component = Component.new
|
||||
@component.is_published = true
|
||||
@component.parent_name = @parent_item.name
|
||||
|
||||
@component.engine_name = 'Announcement' # only support Announcement now
|
||||
end
|
||||
|
||||
def edit
|
||||
@component = Component.find(params[:id])
|
||||
end
|
||||
|
||||
def create
|
||||
@component = Component.new(params[:component])
|
||||
|
||||
if @component.save
|
||||
flash[:notice] = 'Component was successfully created.'
|
||||
redirect_to admin_items_url( :parent_name => @component.parent_name )
|
||||
else
|
||||
render :action => "new"
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
@component = Component.find(params[:id])
|
||||
|
||||
if @component.update_attributes(params[:component])
|
||||
flash[:notice] = 'Component was successfully updated.'
|
||||
redirect_to admin_items_url( :parent_name => @component.parent_name )
|
||||
else
|
||||
render :action => "edit"
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@component = Component.find(params[:id])
|
||||
@component.destroy
|
||||
|
||||
#TODO: destroy engine data
|
||||
|
||||
redirect_to admin_items_url( :parent_name => @component.parent_name )
|
||||
end
|
||||
|
||||
end
|
||||
Reference in new issue
Block a user