From 4d26bcde2465c340c9627f5329602e1fb97625f7 Mon Sep 17 00:00:00 2001 From: "BOYA,CHIU" Date: Tue, 24 Aug 2021 23:31:15 +0800 Subject: [PATCH] fix error --- app/controllers/event_news_controller.rb | 54 ++++++++++++------------ 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/app/controllers/event_news_controller.rb b/app/controllers/event_news_controller.rb index 79e4623..f22e345 100644 --- a/app/controllers/event_news_controller.rb +++ b/app/controllers/event_news_controller.rb @@ -658,34 +658,32 @@ class EventNewsController < ApplicationController "event_news_files" => files, "event_news_links" => links, "event_carousel_images" => event_carousel_images, - "data" => { - "title" => event_news["title_translations"][locale], - "subtitle_ann" => subtitle_ann, - "update_user" => update_user, - "updated_at" => event_time, - "body" => event_news["text_translations"][locale], - "speaker-head" => EventNewsCustomTitle.get_trans('speaker'), - "host-head" => EventNewsCustomTitle.get_trans('host'), - "notes-head" => t('event_news.notes'), - "event_date-head" => EventNewsCustomTitle.get_trans('event_date'), - "speaker-css" => (speaker.blank? ? "display: none;" : ""), - "host-css" => (host.blank? ? "display: none;" : ""), - "speaker" => speaker, - "host" => host, - "notes" => (event_news["notes_translations"][locale].to_s rescue ""), - "image" => event_news["image"]["original"], - "img_src" => img_src, - "img_description" => img_description, - "hide_class" => event_news["display_img"] ? '' : ' hide', - "alt_title" => desc, - "resume_btn_title" => resume_btn_title, - "pause_btn_title" => pause_btn_title, - "prev_btn_title" => prev_btn_title, - "next_btn_title" => next_btn_title, - "carousel_display_style" => (event_carousel_images.count == 0 ? 'display: none' : "width: #{EventNewsSetting.last.carousel_image_width};margin: auto;"), - "carousel_count" => event_carousel_images.count, - "place_text" => (event_news["place"].present? rescue false) ? "#{I18n.t("event_news.place")}: #{event_news["place"]}" : "" - }, + "title" => event_news["title_translations"][locale], + "subtitle_ann" => subtitle_ann, + "update_user" => update_user, + "updated_at" => event_time, + "body" => event_news["text_translations"][locale], + "speaker-head" => EventNewsCustomTitle.get_trans('speaker'), + "host-head" => EventNewsCustomTitle.get_trans('host'), + "notes-head" => t('event_news.notes'), + "event_date-head" => EventNewsCustomTitle.get_trans('event_date'), + "speaker-css" => (speaker.blank? ? "display: none;" : ""), + "host-css" => (host.blank? ? "display: none;" : ""), + "speaker" => speaker, + "host" => host, + "notes" => (event_news["notes_translations"][locale].to_s rescue ""), + "image" => event_news["image"]["original"], + "img_src" => img_src, + "img_description" => img_description, + "hide_class" => event_news["display_img"] ? '' : ' hide', + "alt_title" => desc, + "resume_btn_title" => resume_btn_title, + "pause_btn_title" => pause_btn_title, + "prev_btn_title" => prev_btn_title, + "next_btn_title" => next_btn_title, + "carousel_display_style" => (event_carousel_images.count == 0 ? 'display: none' : "width: #{EventNewsSetting.last.carousel_image_width};margin: auto;"), + "carousel_count" => event_carousel_images.count, + "place_text" => (event_news["place"].present? rescue false) ? "#{I18n.t("event_news.place")}: #{event_news["place"]}" : "", "impressionist" => nil, "url_to_edit" => url_to_edit }