Add pagination
This commit is contained in:
parent
766ef2df0a
commit
873de8958b
|
@ -1,6 +1,6 @@
|
||||||
class Admin::PageContentsController < OrbitAdminController
|
class Admin::PageContentsController < OrbitAdminController
|
||||||
def index
|
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"]
|
@table_fields = ["Name","Version","Updated At","Last Modified By"]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -24,4 +24,9 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<%=
|
||||||
|
content_tag :div, class: "bottomnav clearfix" do
|
||||||
|
content_tag :div, paginate(@pages), class: "pagination pagination-centered"
|
||||||
|
end
|
||||||
|
%>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue