]> BookStack Code Mirror - bookstack/blob - app/Activity/Notifications/Messages/PageUpdateNotification.php
fix Sidebar scrolling at mid-range sceen
[bookstack] / app / Activity / Notifications / Messages / PageUpdateNotification.php
1 <?php
2
3 namespace BookStack\Activity\Notifications\Messages;
4
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;
9
10 class PageUpdateNotification extends BaseActivityNotification
11 {
12     public function toMail(User $notifiable): MailMessage
13     {
14         /** @var Page $page */
15         $page = $this->detail;
16
17         $locale = $notifiable->getLocale();
18
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,
25             ]))
26             ->line($locale->trans('notifications.updated_page_debounce'))
27             ->action($locale->trans('notifications.action_view_page'), $page->getUrl())
28             ->line($this->buildReasonFooterLine($locale));
29     }
30 }