fix error

This commit is contained in:
BOYA,CHIU 2021-08-24 23:36:16 +08:00
parent 4d26bcde24
commit 034339bcc2
1 changed files with 25 additions and 27 deletions

View File

@ -562,33 +562,31 @@ class EventNewsController < ApplicationController
"event_news_files" => files, "event_news_files" => files,
"event_news_links" => links, "event_news_links" => links,
"event_carousel_images" => event_carousel_images, "event_carousel_images" => event_carousel_images,
"data" => { "speaker-head" => EventNewsCustomTitle.get_trans('speaker'),
"speaker-head" => EventNewsCustomTitle.get_trans('speaker'), "host-head" => EventNewsCustomTitle.get_trans('host'),
"host-head" => EventNewsCustomTitle.get_trans('host'), "notes-head" => t('event_news.notes'),
"notes-head" => t('event_news.notes'), "speaker-css" => (event_news.speaker.blank? ? "display: none;" : ""),
"speaker-css" => (event_news.speaker.blank? ? "display: none;" : ""), "host-css" => (event_news.host.blank? ? "display: none;" : ""),
"host-css" => (event_news.host.blank? ? "display: none;" : ""), "speaker" => event_news.speaker,
"speaker" => event_news.speaker, "host" => event_news.host,
"host" => event_news.host, "notes" => event_news.notes,
"notes" => event_news.notes, "title" => event_news.title,
"title" => event_news.title, "subtitle_ann" => subtitle_ann,
"subtitle_ann" => subtitle_ann, "update_user" => update_user,
"update_user" => update_user, "updated_at" => event_time,
"updated_at" => event_time, "body" =>event_news.text,
"body" =>event_news.text, "image" => event_news.image.url,
"image" => event_news.image.url, "img_src" => img_src,
"img_src" => img_src, "img_description" => img_description,
"img_description" => img_description, "hide_class" => event_news.display_img? ? event_news.image_display_class : ' hide',
"hide_class" => event_news.display_img? ? event_news.image_display_class : ' hide', "alt_title" => desc,
"alt_title" => desc, "resume_btn_title" => resume_btn_title,
"resume_btn_title" => resume_btn_title, "pause_btn_title" => pause_btn_title,
"pause_btn_title" => pause_btn_title, "prev_btn_title" => prev_btn_title,
"prev_btn_title" => prev_btn_title, "next_btn_title" => next_btn_title,
"next_btn_title" => next_btn_title, "carousel_display_style" => (event_carousel_images.count == 0 ? 'display: none' : "width: #{event_news.carousel_image_width};margin: auto;"),
"carousel_display_style" => (event_carousel_images.count == 0 ? 'display: none' : "width: #{event_news.carousel_image_width};margin: auto;"), "carousel_count" => event_carousel_images.count,
"carousel_count" => event_carousel_images.count, "place_text" => (event_news.place.present? rescue false) ? "#{EventNewsCustomTitle.get_trans("place")}: #{event_news.place}" : "",
"place_text" => (event_news.place.present? rescue false) ? "#{EventNewsCustomTitle.get_trans("place")}: #{event_news.place}" : ""
},
"impressionist" => (event_news.is_preview ? nil : event_news), "impressionist" => (event_news.is_preview ? nil : event_news),
"url_to_edit"=>url_to_edit "url_to_edit"=>url_to_edit
} }