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

30 lines
1.1 KiB
Text

- breadcrumb_title _("Messages")
- page_title _("Broadcast Messages")
- vue_app_enabled = Feature.enabled?(:vue_broadcast_messages, current_user)
%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.')
- if vue_app_enabled
#js-broadcast-messages{ data: {
page: params[:page] || 1,
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'