Update Announcement frontend

This commit is contained in:
manson 2014-05-01 17:28:20 +08:00
parent 9448c519df
commit 02cbd322d8
1 changed files with 10 additions and 9 deletions

View File

@ -5,7 +5,7 @@ class AnnouncementsController < ApplicationController
anns = announcements.collect do |a|
{
"title" => a.title,
"body" => a.text,
"subtitle" => a.subtitle,
"link_to_show" => OrbitHelper.url_to_show(a.to_param),
"more" => "More",
}
@ -21,7 +21,7 @@ class AnnouncementsController < ApplicationController
anns = announcements.collect do |a|
{
"title" => a.title,
"subtitle" => a.text,
"subtitle" => a.subtitle,
"link_to_show" => OrbitHelper.url_to_show(a.to_param),
"more" => "More",
}
@ -38,6 +38,7 @@ class AnnouncementsController < ApplicationController
announcement = Bulletin.find_by(:uid=>params[:uid])
{
"title" => announcement.title,
"image" => (announcement.image.blank? ? "" : announcement.image.url),
"body" => announcement.text
}
end