This commit is contained in:
邱博亞 2024-08-23 21:42:21 +08:00
parent 0cf4dafdd2
commit 200cfd59d3
1 changed files with 12 additions and 16 deletions

View File

@ -343,14 +343,12 @@ class Admin::HncCancerPredictsController < OrbitAdminController
@index += 1
end
end
Dir.chdir("public") do
@site_locales = Site.last.in_use_locales.each do |locale|
I18n.with_locale(locale) do
@file_tmp = File.new(HncCancerPredictfields::ToolTableMap[I18n.locale], "w")
tmp_table_texts = create_table(locale)
@file_tmp.write(tmp_table_texts)
@file_tmp.close
end
@site_locales = Site.last.in_use_locales.each do |locale|
I18n.with_locale(locale) do
@file_tmp = File.new(HncCancerPredictfields::ToolTableMap[I18n.locale], "w")
tmp_table_texts = create_table(locale)
@file_tmp.write(tmp_table_texts)
@file_tmp.close
end
end
Dir.chdir("public") do
@ -671,14 +669,12 @@ class Admin::HncCancerPredictsController < OrbitAdminController
@form_to_show.title = @app_title
@form_to_show.save
@form_to_show = HncCancerPredictfields.where("title" => @app_title).first
Dir.chdir("public") do
@site_locales = Site.last.in_use_locales.each do |locale|
I18n.with_locale(locale) do
@file_tmp = File.new(HncCancerPredictfields::ToolTableMap[I18n.locale], "w")
tmp_table_texts = create_table(locale)
@file_tmp.write(tmp_table_texts)
@file_tmp.close
end
@site_locales = Site.last.in_use_locales.each do |locale|
I18n.with_locale(locale) do
@file_tmp = File.new(HncCancerPredictfields::ToolTableMap[I18n.locale], "w")
tmp_table_texts = create_table(locale)
@file_tmp.write(tmp_table_texts)
@file_tmp.close
end
end
else