This commit is contained in:
BoHung Chiu 2021-11-12 15:44:55 +08:00
parent e266c79048
commit 477821bb17
2 changed files with 3 additions and 3 deletions

View File

@ -50,7 +50,7 @@ class AnnouncementsController < ApplicationController
"postdate" => a.postdate, "postdate" => a.postdate,
"author" => author, "author" => author,
"is_top" => (a.is_top? ? 1 : 0), "is_top" => (a.is_top? ? 1 : 0),
"link_to_show" => link_to_show+"\" #{link_to_show[0] == '/' ? '' : 'target="_blank"'} title=\"#{title}", "link_to_show" => link_to_show+"\" #{(link_to_show[0] == '/' rescue true) ? '' : 'target="_blank"'} title=\"#{title}",
"target" => target, "target" => target,
"img_src" => a.image.thumb.url || "/assets/announcement-default.jpg", "img_src" => a.image.thumb.url || "/assets/announcement-default.jpg",
"img_description" => desc, "img_description" => desc,
@ -832,7 +832,7 @@ class AnnouncementsController < ApplicationController
"postdate" => a.postdate, "postdate" => a.postdate,
"author" => author, "author" => author,
"is_top" => (a.is_top? ? 1 : 0), "is_top" => (a.is_top? ? 1 : 0),
"link_to_show" => link_to_show+"\" #{link_to_show[0] == '/' ? '' : 'target="_blank"'} title=\"#{title}", "link_to_show" => link_to_show+"\" #{(link_to_show[0] == '/' rescue true) ? '' : 'target="_blank"'} title=\"#{title}",
"target" => target, "target" => target,
"img_src" => a.image.thumb.url || "/assets/announcement-default.jpg", "img_src" => a.image.thumb.url || "/assets/announcement-default.jpg",
"img_description" => desc, "img_description" => desc,

View File

@ -55,7 +55,7 @@ module AnnouncementsHelper
"tag_ids" => (set_tag_ids.nil? ? (a.tag_ids.map{|id| id.to_s}.to_s.gsub('"',"'") rescue '[]') : set_tag_ids), "tag_ids" => (set_tag_ids.nil? ? (a.tag_ids.map{|id| id.to_s}.to_s.gsub('"',"'") rescue '[]') : set_tag_ids),
"postdate" => a.postdate, "postdate" => a.postdate,
"author" => author, "author" => author,
"link_to_show" => link_to_show, "link_to_show" => link_to_show+"\" #{(link_to_show[0] == '/' rescue true) ? '' : 'target="_blank"'} title=\"#{title}",
"target" => target, "target" => target,
"img_src" => image_url || "/assets/announcement-default.jpg", "img_src" => image_url || "/assets/announcement-default.jpg",
"img_description" => desc "img_description" => desc