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>
This commit is contained in:
parent
0c449e36ea
commit
989caaebdc
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue