add img_description for front-end
This commit is contained in:
parent
78c62a0633
commit
0fa05d46c2
|
@ -340,6 +340,7 @@ class AnnouncementsController < ApplicationController
|
||||||
img_src = nil
|
img_src = nil
|
||||||
subtitle_ann = announcement.subtitle if announcement.display_subtitle?
|
subtitle_ann = announcement.subtitle if announcement.display_subtitle?
|
||||||
img_src = (announcement.image.thumb.url || "/assets/announcement-default.jpg") if announcement.display_img?
|
img_src = (announcement.image.thumb.url || "/assets/announcement-default.jpg") if announcement.display_img?
|
||||||
|
img_description = announcement.image_description if announcement.image_description.present?
|
||||||
|
|
||||||
{
|
{
|
||||||
"tags" => tags,
|
"tags" => tags,
|
||||||
|
@ -353,6 +354,7 @@ class AnnouncementsController < ApplicationController
|
||||||
"body" =>announcement.text,
|
"body" =>announcement.text,
|
||||||
"image" => announcement.image.url,
|
"image" => announcement.image.url,
|
||||||
"img_src" => img_src,
|
"img_src" => img_src,
|
||||||
|
"img_description" => img_description,
|
||||||
"alt_title" => desc
|
"alt_title" => desc
|
||||||
},
|
},
|
||||||
"impressionist" => (announcement.is_preview ? nil : announcement),
|
"impressionist" => (announcement.is_preview ? nil : announcement),
|
||||||
|
|
Loading…
Reference in New Issue