debian-mirror-gitlab/app/views/admin/broadcast_messages/index.html.haml

50 lines
1.8 KiB
Text
Raw Normal View History

2020-07-28 23:09:34 +05:30
- breadcrumb_title _("Messages")
- page_title _("Broadcast Messages")
2022-07-16 23:28:13 +05:30
- targeted_broadcast_messages_enabled = Feature.enabled?(:role_targeted_broadcast_messages)
2014-09-02 18:07:02 +05:30
%h3.page-title
2021-04-29 21:17:54 +05:30
= _('Broadcast Messages')
2014-09-02 18:07:02 +05:30
%p.light
2022-05-07 20:08:51 +05:30
= _('Use banners and notifications to notify your users about scheduled maintenance, recent upgrades, and more.')
2014-09-02 18:07:02 +05:30
= render 'form'
2014-09-02 18:07:02 +05:30
%br.clearfix
2014-09-02 18:07:02 +05:30
2017-08-17 22:00:37 +05:30
- if @broadcast_messages.any?
2022-04-04 11:22:00 +05:30
.table-responsive
%table.table.b-table.gl-table
%thead
%tr
2022-04-04 11:22:00 +05:30
%th= _('Status')
%th= _('Preview')
%th= _('Starts')
%th= _('Ends')
2022-05-07 20:08:51 +05:30
- if targeted_broadcast_messages_enabled
%th= _('Target roles')
%th= _('Target Path')
%th= _('Type')
2022-04-04 11:22:00 +05:30
%th  
%tbody
- @broadcast_messages.each do |message|
%tr
%td
= broadcast_message_status(message)
%td
= broadcast_message(message, preview: true)
%td
= message.starts_at
%td
= message.ends_at
2022-05-07 20:08:51 +05:30
- if targeted_broadcast_messages_enabled
%td
= target_access_levels_display(message.target_access_levels)
2022-04-04 11:22:00 +05:30
%td
= message.target_path
%td
= message.broadcast_type.capitalize
%td.gl-white-space-nowrap
= link_to sprite_icon('pencil-square', css_class: 'gl-icon'), edit_admin_broadcast_message_path(message), title: _('Edit'), class: 'btn btn-icon gl-button'
= link_to sprite_icon('remove', css_class: 'gl-icon'), admin_broadcast_message_path(message), method: :delete, remote: true, title: _('Remove'), class: 'js-remove-tr btn btn-icon gl-button btn-danger ml-2'
= paginate @broadcast_messages, theme: 'gitlab'