Fixes #2996 - New incident notification is Markdown powered
This commit is contained in:
@@ -75,12 +75,16 @@ class NewIncidentNotification extends Notification
|
|||||||
|
|
||||||
return (new MailMessage())
|
return (new MailMessage())
|
||||||
->subject(trans('notifications.incident.new.mail.subject'))
|
->subject(trans('notifications.incident.new.mail.subject'))
|
||||||
->greeting(trans('notifications.incident.new.mail.greeting', ['app_name' => Config::get('setting.app_name')]))
|
->markdown('notifications.incident.new', [
|
||||||
->line($content)
|
'incident' => $this->incident,
|
||||||
->action(trans('notifications.incident.new.mail.action'), cachet_route('incident', [$this->incident]))
|
'content' => $content,
|
||||||
->line($this->incident->raw_message)
|
'actionText' => trans('notifications.incident.new.mail.action'),
|
||||||
->line(trans('cachet.subscriber.unsubscribe', ['link' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code)]))
|
'actionUrl' => cachet_route('incident', [$this->incident]),
|
||||||
->line(trans('cachet.subscriber.manage.manage_at_link', ['link' => cachet_route('subscribe.manage', $notifiable->verify_code)]));
|
'unsubscribeText' => trans('cachet.subscriber.unsubscribe'),
|
||||||
|
'unsubscribeUrl' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code),
|
||||||
|
'manageSubscriptionText' => trans('cachet.subscriber.manage_subscription'),
|
||||||
|
'manageSubscriptionUrl' => cachet_route('subscribe.manage', $notifiable->verify_code),
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -75,10 +75,11 @@ return [
|
|||||||
|
|
||||||
// Subscriber
|
// Subscriber
|
||||||
'subscriber' => [
|
'subscriber' => [
|
||||||
'subscribe' => 'Subscribe to get the updates',
|
'subscribe' => 'Subscribe to get the updates',
|
||||||
'unsubscribe' => 'Unsubscribe at :link',
|
'unsubscribe' => 'Unsubscribe',
|
||||||
'button' => 'Subscribe',
|
'button' => 'Subscribe',
|
||||||
'manage' => [
|
'manage_subscription' => 'Manage subscription',
|
||||||
|
'manage' => [
|
||||||
'no_subscriptions' => 'You\'re currently subscribed to all updates.',
|
'no_subscriptions' => 'You\'re currently subscribed to all updates.',
|
||||||
'my_subscriptions' => 'You\'re currently subscribed to the following updates.',
|
'my_subscriptions' => 'You\'re currently subscribed to the following updates.',
|
||||||
'manage_at_link' => 'Manage your subscriptions at :link',
|
'manage_at_link' => 'Manage your subscriptions at :link',
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
@component('mail::message')
|
||||||
|
# {{ trans('notifications.incident.new.mail.greeting', ['app_name' => Config::get('setting.app_name')]) }}
|
||||||
|
|
||||||
|
{{ $incident->message }}
|
||||||
|
|
||||||
|
@component('mail::button', ['url' => $actionUrl])
|
||||||
|
{{ $actionText }}
|
||||||
|
@endcomponent
|
||||||
|
|
||||||
|
Thanks,<br>
|
||||||
|
{{ config('app.name') }}
|
||||||
|
|
||||||
|
@component('mail::subcopy')
|
||||||
|
[{{ $unsubscribeText }}]({{ $unsubscribeUrl }}) — [{{ $manageSubscriptionText }}]({{ $manageSubscriptionUrl }})
|
||||||
|
@endcomponent
|
||||||
|
|
||||||
|
@endcomponent
|
||||||
Reference in New Issue
Block a user