add place

This commit is contained in:
邱博亞 2021-10-21 12:14:15 +08:00
parent fe8e6a2281
commit 8c8aeb451b
3 changed files with 5 additions and 1 deletions

View File

@ -33,6 +33,7 @@ class EventNewsController < ApplicationController
"speaker" => a.speaker,
"speaker-css" => (a.speaker.blank? ? "display: none;" : ""),
"place" => a.place,
"place-css" => (a.place.blank? ? "display: none;" : ""),
"host" => a.host,
"host-css" => (a.host.blank? ? "display: none;" : ""),
"notes" => a.notes,
@ -816,6 +817,7 @@ class EventNewsController < ApplicationController
"title" => a.title,
"speaker-css" => (a.speaker.blank? ? "display: none;" : ""),
"host-css" => (a.host.blank? ? "display: none;" : ""),
"place-css" => (a.place.blank? ? "display: none;" : ""),
"speaker" => a.speaker,
"place" => a.place,
"host" => a.host,

View File

@ -48,6 +48,7 @@ module EventNewsHelper
"title" => a.title,
"speaker-css" => (a.speaker.blank? ? "display: none;" : ""),
"host-css" => (a.host.blank? ? "display: none;" : ""),
"place-css" => (a.place.blank? ? "display: none;" : ""),
"speaker" => a.speaker,
"place" => a.place,
"host" => a.host,

View File

@ -52,7 +52,8 @@ def update_event_news_template(folder)
next if (c.include?("???") rescue true)
flag1,c = add_css_style_for_block(c,'speaker-head','speaker','speaker-css')
flag2,c = add_css_style_for_block(c,'host-head','host','host-css')
if flag1 || flag2
flag3,c = add_css_style_for_block(c,'place-head','place','place-css')
if flag1 || flag2 || flag3
puts ['update file:',f]
File.open(f,'w'){|f1| f1.write(c)}
end