forked from saurabh/personal-journal
Update personal_journals_controller.rb
This commit is contained in:
parent
52e655ba7f
commit
1bbca25a7e
|
@ -20,6 +20,11 @@ class PersonalJournalsController < ApplicationController
|
|||
"paper_title"
|
||||
]
|
||||
end
|
||||
if params.selectbox != nil
|
||||
journal_papers = Mongoid::Sessions.default[:journal_papers].find()
|
||||
journal_papers_count = journal_papers.count
|
||||
journal_papers_temp = Mongoid::Sessions.default[:journal_papers].find().take(journal_papers_count)
|
||||
else
|
||||
journal_paper_list = []
|
||||
journal_papers.each do |journal_paper|
|
||||
t = []
|
||||
|
@ -43,7 +48,7 @@ class PersonalJournalsController < ApplicationController
|
|||
end
|
||||
journal_paper_list << {"jps" => t}
|
||||
end
|
||||
|
||||
end
|
||||
headers = []
|
||||
choice_show = []
|
||||
fields_to_show.each do |fs|
|
||||
|
@ -66,7 +71,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.all.take(journal_papers.all.count)
|
||||
"all" => journal_papers_temp
|
||||
}
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue