49 lines
1.8 KiB
Text
49 lines
1.8 KiB
Text
- breadcrumb_title _("Messages")
|
|
- page_title _("Broadcast Messages")
|
|
- targeted_broadcast_messages_enabled = Feature.enabled?(:role_targeted_broadcast_messages)
|
|
|
|
%h1.page-title.gl-font-size-h-display
|
|
= _('Broadcast Messages')
|
|
%p.light
|
|
= _('Use banners and notifications to notify your users about scheduled maintenance, recent upgrades, and more.')
|
|
|
|
= render 'form'
|
|
|
|
%br.clearfix
|
|
|
|
- if @broadcast_messages.any?
|
|
.table-responsive
|
|
%table.table.b-table.gl-table
|
|
%thead
|
|
%tr
|
|
%th= _('Status')
|
|
%th= _('Preview')
|
|
%th= _('Starts')
|
|
%th= _('Ends')
|
|
- if targeted_broadcast_messages_enabled
|
|
%th= _('Target roles')
|
|
%th= _('Target Path')
|
|
%th= _('Type')
|
|
%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
|
|
- if targeted_broadcast_messages_enabled
|
|
%td
|
|
= target_access_levels_display(message.target_access_levels)
|
|
%td
|
|
= message.target_path
|
|
%td
|
|
= message.broadcast_type.capitalize
|
|
%td.gl-white-space-nowrap<
|
|
= link_to sprite_icon('pencil', 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 gl-ml-3'
|
|
= paginate @broadcast_messages, theme: 'gitlab'
|