Change imgae version in show page.

This commit is contained in:
BoHung Chiu 2021-06-08 10:10:23 +08:00
parent cf8e48bc1b
commit 6eb97bddae
1 changed files with 2 additions and 2 deletions

View File

@ -568,7 +568,7 @@ class AnnouncementsController < ApplicationController
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_src = (announcement.image.url || "/assets/announcement-default.jpg") if announcement.display_img?
img_description = announcement.image_description if (announcement.image_description.present?) && (announcement.display_img?)
show_comment_flag = announcement.open_comment_for_user(OrbitHelper.current_user)
bulletin_carousel_images = announcement.bulletin_carousel_images.map{|image| {"src"=>image.file.url,"description"=>image.description.to_s,"description_text"=>image.description_text }}
@ -641,7 +641,7 @@ class AnnouncementsController < ApplicationController
img_description = nil
img_description = announcement["image_description_translations"][I18n.locale] if announcement['display_img']
img_src = nil
img_src = (announcement['image']['thumb'] || "/assets/announcement-default.jpg") if announcement['display_img']
img_src = (announcement['image']['original'] || "/assets/announcement-default.jpg") if announcement['display_img']
subtitle_ann = announcement['subtitle_ann']
request = OrbitHelper.request
if announcement["subtitle_translations"].present?