Update personal_journals_controller.rb
This commit is contained in:
parent
9e40cbb8e9
commit
8154c75e1f
|
@ -45,6 +45,7 @@ class PersonalJournalsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
headers = []
|
headers = []
|
||||||
|
choice_show = []
|
||||||
fields_to_show.each do |fs|
|
fields_to_show.each do |fs|
|
||||||
col = 2
|
col = 2
|
||||||
col = 3 if fs == "paper_title"
|
col = 3 if fs == "paper_title"
|
||||||
|
@ -52,10 +53,10 @@ class PersonalJournalsController < ApplicationController
|
||||||
"head-title" => t("personal_journal.#{fs}"),
|
"head-title" => t("personal_journal.#{fs}"),
|
||||||
"col" => col
|
"col" => col
|
||||||
}
|
}
|
||||||
|
choice_show << t("personal_journal.#{fs}")
|
||||||
end
|
end
|
||||||
choice_value = fields_to_show
|
choice_value = fields_to_show
|
||||||
choice_value.unshift("paper_title")
|
choice_value.unshift("paper_title")
|
||||||
choice_show = headers.select ( :"head-title" )
|
|
||||||
choice_default = OrbitHelper.params[:locale]!='en' ? "——選取分類——" : "——select class——"
|
choice_default = OrbitHelper.params[:locale]!='en' ? "——選取分類——" : "——select class——"
|
||||||
choice_show.unshift(choice_default)
|
choice_show.unshift(choice_default)
|
||||||
{
|
{
|
||||||
|
@ -65,6 +66,7 @@ class PersonalJournalsController < ApplicationController
|
||||||
"total_pages" => journal_papers.total_pages,
|
"total_pages" => journal_papers.total_pages,
|
||||||
"choice" => {"choice_value" => choice_value ,"choice_show" => choice_show},
|
"choice" => {"choice_value" => choice_value ,"choice_show" => choice_show},
|
||||||
"url" => OrbitHelper.params[:locale]+OrbitHelper.params[:url]
|
"url" => OrbitHelper.params[:locale]+OrbitHelper.params[:url]
|
||||||
|
"all" => journal_papers.first
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue