Merge branch 'master' into 'master'

show / hide image and image description together

show / hide image and image description together

See merge request !8
This commit is contained in:
EricTYL 2020-01-14 13:14:58 +08:00
commit 9883c41966
1 changed files with 2 additions and 1 deletions

View File

@ -338,9 +338,10 @@ class AnnouncementsController < ApplicationController
subtitle_ann = nil
img_src = nil
img_description = nil
subtitle_ann = announcement.subtitle if announcement.display_subtitle?
img_src = (announcement.image.thumb.url || "/assets/announcement-default.jpg") if announcement.display_img?
img_description = announcement.image_description if announcement.image_description.present?
img_description = announcement.image_description if (announcement.image_description.present?) && (announcement.display_img?)
{
"tags" => tags,