diff --git a/app/controllers/admin/journal_papers_controller.rb b/app/controllers/admin/journal_papers_controller.rb index 4576601..2b47643 100644 --- a/app/controllers/admin/journal_papers_controller.rb +++ b/app/controllers/admin/journal_papers_controller.rb @@ -10,7 +10,7 @@ class Admin::JournalPapersController < OrbitMemberController def index - @writing_journals = JournalPaper.all + @writing_journals = JournalPaper.order_by(:year=>'desc').page(params[:page]).per(10) respond_to do |format| format.html # index.html.erb format.js { } diff --git a/app/controllers/journal_papers_controller.rb b/app/controllers/journal_papers_controller.rb index 4739304..c7aa0ab 100644 --- a/app/controllers/journal_papers_controller.rb +++ b/app/controllers/journal_papers_controller.rb @@ -1,16 +1,23 @@ class JournalPapersController < ApplicationController def index - journal_papers = JournalPaper.asc(:created_at) + journal_papers = JournalPaper.where(:is_hidden=>false).order_by(:year=>'desc').page(OrbitHelper.params[:page_no]).per(OrbitHelper.page_data_count) journal_paper_list = journal_papers.collect do |journal_paper| { + "year" => journal_paper.year, "paper_title" => journal_paper.paper_title, - "authors" => journal_paper.authors, + "author" => journal_paper.authors, "link_to_show" => OrbitHelper.url_to_show(journal_paper.to_param) } end { "journal_papers" => journal_paper_list, - "extras" => {"widget-title" => "Journal Papers"} + "extras" => { + "widget-title" => t("module_name.journal_paper"), + "th_year" => t('personal_plugins.year'), + "th_title" => t("personal_conference.paper_title"), + "th_author" => t('personal_plugins.author') + }, + "total_pages" => journal_papers.total_pages } end diff --git a/app/views/admin/journal_papers/_writing_journal.html.erb b/app/views/admin/journal_papers/_writing_journal.html.erb index c19325e..a365844 100644 --- a/app/views/admin/journal_papers/_writing_journal.html.erb +++ b/app/views/admin/journal_papers/_writing_journal.html.erb @@ -1,14 +1,15 @@ -