show / hide image and image description together

This commit is contained in:
EricTYL 2020-01-14 13:13:13 +08:00
parent 0fa05d46c2
commit f2916c9e3c
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,