Update all email notifications

This commit is contained in:
James Brooks
2017-01-04 20:25:41 +00:00
parent a7f06b5dc7
commit 38773c84ac
4 changed files with 8 additions and 11 deletions

View File

@@ -87,7 +87,8 @@ class ComponentStatusChangedNotification extends Notification
->subject(trans('notifications.component.status_update.subject'))
->greeting(trans('notifications.component.status_update.title'))
->line($content)
->action('View Component', $this->component->link);
->action('View', cachet_route('status-page'))
->line(trans('cachet.subscriber.unsubscribe', ['link' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code)]));
}
/**

View File

@@ -73,18 +73,12 @@ class NewIncidentNotification extends Notification
'name' => $this->incident->name,
]);
if ($this->incident->status === Incident::FIXED) {
$status = 'success';
} else {
$status = 'error';
}
return (new MailMessage())
->subject(trans('notifications.incident.new.subject'))
->$status()
->greeting(trans('notifications.incident.new.title', ['app_name' => Config::get('setting.app_name')]))
->line($content)
->action('View Component', $this->incident->link);
->action('View Incident', cachet_route('incident', [$this->incident]))
->line(trans('cachet.subscriber.unsubscribe', ['link' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code)]));
}
/**

View File

@@ -81,7 +81,8 @@ class IncidentUpdatedNotification extends Notification
'new_status' => $this->update->human_status,
]))
->line($content)
->action('View Component', $this->update->link);
->action('View Incident', cachet_route('incident', [$this->update->incident]))
->line(trans('cachet.subscriber.unsubscribe', ['link' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code)]));
}
/**

View File

@@ -77,7 +77,8 @@ class NewScheduleNotification extends Notification
->subject(trans('notifications.schedule.new.subject'))
->greeting(trans('notifications.schedule.new.title'))
->line($content)
->action('View Component', $this->schedule->link);
->action('View Schedule', cachet_route('schedule', [$this->schedule]))
->line(trans('cachet.subscriber.unsubscribe', ['link' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code)]));
}
/**