Update personal_journals_controller.rb

This commit is contained in:
chiu 2019-08-15 09:24:32 +08:00
parent 93616514bc
commit f617ef9e8e
1 changed files with 1 additions and 4 deletions

View File

@ -28,7 +28,6 @@ class PersonalJournalsController < ApplicationController
journal_papers = JournalPaper.where(:is_hidden=>false)
journal_papers_count = journal_papers.count
journal_papers_temp = journal_papers.take(journal_papers_count).sort_by{ |tp| [-tp[:year].to_i,-tp[:publication_date].to_i] }
t = Time.now
case params[:selectbox]
when "paper_title","default"
if page.custom_string_field == "table"
@ -47,7 +46,6 @@ class PersonalJournalsController < ApplicationController
else
journal_papers_show = jjournal_papers_temp.select {|value| search_all_words(value.send(params[:selectbox]).to_s.upcase,params[:keywords].upcase)}
end
timer = Time.now-t
if params[:page_no].nil?
page_to_show = 1
else
@ -115,8 +113,7 @@ class PersonalJournalsController < ApplicationController
"search_text" => search_text,
"search_value" => params[:keywords]},
"total_pages" => journal_papers_total_pages,
"choice" => choice,
"timer" => timer
"choice" => choice
}
end