Update Announcement frontend
This commit is contained in:
parent
9448c519df
commit
02cbd322d8
|
@ -5,7 +5,7 @@ class AnnouncementsController < ApplicationController
|
||||||
anns = announcements.collect do |a|
|
anns = announcements.collect do |a|
|
||||||
{
|
{
|
||||||
"title" => a.title,
|
"title" => a.title,
|
||||||
"body" => a.text,
|
"subtitle" => a.subtitle,
|
||||||
"link_to_show" => OrbitHelper.url_to_show(a.to_param),
|
"link_to_show" => OrbitHelper.url_to_show(a.to_param),
|
||||||
"more" => "More",
|
"more" => "More",
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ class AnnouncementsController < ApplicationController
|
||||||
anns = announcements.collect do |a|
|
anns = announcements.collect do |a|
|
||||||
{
|
{
|
||||||
"title" => a.title,
|
"title" => a.title,
|
||||||
"subtitle" => a.text,
|
"subtitle" => a.subtitle,
|
||||||
"link_to_show" => OrbitHelper.url_to_show(a.to_param),
|
"link_to_show" => OrbitHelper.url_to_show(a.to_param),
|
||||||
"more" => "More",
|
"more" => "More",
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,7 @@ class AnnouncementsController < ApplicationController
|
||||||
announcement = Bulletin.find_by(:uid=>params[:uid])
|
announcement = Bulletin.find_by(:uid=>params[:uid])
|
||||||
{
|
{
|
||||||
"title" => announcement.title,
|
"title" => announcement.title,
|
||||||
|
"image" => (announcement.image.blank? ? "" : announcement.image.url),
|
||||||
"body" => announcement.text
|
"body" => announcement.text
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue