Add pagination at backend index page
This commit is contained in:
parent
f4d405979b
commit
d9194eae26
|
@ -27,7 +27,7 @@ class ArchiveFile
|
||||||
field :rss2_sn
|
field :rss2_sn
|
||||||
|
|
||||||
# scope :can_display,where(is_hidden: false)
|
# scope :can_display,where(is_hidden: false)
|
||||||
scope :can_display, ->{where(is_hidden: false).asc(:sort_number, :title).desc(:is_top)}
|
scope :can_display, ->{where(is_hidden: false).order_by(:is_top=>-1, :sort_number=>1, :title=>1)}
|
||||||
|
|
||||||
# belongs_to :archive_file_category
|
# belongs_to :archive_file_category
|
||||||
|
|
||||||
|
|
|
@ -27,4 +27,10 @@
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<%=
|
||||||
|
content_tag :div, class: "bottomnav clearfix" do
|
||||||
|
content_tag :div, paginate(@archives), class: "pagination pagination-centered"
|
||||||
|
end
|
||||||
|
%>
|
Loading…
Reference in New Issue