diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-02-05 16:16:14 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-02-05 16:16:14 +0000 |
commit | b0d5aeaa55d1af260a35108b3533d6bd4164bdb4 (patch) | |
tree | 70272e347c19cb7afb3e8703b318ebbcd182dde5 /app | |
parent | 569c4672033701c0cf89c9fc8f031507c5f7af6c (diff) | |
parent | 989caaebdc698fd1dffd44e01b24f0c420842632 (diff) | |
download | gitlab-ce-b0d5aeaa55d1af260a35108b3533d6bd4164bdb4.tar.gz |
Merge branch 'improve-broadcast-messages' into 'master'
Improve admin broadcast messages page
* Show latest broadcast messages first on admin page
* Use nice looking pagination
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Fixes #13211
cc @rspeicher @DouweM
See merge request !2725
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/admin/broadcast_messages_controller.rb | 2 | ||||
-rw-r--r-- | app/views/admin/broadcast_messages/index.html.haml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/admin/broadcast_messages_controller.rb b/app/controllers/admin/broadcast_messages_controller.rb index 4735b27c65d..a470d865408 100644 --- a/app/controllers/admin/broadcast_messages_controller.rb +++ b/app/controllers/admin/broadcast_messages_controller.rb @@ -2,7 +2,7 @@ class Admin::BroadcastMessagesController < Admin::ApplicationController before_action :finder, only: [:edit, :update, :destroy] def index - @broadcast_messages = BroadcastMessage.reorder("starts_at ASC").page(params[:page]) + @broadcast_messages = BroadcastMessage.reorder("ends_at DESC").page(params[:page]) @broadcast_message = BroadcastMessage.new end diff --git a/app/views/admin/broadcast_messages/index.html.haml b/app/views/admin/broadcast_messages/index.html.haml index 49e33698b63..c05538a393c 100644 --- a/app/views/admin/broadcast_messages/index.html.haml +++ b/app/views/admin/broadcast_messages/index.html.haml @@ -34,4 +34,4 @@ = link_to icon('pencil-square-o'), edit_admin_broadcast_message_path(message), title: 'Edit', class: 'btn btn-xs' = link_to icon('times'), admin_broadcast_message_path(message), method: :delete, remote: true, title: 'Remove', class: 'js-remove-tr btn btn-xs btn-danger' - = paginate @broadcast_messages + = paginate @broadcast_messages, theme: 'gitlab' |