forked from saurabh/personal-journal
Update personal_journals_controller.rb
This commit is contained in:
parent
71940517fc
commit
61d3fe5a52
|
@ -21,7 +21,7 @@ class PersonalJournalsController < ApplicationController
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
if params[:selectbox] !=nil
|
if params[:selectbox] !=nil
|
||||||
journal_papers = JournalPaper.where(:is_hidden=>false)#Mongoid::Sessions.default[:journal_papers].find()
|
journal_papers = JournalPaper.where(:is_hidden=>false)
|
||||||
journal_papers_count = journal_papers.count
|
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] }
|
journal_papers_temp = journal_papers.take(journal_papers_count).sort_by{ |tp| [-tp[:year].to_i,-tp[:publication_date].to_i] }
|
||||||
case params[:selectbox]
|
case params[:selectbox]
|
||||||
|
@ -106,7 +106,8 @@ class PersonalJournalsController < ApplicationController
|
||||||
"search_text" => search_text,
|
"search_text" => search_text,
|
||||||
"search_value" => params[:keywords]},
|
"search_value" => params[:keywords]},
|
||||||
"total_pages" => journal_papers_total_pages,
|
"total_pages" => journal_papers_total_pages,
|
||||||
"choice" => choice
|
"choice" => choice,
|
||||||
|
"trans" => [I18n.t("我me"),I18n,t(nil)]
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue