From d085197635ee7794628f1908232047a241518c8e Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Tue, 12 Mar 2013 17:00:42 +0800 Subject: [PATCH] add pagination for every controller and view in personal plugin --- .../desktop/conference_co_author_relations_controller.rb | 2 +- .../desktop/conference_co_authors_controller.rb | 2 +- .../desktop/conference_pages_controller.rb | 4 ++-- .../desktop/conference_co_author_relations/index.html.erb | 4 ++-- .../desktop/conference_co_authors/index.html.erb | 2 +- .../desktop/conference_pages/conference_type.html.erb | 4 ++-- .../desktop/conference_pages/index.html.erb | 2 +- .../desktop/journal_co_author_relations_controller.rb | 2 +- .../personal_journal/desktop/journal_co_authors_controller.rb | 2 +- .../personal_journal/desktop/journal_pages_controller.rb | 2 +- .../desktop/journal_co_author_relations/index.html.erb | 4 ++-- .../desktop/journal_co_authors/index.html.erb | 2 +- .../desktop/journal_pages/journal_type.html.erb | 2 +- 13 files changed, 17 insertions(+), 17 deletions(-) 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 0da30e7c8..62ad9fa7d 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 @@ -5,7 +5,7 @@ class Panel::PersonalConference::Desktop::ConferenceCoAuthorRelationsController @conference_co_author_relations = ConferenceCoAuthorRelation.all new - @conference_co_author_relations = @conference_co_author_relations.page(page).per(5) + @conference_co_author_relations = @conference_co_author_relations.page(page).per(50) 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 71f5b6774..2eec83f62 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 @@ -5,7 +5,7 @@ class Panel::PersonalConference::Desktop::ConferenceCoAuthorsController < Applic @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) + @conference_co_authors = @conference_co_authors.page(page).per(50) respond_to do |format| format.html { render :layout => false} 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 93c307404..a711dd1b1 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 @@ -13,7 +13,7 @@ class Panel::PersonalConference::Desktop::ConferencePagesController < Applicatio @level_types = ConferencePaperType.all - @writing_conferences = @writing_conferences.page(page).per(5) + @writing_conferences = @writing_conferences.page(page).per(50) respond_to do |format| format.html { render :layout => false} @@ -95,7 +95,7 @@ class Panel::PersonalConference::Desktop::ConferencePagesController < Applicatio 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.page(page).per(50) 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_co_author_relations/index.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/index.html.erb index 21c845a88..a44e052e4 100644 --- a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/index.html.erb +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_author_relations/index.html.erb @@ -15,9 +15,9 @@ -
+
<%= render :partial => 'show_form'%>
\ No newline at end of file + --> diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/index.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/index.html.erb index 07260b2a7..e053daeac 100644 --- a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/index.html.erb +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_co_authors/index.html.erb @@ -7,7 +7,7 @@ -
+
<% @conference_co_authors.each_with_index do |co_author,i| %>
    diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/conference_type.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/conference_type.html.erb index 14a442d95..4f0ffd625 100644 --- a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/conference_type.html.erb +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/desktop/conference_pages/conference_type.html.erb @@ -16,7 +16,7 @@ -
    +
    <% @conference_lists.each_with_index do |conference_list,i| %>
      @@ -34,4 +34,4 @@
    \ No newline at end of file + --> 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 9aff35aa3..2d68c76cc 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 @@ -68,7 +68,7 @@ -
    +
    <% @writing_conferences.each do |w| %> <%= publication_record w, @view_by%> <% end %> 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 74594d7d9..5f0c9d49c 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 @@ -5,7 +5,7 @@ class Panel::PersonalJournal::Desktop::JournalCoAuthorRelationsController < Appl @journal_co_author_relations = JournalCoAuthorRelation.all new - @journal_co_author_relations = @journal_co_author_relations.page(page).per(5) + @journal_co_author_relations = @journal_co_author_relations.page(page).per(50) 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 749a0757e..aa3db5412 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 @@ -5,7 +5,7 @@ class Panel::PersonalJournal::Desktop::JournalCoAuthorsController < ApplicationC @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) + @journal_co_authors = @journal_co_authors.page(page).per(50) respond_to do |format| format.html { render :layout => false} 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 e908911eb..0745a1a4d 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 @@ -97,7 +97,7 @@ class Panel::PersonalJournal::Desktop::JournalPagesController < ApplicationContr 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.page(page).per(50) all_journal_lists = all_journal_lists.map do |j| [ j.journal_title, j.journal_level_type_ids.map do |type| diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/index.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/index.html.erb index d52907c04..e277aa2dc 100644 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/index.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/index.html.erb @@ -15,9 +15,9 @@ -
    +
    <%= render :partial => 'show_form'%>
    \ No newline at end of file + --> diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_authors/index.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_authors/index.html.erb index 50feb45da..05d6a413e 100644 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_authors/index.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_authors/index.html.erb @@ -7,7 +7,7 @@ -
    +
      <% @journal_co_authors.each_with_index do |co_author,i| %>
    • diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/journal_type.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/journal_type.html.erb index 2d77873b4..7f0964840 100644 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/journal_type.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/journal_type.html.erb @@ -13,7 +13,7 @@
    -
    +
    <% @journal_lists.each_with_index do |journal_list,i| %>