diff --git a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_author_relations_controller.rb b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_author_relations_controller.rb index 3bfe63e88..001f9f424 100644 --- a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_author_relations_controller.rb +++ b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_author_relations_controller.rb @@ -1,8 +1,11 @@ class Panel::PersonalConference::Desktop::ConferenceCoAuthorRelationsController < ApplicationController def index + page = params[:page] + page ||= 1 @conference_co_author_relations = ConferenceCoAuthorRelation.all new + @conference_co_author_relations = @conference_co_author_relations.page(page).per(5) respond_to do |format| format.html {render layout: false } end diff --git a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_authors_controller.rb b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_authors_controller.rb index ed8a3dc9d..71f5b6774 100644 --- a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_authors_controller.rb +++ b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_co_authors_controller.rb @@ -1,10 +1,12 @@ class Panel::PersonalConference::Desktop::ConferenceCoAuthorsController < ApplicationController def index - nils, not_nils = ConferenceCoAuthor.where(name_id: current_user.id)\ - .asc(:co_author).partition{|p| p.email.nil?} - @conference_co_authors = not_nils + nils + page = params[:page] + page ||= 1 + @conference_co_authors = ConferenceCoAuthor.where(name_id: current_user.id).asc(:co_author) @conference_co_author_relations = ConferenceCoAuthorRelation.all + @conference_co_authors = @conference_co_authors.page(page).per(5) + respond_to do |format| format.html { render :layout => false} end diff --git a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_pages_controller.rb b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_pages_controller.rb index 1dc4b6a5e..a257719b8 100644 --- a/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_pages_controller.rb +++ b/vendor/built_in_modules/personal_conference/app/controllers/panel/personal_conference/desktop/conference_pages_controller.rb @@ -2,6 +2,8 @@ class Panel::PersonalConference::Desktop::ConferencePagesController < Applicatio def index @view_by = params[:view] @writing_conferences = WritingConference.where(create_user_id: current_user.id) + page = params[:page] + page ||= 1 if @view_by.nil? @writing_conferences = @writing_conferences.asc(:paper_title) @@ -11,6 +13,8 @@ class Panel::PersonalConference::Desktop::ConferencePagesController < Applicatio @level_types = ConferencePaperType.all + @writing_conferences = @writing_conferences.page(page).per(5) + respond_to do |format| format.html { render :layout => false} end @@ -84,9 +88,13 @@ class Panel::PersonalConference::Desktop::ConferencePagesController < Applicatio end def conference_type + page = params[:page] + page ||= 1 + conference_types = ConferencePaperType.all all_conference_lists = WritingConference.where(create_user_id: current_user.id) all_conference_lists = all_conference_lists.asc(:conference_title) + all_conference_lists = all_conference_lists.page(page).per(5) all_conference_lists = all_conference_lists.map do |j| [ j.conference_title, j.conference_paper_type_ids.map do |type| diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb index 535b035ce..bdf1bff76 100644 --- a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/index.html.erb @@ -75,3 +75,7 @@ + + + + diff --git a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_co_author_relations_controller.rb b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_co_author_relations_controller.rb index 2cb72eeb4..66ff582c6 100644 --- a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_co_author_relations_controller.rb +++ b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_co_author_relations_controller.rb @@ -1,8 +1,11 @@ class Panel::PersonalJournal::Desktop::JournalCoAuthorRelationsController < ApplicationController def index + page = params[:page] + page ||= 1 @journal_co_author_relations = JournalCoAuthorRelation.all new + @journal_co_author_relations = @journal_co_author_relations.page(page).per(5) respond_to do |format| format.html {render layout: false } end diff --git a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_co_authors_controller.rb b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_co_authors_controller.rb index e7f557743..749a0757e 100644 --- a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_co_authors_controller.rb +++ b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_co_authors_controller.rb @@ -1,10 +1,12 @@ class Panel::PersonalJournal::Desktop::JournalCoAuthorsController < ApplicationController def index - nils, not_nils = JournalCoAuthor.where(name_id: current_user.id)\ - .asc(:co_author).partition{|p| p.email.nil?} - @journal_co_authors = not_nils + nils + page = params[:page] + page ||= 1 + @journal_co_authors = JournalCoAuthor.where(name_id: current_user.id).asc(:co_author) @journal_co_author_relations = JournalCoAuthorRelation.all + @journal_co_authors = @journal_co_authors.page(page).per(5) + respond_to do |format| format.html { render :layout => false} end diff --git a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_pages_controller.rb b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_pages_controller.rb index 42210178a..96b66f5d2 100644 --- a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_pages_controller.rb +++ b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_pages_controller.rb @@ -3,6 +3,8 @@ class Panel::PersonalJournal::Desktop::JournalPagesController < ApplicationContr @writing_journals = WritingJournal.where(create_user_id: current_user.id) @level_types = JournalLevelType.all @view_by = params[:view] + page = params[:page] + page ||= 1 if @view_by.nil? @writing_journals = @writing_journals.asc(:paper_title) @@ -12,6 +14,8 @@ class Panel::PersonalJournal::Desktop::JournalPagesController < ApplicationContr @level_types = ConferencePaperType.all + @writing_journals = @writing_journals.page(page).per(5) + respond_to do |format| format.html { render :layout => false} end @@ -85,9 +89,13 @@ class Panel::PersonalJournal::Desktop::JournalPagesController < ApplicationContr end def journal_type + page = params[:page] + page ||= 1 + level_types = JournalLevelType.all all_journal_lists = WritingJournal.where(create_user_id: current_user.id) all_journal_lists = all_journal_lists.asc(:journal_title) + all_journal_lists = all_journal_lists.page(page).per(5) all_journal_lists = all_journal_lists.map do |j| [ j.journal_title, j.journal_level_type_ids.map do |type|