Add pagination

This commit is contained in:
manson 2014-07-04 16:10:42 +08:00
parent 766ef2df0a
commit 873de8958b
2 changed files with 6 additions and 1 deletions

View File

@ -1,6 +1,6 @@
class Admin::PageContentsController < OrbitAdminController
def index
@pages = Page.where(:module=>"page_content")
@pages = Page.where(:module=>"page_content").page(params[:page]).per(10)
@table_fields = ["Name","Version","Updated At","Last Modified By"]
end

View File

@ -24,4 +24,9 @@
<% end %>
</tbody>
</table>
<%=
content_tag :div, class: "bottomnav clearfix" do
content_tag :div, paginate(@pages), class: "pagination pagination-centered"
end
%>