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
|
||||
@@ -1,29 +0,0 @@
|
||||
class AnnouncementsController < ApplicationController
|
||||
|
||||
def index
|
||||
@announcements = Announcement.all( :conditions => { :entry_name => params[:entry_name] })
|
||||
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
@page = Page.find_by_name( 'announcement_index')
|
||||
@page_options = { "announcements" => @announcements.map{ |a| a.to_liquid } }
|
||||
render_liquid_page
|
||||
}
|
||||
format.xml { render :xml => @announcements }
|
||||
end
|
||||
end
|
||||
|
||||
def show
|
||||
@announcement = Announcement.find(params[:id])
|
||||
|
||||
respond_to do |format|
|
||||
format.html{
|
||||
@page = Page.find_by_name( 'announcement_show')
|
||||
@page_options = { 'announcement' => @announcement.to_liquid }
|
||||
render_liquid_page
|
||||
}
|
||||
format.xml { render :xml => @announcement }
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
@@ -1,49 +0,0 @@
|
||||
class Panel::AnnouncementsController < ApplicationController
|
||||
|
||||
before_filter :require_entry_name, :only => [:index, :new]
|
||||
|
||||
layout "admin"
|
||||
|
||||
def index
|
||||
@announcements = Announcement.all( :conditions => { :entry_name => params[:entry_name] })
|
||||
end
|
||||
|
||||
def new
|
||||
@announcement = Announcement.new
|
||||
@announcement.entry_name = params[:entry_name]
|
||||
end
|
||||
|
||||
def edit
|
||||
@announcement = Announcement.find(params[:id])
|
||||
end
|
||||
|
||||
def create
|
||||
@announcement = Announcement.new(params[:announcement])
|
||||
|
||||
if @announcement.save
|
||||
flash[:notice] = 'Announcement was successfully created.'
|
||||
redirect_to panel_announcements_path( :entry_name => @announcement.entry_name )
|
||||
else
|
||||
render :action => "new"
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
@announcement = Announcement.find(params[:id])
|
||||
|
||||
if @announcement.update_attributes(params[:announcement])
|
||||
flash[:notice] = 'Announcement was successfully updated.'
|
||||
redirect_to panel_announcements_path( :entry_name => @announcement.entry_name )
|
||||
else
|
||||
render :action => "edit"
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@announcement = Announcement.find(params[:id])
|
||||
@announcement.destroy
|
||||
|
||||
redirect_to panel_announcements_path( :entry_name => @announcement.entry_name )
|
||||
end
|
||||
|
||||
end
|
||||
Reference in new issue
Block a user