diff --git a/app/controllers/event_news_controller.rb b/app/controllers/event_news_controller.rb index b4f8830..3fe0788 100644 --- a/app/controllers/event_news_controller.rb +++ b/app/controllers/event_news_controller.rb @@ -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, diff --git a/app/helpers/event_news_helper.rb b/app/helpers/event_news_helper.rb index ef06fcb..df97e9d 100644 --- a/app/helpers/event_news_helper.rb +++ b/app/helpers/event_news_helper.rb @@ -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, diff --git a/update_event_news.rb b/update_event_news.rb index 069e085..f3a46d9 100644 --- a/update_event_news.rb +++ b/update_event_news.rb @@ -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