diff --git a/app/controllers/cancerpredicts_controller.rb b/app/controllers/cancerpredicts_controller.rb index 395705e..6a01920 100644 --- a/app/controllers/cancerpredicts_controller.rb +++ b/app/controllers/cancerpredicts_controller.rb @@ -6,9 +6,6 @@ class CancerpredictsController < ApplicationController @app_title = "cancerpredict" end def calculate - uid = OrbitHelper.params[:uid] rescue "" - tags = OrbitHelper.widget_tags - categories = OrbitHelper.widget_categories || [] create_first_field #begin if params['header'].to_i == 1 @@ -132,13 +129,13 @@ class CancerpredictsController < ApplicationController categories = OrbitHelper.widget_categories || [] end def create_first_field - if Cancerpredictfields.where("title"=>(@app_title + "_back")).take_while{true}.count == 0 + if Cancerpredictfields.where("title"=>(@app_title + "_back")).count == 0 @form_to_show = Cancerpredictfields.new() @form_to_show.title = @app_title +"_back" @form_to_show.save end @form_to_show - if Cancerpredictfields.where("title"=>@app_title).take_while{true}.count == 0 + if Cancerpredictfields.where("title"=>@app_title).count == 0 @form_to_show = Cancerpredictfields.new() @form_to_show.title=@app_title @form_to_show.save diff --git a/config/locales/en.yml b/config/locales/en.yml index 730b0a9..2bc2d6d 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1,8 +1,8 @@ en: module_name: - cancerpredict: Predict Breast Cancer Tool + cancerpredict: Cardiovascular Disease Survival Forecast in Taiwan Tool cancerpredict: - cancerpredict: adjust the predict breast cancer tool + cancerpredict: Adjust Cardiovascular Disease Survival Forecast in Taiwan Tool submitResult: see submit results of the users result_is_right: Is therapy choices in the right hand side of result block? text_descibe: text descibe diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 70f60f7..bb7cee1 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -1,8 +1,8 @@ zh_tw: module_name: - cancerpredict: 乳癌預測工具 + cancerpredict: 臺灣心血管疾病存活預測工具 cancerpredict: - cancerpredict: 乳癌預測工具調整 + cancerpredict: 臺灣心血管疾病存活預測工具調整 submitResult: 查看用戶繳交表單結果 result_is_right: 治療選項在結果的右邊? text_descibe: 文字說明