diff --git a/app/controllers/e_papers_controller.rb b/app/controllers/e_papers_controller.rb index db8767a..0f2a7a3 100644 --- a/app/controllers/e_papers_controller.rb +++ b/app/controllers/e_papers_controller.rb @@ -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, diff --git a/app/views/admin/e_papers/_index.html.erb b/app/views/admin/e_papers/_index.html.erb index 246b145..fc92509 100644 --- a/app/views/admin/e_papers/_index.html.erb +++ b/app/views/admin/e_papers/_index.html.erb @@ -46,6 +46,7 @@
+ <%= content_tag :div, paginate(@papers), class: "pagination pagination-centered" %> <% if user_has_rights %>
diff --git a/config/locales/en.yml b/config/locales/en.yml index fa6a390..86eb271 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1,4 +1,5 @@ en: + module_name: "E Paper" e_paper: e_paper: "e_Paper" title: Title diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index b40ab09..062c6d1 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -1,4 +1,5 @@ zh_tw: + module_name: 電子報 e_paper: e_paper: "電子報" title: "電子報名稱"