add pagination for every controller and view in personal plugin

This commit is contained in:
Rueshyna 2013-03-12 17:00:42 +08:00 committed by Matt K. Fu
parent b8ee2fd559
commit 00db66b8c4
13 changed files with 18 additions and 18 deletions

View File

@ -5,7 +5,7 @@ class Panel::PersonalConference::Desktop::ConferenceCoAuthorRelationsController
@conference_co_author_relations = ConferenceCoAuthorRelation.all @conference_co_author_relations = ConferenceCoAuthorRelation.all
new 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| respond_to do |format|
format.html {render layout: false } format.html {render layout: false }
end end

View File

@ -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_authors = ConferenceCoAuthor.where(name_id: current_user.id).asc(:co_author)
@conference_co_author_relations = ConferenceCoAuthorRelation.all @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| respond_to do |format|
format.html { render :layout => false} format.html { render :layout => false}

View File

@ -13,7 +13,7 @@ class Panel::PersonalConference::Desktop::ConferencePagesController < Applicatio
@level_types = ConferencePaperType.all @level_types = ConferencePaperType.all
@writing_conferences = @writing_conferences.page(page).per(5) @writing_conferences = @writing_conferences.page(page).per(50)
respond_to do |format| respond_to do |format|
format.html { render :layout => false} format.html { render :layout => false}
@ -95,7 +95,7 @@ class Panel::PersonalConference::Desktop::ConferencePagesController < Applicatio
conference_types = ConferencePaperType.all conference_types = ConferencePaperType.all
all_conference_lists = WritingConference.where(create_user_id: current_user.id) 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.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| all_conference_lists = all_conference_lists.map do |j|
[ j.conference_title, [ j.conference_title,
j.conference_paper_type_ids.map do |type| j.conference_paper_type_ids.map do |type|

View File

@ -15,7 +15,7 @@
<!-- <div id="co_author_relation_table" class="tinycanvas vp"> <!-- <div id="co_author_relation_table" class="tinycanvas vp">
<div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div> <div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
<div class="viewport"> --> <div class="viewport"> -->
<div class="overview" content-layout="datalist" per-column="4" base-width="300"> <div class="overview" content-layout="datalist" per-column="4" base-width="300" pagination-var="page">
<%= render :partial => 'show_form'%> <%= render :partial => 'show_form'%>
</div> </div>
<!-- </div> <!-- </div>

View File

@ -7,7 +7,7 @@
<!-- <div id="co_author" class="tinycanvas vp"> <!-- <div id="co_author" class="tinycanvas vp">
<div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div> <div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
<div class="viewport"> --> <div class="viewport"> -->
<div class="overview" content-layout="datalist" per-column="4" base-width="400"> <div class="overview" content-layout="datalist" per-column="4" base-width="400" pagination-var="page">
<% @conference_co_authors.each_with_index do |co_author,i| %> <% @conference_co_authors.each_with_index do |co_author,i| %>
<div class="g_col"> <div class="g_col">
<ul> <ul>

View File

@ -16,7 +16,7 @@
<!-- <div id="conference_list" class="tinycanvas vp"> <!-- <div id="conference_list" class="tinycanvas vp">
<div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div> <div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
<div class="viewport"> --> <div class="viewport"> -->
<div class="overview" content-layout="datalist" per-column="5" base-width="300"> <div class="overview" content-layout="datalist" per-column="5" base-width="300" pagination-var="page">
<% @conference_lists.each_with_index do |conference_list,i| %> <% @conference_lists.each_with_index do |conference_list,i| %>
<div class="g_col"> <div class="g_col">
<ul> <ul>

View File

@ -68,7 +68,7 @@
<!-- <div id="paper_list" class="tinycanvas vp"> <!-- <div id="paper_list" class="tinycanvas vp">
<div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div> <div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
<div class="viewport"> --> <div class="viewport"> -->
<div class="overview" content-layout="datalist" per-column="5" base-width="300"> <div class="overview" content-layout="datalist" per-column="5" base-width="300" pagination-var="page">
<% @writing_conferences.each do |w| %> <% @writing_conferences.each do |w| %>
<%= publication_record w, @view_by%> <%= publication_record w, @view_by%>
<% end %> <% end %>

View File

@ -5,7 +5,7 @@ class Panel::PersonalJournal::Desktop::JournalCoAuthorRelationsController < Appl
@journal_co_author_relations = JournalCoAuthorRelation.all @journal_co_author_relations = JournalCoAuthorRelation.all
new 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| respond_to do |format|
format.html {render layout: false } format.html {render layout: false }
end end

View File

@ -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_authors = JournalCoAuthor.where(name_id: current_user.id).asc(:co_author)
@journal_co_author_relations = JournalCoAuthorRelation.all @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| respond_to do |format|
format.html { render :layout => false} format.html { render :layout => false}

View File

@ -97,7 +97,7 @@ class Panel::PersonalJournal::Desktop::JournalPagesController < ApplicationContr
level_types = JournalLevelType.all level_types = JournalLevelType.all
all_journal_lists = WritingJournal.where(create_user_id: current_user.id) 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.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| all_journal_lists = all_journal_lists.map do |j|
[ j.journal_title, [ j.journal_title,
j.journal_level_type_ids.map do |type| j.journal_level_type_ids.map do |type|

View File

@ -15,7 +15,7 @@
<!-- <div id="co_author_relation_table" class="tinycanvas vp"> <!-- <div id="co_author_relation_table" class="tinycanvas vp">
<div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div> <div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
<div class="viewport"> --> <div class="viewport"> -->
<div class="overview" content-layout="datalist" per-column="5" base-width="300"> <div class="overview" content-layout="datalist" per-column="5" base-width="300" pagination-var="page">
<%= render :partial => 'show_form'%> <%= render :partial => 'show_form'%>
</div> </div>
<!-- </div> <!-- </div>

View File

@ -7,7 +7,7 @@
<!-- <div id="co_author" class="tinycanvas vp"> <!-- <div id="co_author" class="tinycanvas vp">
<div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div> <div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
<div class="viewport"> --> <div class="viewport"> -->
<div class="overview" content-layout="datalist" per-column="4" base-width="300"> <div class="overview" content-layout="datalist" per-column="4" base-width="300" pagination-var="page">
<ul> <ul>
<% @journal_co_authors.each_with_index do |co_author,i| %> <% @journal_co_authors.each_with_index do |co_author,i| %>
<li class="list_t_item" item="true"> <li class="list_t_item" item="true">

View File

@ -13,7 +13,7 @@
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div> <div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
</div> </div>
</div> </div>
<div class="overview" content-layout="datalist" base-width="300" per-column="5"> <div class="overview" content-layout="datalist" base-width="300" per-column="5" pagination-var="page">
<% @journal_lists.each_with_index do |journal_list,i| %> <% @journal_lists.each_with_index do |journal_list,i| %>
<div class="g_col"> <div class="g_col">
<ul> <ul>