This commit is contained in:
BoHung Chiu 2022-03-17 15:31:42 +08:00
parent 6117ec6f09
commit e150225ed6
2 changed files with 4 additions and 1 deletions

View File

@ -13,6 +13,9 @@ if bundle_update_flag
default_event_news_widget_info = JSON.parse(File.read("#{app_path}/modules/event_news_mod/info.json"))["widgets"].sort_by{|h| h["filename"].to_i} rescue []
all_template.each do |folder|
if !folder.include?('mobile')
if Dir.exist?("#{folder}modules/event_news_mod/event_news")
Bundler.with_clean_env{system ("mv -f #{folder}modules/event_news_mod/event_news/* #{folder}modules/event_news_mod/. && rm -rf #{folder}modules/event_news_mod/event_news")}
end
info_json_file = "#{folder}modules/event_news_mod/info.json"
if File.exist?(info_json_file)
Bundler.with_clean_env{system ('cp -f '+ app_path + '/modules/event_news_mod/show.html.erb ' + "#{folder}modules/event_news_mod/.")}

View File

@ -104,7 +104,7 @@ module EventNewsMod
template_path = Rails.root.to_s + '/app/templates'
all_template = Dir.glob(template_path+'/*/')
all_template.each do |folder|
Bundler.with_clean_env{system ("mv #{folder}modules/event_news #{folder}modules/event_news_mod")}
Bundler.with_clean_env{system ("mkdir -p #{folder}modules/event_news_mod; mv -f #{folder}modules/event_news/* #{folder}modules/event_news_mod/.")}
end
end
module_label "event_news.event_news"