added pagination for backend and sorting
This commit is contained in:
parent
d994a4fe78
commit
f9ecd7d486
|
@ -93,7 +93,7 @@ class EPapersController < ApplicationController
|
|||
|
||||
def widget
|
||||
tags = OrbitHelper.widget_tags
|
||||
papers = Paper.filter_by_widget_categories.filter_by_tags(tags).collect do |paper|
|
||||
papers = Paper.filter_by_widget_categories.filter_by_tags(tags).collect.desc(:period) do |paper|
|
||||
paper_thumb = !paper.image.nil? && !paper.image.url.nil? ? paper.image.thumb.url : "http://www.placehold.it/400x400/EFEFEF/AAAAAA"
|
||||
{
|
||||
"title" => paper.title,
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
</tbody>
|
||||
</table>
|
||||
<div class="bottomnav clearfix" style="left: 81px;">
|
||||
<%= content_tag :div, paginate(@papers), class: "pagination pagination-centered" %>
|
||||
<% if user_has_rights %>
|
||||
<div class="action pull-right">
|
||||
<a class="btn btn-primary" href="<%= new_admin_e_paper_path %>">
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
en:
|
||||
module_name: "E Paper"
|
||||
e_paper:
|
||||
e_paper: "e_Paper"
|
||||
title: Title
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
zh_tw:
|
||||
module_name: 電子報
|
||||
e_paper:
|
||||
e_paper: "電子報"
|
||||
title: "電子報名稱"
|
||||
|
|
Loading…
Reference in New Issue