diff --git a/app/controllers/event_news_controller.rb b/app/controllers/event_news_controller.rb index e21f5a0..dcb280f 100644 --- a/app/controllers/event_news_controller.rb +++ b/app/controllers/event_news_controller.rb @@ -72,13 +72,13 @@ class EventNewsController < ApplicationController "event_news" => event_news, "extras" => { "widget-title" =>t('event_news.event_news'), - "title-head" => t('event_news.table.title'), + "title-head" => t('event_news.title'), "speaker-head" => EventNewsCustomTitle.get_trans('speaker'), "place-head" => EventNewsCustomTitle.get_trans('place'), "host-head" => EventNewsCustomTitle.get_trans('host'), "notes-head" => t('event_news.notes'), "event_date-head" => EventNewsCustomTitle.get_trans('event_date'), - "date-head" => t('event_news.table.date'), + "date-head" => EventNewsCustomTitle.get_trans('event_date'), "status-head" => t('event_news.table.status'), "author-head" => t('event_news.table.author'), "subtitle-head" => t('event_news.table.sub_title'), @@ -379,7 +379,7 @@ class EventNewsController < ApplicationController "more_url"=>OrbitHelper.widget_more_url, "main_picture" => mp, "main_picture_description" => mpd, - "title-head" => t('event_news.table.title'), + "title-head" => t('event_news.title'), "speaker-head" => EventNewsCustomTitle.get_trans('speaker'), "place-head" => EventNewsCustomTitle.get_trans('place'), "host-head" => EventNewsCustomTitle.get_trans('host'), @@ -860,7 +860,7 @@ class EventNewsController < ApplicationController "event_news" => event_news, "extras" => { "widget-title" =>t('event_news.event_news'), - "title-head" => t('event_news.table.title'), + "title-head" => t('event_news.title'), "speaker-head" => EventNewsCustomTitle.get_trans('speaker'), "host-head" => EventNewsCustomTitle.get_trans('host'), "notes-head" => t('event_news.notes'), diff --git a/app/models/event_news_custom_title.rb b/app/models/event_news_custom_title.rb index 1e95cf7..cf7f308 100644 --- a/app/models/event_news_custom_title.rb +++ b/app/models/event_news_custom_title.rb @@ -3,7 +3,7 @@ class EventNewsCustomTitle include Mongoid::Timestamps field :key field :title, type: String, localize: true - KEYS = ['event_date','speaker','place','host'] + KEYS = ['title','event_date','speaker','place','host'] def self.get_map KEYS.map do |k| s = self.where(key: k).first || self.create(key: k,title_translations: I18n.available_locales.map{|l| [l,I18n.with_locale(l){I18n.t("event_news.#{k}")}]}.to_h) diff --git a/config/locales/en.yml b/config/locales/en.yml index b8601dd..1e8ab52 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2,6 +2,7 @@ en: module_name: event_news: Event News event_news: + title: Title all_day: All Day show_today_data_first: Show today data first custom_fields_title: Custom Fields Title diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 3d5bfc9..7a13750 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -2,6 +2,7 @@ zh_tw: module_name: event_news: 活動公告 event_news: + title: 講題 all_day: 全天 show_today_data_first: 優先顯示當日資料 custom_fields_title: 欄位名稱設定 diff --git a/event_news_mod.gemspec b/event_news_mod.gemspec index a2bb8cf..0454491 100644 --- a/event_news_mod.gemspec +++ b/event_news_mod.gemspec @@ -45,6 +45,7 @@ if bundle_update_flag widget_info << copy_h Bundler.with_clean_env{%x[cp -f #{app_path}/modules/event_news/_#{h["filename"]}.html.erb #{folder}modules/event_news/_#{copy_h["filename"]}.html.erb]} elsif h["force_cover"] == "true" + puts "Force cover: #{h["filename"]}" Bundler.with_clean_env{%x[cp -f #{app_path}/modules/event_news/_#{h["filename"]}.html.erb #{folder}modules/event_news/_#{widget_info[widget_info_index]["filename"]}.html.erb]} end end diff --git a/modules/event_news/_event_news_widget17.html.erb b/modules/event_news/_event_news_widget17.html.erb index 51e3123..0bd68ce 100644 --- a/modules/event_news/_event_news_widget17.html.erb +++ b/modules/event_news/_event_news_widget17.html.erb @@ -20,12 +20,12 @@ {{status}} - 【講題】{{title}} + 【{{title-head}}】{{title}} -