debian-mirror-gitlab/app/views/admin/broadcast_messages/index.html.haml
2023-03-17 16:20:25 +05:30

25 lines
990 B
Text

- breadcrumb_title _("Messages")
- page_title _("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.')
#js-broadcast-messages{ data: {
page: params[:page] || 1,
target_access_level_options: target_access_level_options.to_json,
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
} }