diff options
author | Robert Speicher <rspeicher@gmail.com> | 2016-01-01 01:55:14 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-01-13 19:42:15 +0300 |
commit | 00e8700433b3b1ad11252448af5be58913539d85 (patch) | |
tree | b506bc61c351ecbfa3a0c4c468911cf6374b1ba3 /app/views/admin/broadcast_messages/index.html.haml | |
parent | 540ae3c3658d051f852b2c10fa61c557521196e1 (diff) |
Broadcast Messages can now be edited
Closes #3046
Diffstat (limited to 'app/views/admin/broadcast_messages/index.html.haml')
-rw-r--r-- | app/views/admin/broadcast_messages/index.html.haml | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/app/views/admin/broadcast_messages/index.html.haml b/app/views/admin/broadcast_messages/index.html.haml index 04864d4afef..6c72b28ee0c 100644 --- a/app/views/admin/broadcast_messages/index.html.haml +++ b/app/views/admin/broadcast_messages/index.html.haml @@ -8,24 +8,30 @@ = render 'form' +%br.clearfix -if @broadcast_messages.any? - %ul.bordered-list.broadcast-messages - - @broadcast_messages.each do |broadcast_message| - %li - .pull-right - - if broadcast_message.starts_at - %strong - #{broadcast_message.starts_at.to_s(:short)} - \... - - if broadcast_message.ends_at - %strong - #{broadcast_message.ends_at.to_s(:short)} - - = link_to [:admin, broadcast_message], method: :delete, remote: true, class: 'remove-row btn btn-xs' do - %i.fa.fa-times.cred - - .message= broadcast_message.message - + %table.table + %thead + %tr + %th Status + %th Preview + %th Starts + %th Ends + %th + %tbody + - @broadcast_messages.each do |message| + %tr + %td + = message.status + %td + = broadcast_message(message) + %td + = message.starts_at.to_s(:iso861) + %td + = message.ends_at.to_s(:iso861) + %td + = 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 |