diff --git a/app/controllers/event_news_controller.rb b/app/controllers/event_news_controller.rb index 953fbf6..827b81c 100644 --- a/app/controllers/event_news_controller.rb +++ b/app/controllers/event_news_controller.rb @@ -32,8 +32,10 @@ class EventNewsController < ApplicationController "event_news_files" => files, "title" => a.title, "speaker" => a.speaker, + "speaker-css" => (a.speaker.blank? ? "display: none;" : ""), "place" => a.place, "host" => a.host, + "host-css" => (a.host.blank? ? "display: none;" : ""), "notes" => a.notes, "source-site" => "", "source-site-title" => "", @@ -564,9 +566,9 @@ class EventNewsController < ApplicationController "speaker-head" => EventNewsCustomTitle.get_trans('speaker'), "host-head" => EventNewsCustomTitle.get_trans('host'), "notes-head" => t('event_news.notes'), + "speaker-css" => (event_news.speaker.blank? ? "display: none;" : ""), + "host-css" => (event_news.host.blank? ? "display: none;" : ""), "speaker" => event_news.speaker, - "speaker-css" => (event_news.speaker.blank? ? "display: none;" : "display: inline-block;"), - "host-css" => (event_news.host.blank? ? "display: none;" : "display: inline-block;"), "host" => event_news.host, "notes" => event_news.notes, "title" => event_news.title, diff --git a/event_news_mod.gemspec b/event_news_mod.gemspec index 0c2b505..c3aaba6 100644 --- a/event_news_mod.gemspec +++ b/event_news_mod.gemspec @@ -5,6 +5,7 @@ $:.push File.expand_path("../lib", __FILE__) require "event_news_mod/version" bundle_update_flag = ARGV[0]=='update' || ARGV[0]=='install' if bundle_update_flag + require File.expand_path("../update_event_news", __FILE__) env_pwd = ENV['PWD'] app_path = File.expand_path(__dir__) template_path = env_pwd + '/app/templates' @@ -15,6 +16,7 @@ if bundle_update_flag info_json_file = "#{folder}modules/event_news/info.json" if File.exist?(info_json_file) Bundler.with_clean_env{system ('cp -f '+ app_path + '/modules/event_news/show.html.erb ' + "#{folder}modules/event_news/.")} + update_event_news_template(folder) begin file_text = File.read(info_json_file) rescue "" encode_file_text = file_text.encode("UTF-8", "UTF-8", invalid: :replace, replace: "???") diff --git a/modules/event_news/_event_news_widget1.html.erb b/modules/event_news/_event_news_widget1.html.erb index ce83d24..19f537d 100644 --- a/modules/event_news/_event_news_widget1.html.erb +++ b/modules/event_news/_event_news_widget1.html.erb @@ -24,8 +24,8 @@ {{title}}