3 namespace BookStack\Activity\Notifications\Messages;
5 use BookStack\Activity\Notifications\MessageParts\ListMessageLine;
6 use BookStack\Entities\Models\Page;
7 use BookStack\Users\Models\User;
8 use Illuminate\Notifications\Messages\MailMessage;
10 class PageUpdateNotification extends BaseActivityNotification
12 public function toMail(User $notifiable): MailMessage
14 /** @var Page $page */
15 $page = $this->detail;
17 $locale = $notifiable->getLocale();
19 return $this->newMailMessage($locale)
20 ->subject($locale->trans('notifications.updated_page_subject', ['pageName' => $page->getShortName()]))
21 ->line($locale->trans('notifications.updated_page_intro', ['appName' => setting('app-name')]))
22 ->line(new ListMessageLine([
23 $locale->trans('notifications.detail_page_name') => $page->name,
24 $locale->trans('notifications.detail_updated_by') => $this->user->name,
26 ->line($locale->trans('notifications.updated_page_debounce'))
27 ->action($locale->trans('notifications.action_view_page'), $page->getUrl())
28 ->line($this->buildReasonFooterLine($locale));