Update personal_journals_controller.rb

This commit is contained in:
chiu 2019-08-13 08:43:25 +08:00
parent 9e40cbb8e9
commit 8154c75e1f
1 changed files with 3 additions and 1 deletions

View File

@ -45,6 +45,7 @@ class PersonalJournalsController < ApplicationController
end
headers = []
choice_show = []
fields_to_show.each do |fs|
col = 2
col = 3 if fs == "paper_title"
@ -52,10 +53,10 @@ class PersonalJournalsController < ApplicationController
"head-title" => t("personal_journal.#{fs}"),
"col" => col
}
choice_show << t("personal_journal.#{fs}")
end
choice_value = fields_to_show
choice_value.unshift("paper_title")
choice_show = headers.select ( :"head-title" )
choice_default = OrbitHelper.params[:locale]!='en' ? "——選取分類——" : "——select class——"
choice_show.unshift(choice_default)
{
@ -65,6 +66,7 @@ class PersonalJournalsController < ApplicationController
"total_pages" => journal_papers.total_pages,
"choice" => {"choice_value" => choice_value ,"choice_show" => choice_show},
"url" => OrbitHelper.params[:locale]+OrbitHelper.params[:url]
"all" => journal_papers.first
}
end