From 8b10901dae44d55deff68a2b83cd23b1c7b1435a Mon Sep 17 00:00:00 2001 From: Bohung Date: Tue, 8 Feb 2022 15:43:27 +0800 Subject: [PATCH] Fix bug. --- app/controllers/cancerpredicts_controller.rb | 7 ++++++- modules/cancerpredict/_cancer_predict_widget.html.erb | 6 +++--- modules/cancerpredict/cancer_predict_index.html.erb | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/app/controllers/cancerpredicts_controller.rb b/app/controllers/cancerpredicts_controller.rb index b85d485..d4fdac0 100644 --- a/app/controllers/cancerpredicts_controller.rb +++ b/app/controllers/cancerpredicts_controller.rb @@ -149,7 +149,7 @@ class CancerpredictsController < ApplicationController categories = OrbitHelper.widget_categories || [] @table_str = File.read('public/cancer_tool_table_tmp_'+I18n.locale.to_s+'.txt') { - "cancerpredict" => [], + "cancerpredict" => [], "extras"=>{"table"=> @table_str} } end @@ -157,6 +157,11 @@ class CancerpredictsController < ApplicationController uid = OrbitHelper.params[:uid] rescue "" tags = OrbitHelper.widget_tags categories = OrbitHelper.widget_categories || [] + @table_str = File.read('public/cancer_tool_table_tmp_'+I18n.locale.to_s+'.txt') + { + "cancerpredict" => [], + "extras"=>{"table"=> @table_str} + } end def create_first_field if Cancerpredictfields.where("title"=>(@app_title + "_back")).count == 0 diff --git a/modules/cancerpredict/_cancer_predict_widget.html.erb b/modules/cancerpredict/_cancer_predict_widget.html.erb index 4203a62..5fd837b 100644 --- a/modules/cancerpredict/_cancer_predict_widget.html.erb +++ b/modules/cancerpredict/_cancer_predict_widget.html.erb @@ -2,6 +2,6 @@ {{table}} - - - \ No newline at end of file +<%= stylesheet_link_tag "cancer_predict", media: "screen" %> +<%= stylesheet_link_tag "bootstrap.min.print", media: "print" %> +<%= stylesheet_link_tag "cancer_predict_print", media: "print" %> \ No newline at end of file diff --git a/modules/cancerpredict/cancer_predict_index.html.erb b/modules/cancerpredict/cancer_predict_index.html.erb index 3ae22e8..5fd837b 100644 --- a/modules/cancerpredict/cancer_predict_index.html.erb +++ b/modules/cancerpredict/cancer_predict_index.html.erb @@ -2,6 +2,6 @@ {{table}} - +<%= stylesheet_link_tag "cancer_predict", media: "screen" %> <%= stylesheet_link_tag "bootstrap.min.print", media: "print" %> <%= stylesheet_link_tag "cancer_predict_print", media: "print" %> \ No newline at end of file