debian-mirror-gitlab/app/views/admin/broadcast_messages/_table.html.haml
2022-11-25 23:54:43 +05:30

38 lines
1.5 KiB
Text

- targeted_broadcast_messages_enabled = Feature.enabled?(:role_targeted_broadcast_messages)
- 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'