2020-07-28 23:09:34 +05:30
|
|
|
- breadcrumb_title _("Messages")
|
|
|
|
- page_title _("Broadcast Messages")
|
2022-11-25 23:54:43 +05:30
|
|
|
- vue_app_enabled = Feature.enabled?(:vue_broadcast_messages, current_user)
|
2016-01-19 16:12:03 +05:30
|
|
|
|
2022-07-23 23:45:48 +05:30
|
|
|
%h1.page-title.gl-font-size-h-display
|
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
|
|
|
|
2022-11-25 23:54:43 +05:30
|
|
|
- if vue_app_enabled
|
|
|
|
#js-broadcast-messages{ data: {
|
|
|
|
page: params[:page] || 1,
|
2023-03-04 22:38:38 +05:30
|
|
|
target_access_level_options: target_access_level_options.to_json,
|
2022-11-25 23:54:43 +05:30
|
|
|
messages_count: @broadcast_messages.total_count,
|
|
|
|
messages: @broadcast_messages.map { |message| {
|
|
|
|
id: message.id,
|
|
|
|
status: broadcast_message_status(message),
|
|
|
|
preview: broadcast_message(message, preview: true),
|
|
|
|
starts_at: message.starts_at.to_s,
|
|
|
|
ends_at: message.ends_at.to_s,
|
|
|
|
target_roles: target_access_levels_display(message.target_access_levels),
|
|
|
|
target_path: message.target_path,
|
|
|
|
type: message.broadcast_type.capitalize,
|
|
|
|
edit_path: edit_admin_broadcast_message_path(message),
|
|
|
|
delete_path: admin_broadcast_message_path(message) + '.js'
|
|
|
|
} }.to_json
|
|
|
|
} }
|
|
|
|
- else
|
|
|
|
= render 'form'
|
|
|
|
%br.clearfix
|
|
|
|
= render 'table'
|