2009-06-01 02:54:16 +00:00
|
|
|
class AnnouncementsController < ApplicationController
|
2009-06-01 06:20:15 +00:00
|
|
|
|
2009-06-01 02:54:16 +00:00
|
|
|
def index
|
|
|
|
@announcements = Announcement.all
|
|
|
|
|
|
|
|
respond_to do |format|
|
2009-06-01 06:20:15 +00:00
|
|
|
format.html {
|
|
|
|
@page = Page.find_by_name( 'announcement_index')
|
|
|
|
@page_options = { "announcements" => @announcements.map{ |a| a.to_liquid } }
|
|
|
|
render_liquid_page
|
|
|
|
}
|
2009-06-01 02:54:16 +00:00
|
|
|
format.xml { render :xml => @announcements }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def show
|
|
|
|
@announcement = Announcement.find(params[:id])
|
|
|
|
|
|
|
|
respond_to do |format|
|
2009-06-01 06:20:15 +00:00
|
|
|
format.html{
|
|
|
|
@page = Page.find_by_name( 'announcement_show')
|
|
|
|
@page_options = { 'announcement' => @announcement.to_liquid }
|
|
|
|
render_liquid_page
|
|
|
|
}
|
2009-06-01 02:54:16 +00:00
|
|
|
format.xml { render :xml => @announcement }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|