2020-06-09 15:08:05 +00:00
|
|
|
- is_banner = message.broadcast_type == 'banner'
|
|
|
|
|
|
|
|
%div{ class: "broadcast-message #{'alert-warning' if is_banner} broadcast-#{message.broadcast_type}-message #{opts[:preview] && 'preview'} js-broadcast-notification-#{message.id} gl-display-flex",
|
2020-01-28 18:08:35 +00:00
|
|
|
style: broadcast_message_style(message), dir: 'auto' }
|
2020-09-14 09:09:34 +00:00
|
|
|
.gl-flex-grow-1.gl-text-right.gl-pr-3
|
2020-08-10 18:09:54 +00:00
|
|
|
= sprite_icon('bullhorn', css_class: 'vertical-align-text-top')
|
2020-03-05 00:07:49 +00:00
|
|
|
%div{ class: !fluid_layout && 'container-limited' }
|
2020-01-28 18:08:35 +00:00
|
|
|
= render_broadcast_message(message)
|
2020-09-14 09:09:34 +00:00
|
|
|
.gl-flex-grow-1.gl-flex-basis-0.gl-text-right
|
2020-03-05 00:07:49 +00:00
|
|
|
- if (message.notification? || message.dismissable?) && opts[:preview].blank?
|
2020-11-06 18:09:07 +00:00
|
|
|
%button.js-dismiss-current-broadcast-notification.btn.btn-link.gl-button{ 'aria-label' => _('Close'), :type => 'button', data: { id: message.id, expire_date: message.ends_at.iso8601 } }
|
|
|
|
= sprite_icon('close', size: 16, css_class: "gl-icon gl-mx-3! #{is_banner ? 'gl-text-white' : 'gl-text-gray-700'}")
|