Update personal_journals_controller.rb
This commit is contained in:
parent
ab5b44aafb
commit
e7880ea2a1
|
@ -47,7 +47,9 @@ class PersonalJournalsController < ApplicationController
|
||||||
end
|
end
|
||||||
journal_papers_show_last = journal_papers_show[(page_to_show-1)*OrbitHelper.page_data_count...page_to_show*OrbitHelper.page_data_count]
|
journal_papers_show_last = journal_papers_show[(page_to_show-1)*OrbitHelper.page_data_count...page_to_show*OrbitHelper.page_data_count]
|
||||||
journal_papers = journal_papers_show_last
|
journal_papers = journal_papers_show_last
|
||||||
|
journal_papers_total_pages = (journal_papers_show.length/OrbitHelper.page_data_count.to_f).ceil
|
||||||
else
|
else
|
||||||
|
journal_papers_total_pages = journal_papers.total_pages
|
||||||
end
|
end
|
||||||
journal_paper_list = []
|
journal_paper_list = []
|
||||||
journal_papers.each do |journal_paper|
|
journal_papers.each do |journal_paper|
|
||||||
|
@ -95,7 +97,7 @@ class PersonalJournalsController < ApplicationController
|
||||||
"journal_papers" => journal_paper_list,
|
"journal_papers" => journal_paper_list,
|
||||||
"headers" => headers,
|
"headers" => headers,
|
||||||
"extras" => {"widget-title" => t("module_name.journal_paper")},
|
"extras" => {"widget-title" => t("module_name.journal_paper")},
|
||||||
"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" => "/"+params[:locale]+params[:url],
|
"url" => "/"+params[:locale]+params[:url],
|
||||||
"all" => journal_papers_show_last
|
"all" => journal_papers_show_last
|
||||||
|
|
Loading…
Reference in New Issue