added book name
synced with actual file from dev branch
added book name
add book name
added book name
extended with chaptername
extended with chapter name
Update PageUpdateNotification.php
Update notifications.php
Update notifications.php
Update notifications.php
correction of chapter syntax
correction of chapter syntax
use BookStack\Activity\Notifications\MessageParts\ListMessageLine;
use BookStack\Entities\Models\Page;
use BookStack\Activity\Notifications\MessageParts\ListMessageLine;
use BookStack\Entities\Models\Page;
+use BookStack\Entities\Models\Chapter;
use BookStack\Users\Models\User;
use Illuminate\Notifications\Messages\MailMessage;
use BookStack\Users\Models\User;
use Illuminate\Notifications\Messages\MailMessage;
{
/** @var Page $page */
$page = $this->detail;
{
/** @var Page $page */
$page = $this->detail;
+ $book = $page->book;
+ $chapterId = $page->chapter_id;
+ $chapter = $chapterId ? Chapter::find($chapterId) : null;
$locale = $notifiable->getLocale();
$locale = $notifiable->getLocale();
+ $listMessageData = [
+ $locale->trans('notifications.detail_page_name') => $page->name,
+ '' => '',
+ ];
+
+ if ($chapter) {
+ $listMessageData += [
+ $locale->trans('notifications.detail_chapter_name') => $chapter->name,
+ ];
+ }
+
+ $listMessageData += [
+ $locale->trans('notifications.detail_book_name') => $book->name,
+ $locale->trans('notifications.detail_created_by') => $this->user->name,
+ ];
+
return $this->newMailMessage($locale)
->subject($locale->trans('notifications.new_page_subject', ['pageName' => $page->getShortName()]))
->line($locale->trans('notifications.new_page_intro', ['appName' => setting('app-name')], $locale))
return $this->newMailMessage($locale)
->subject($locale->trans('notifications.new_page_subject', ['pageName' => $page->getShortName()]))
->line($locale->trans('notifications.new_page_intro', ['appName' => setting('app-name')], $locale))
- ->line(new ListMessageLine([
- $locale->trans('notifications.detail_page_name') => $page->name,
- $locale->trans('notifications.detail_created_by') => $this->user->name,
- ]))
+ ->line(new ListMessageLine($listMessageData))
->action($locale->trans('notifications.action_view_page'), $page->getUrl())
->line($this->buildReasonFooterLine($locale));
}
->action($locale->trans('notifications.action_view_page'), $page->getUrl())
->line($this->buildReasonFooterLine($locale));
}
use BookStack\Activity\Notifications\MessageParts\ListMessageLine;
use BookStack\Entities\Models\Page;
use BookStack\Activity\Notifications\MessageParts\ListMessageLine;
use BookStack\Entities\Models\Page;
+use BookStack\Entities\Models\Chapter;
use BookStack\Users\Models\User;
use Illuminate\Notifications\Messages\MailMessage;
use BookStack\Users\Models\User;
use Illuminate\Notifications\Messages\MailMessage;
{
/** @var Page $page */
$page = $this->detail;
{
/** @var Page $page */
$page = $this->detail;
+ $book = $page->book;
+ $chapterId = $page->chapter_id;
+ $chapter = $chapterId ? Chapter::find($chapterId) : null;
$locale = $notifiable->getLocale();
$locale = $notifiable->getLocale();
+ $listMessageData = [
+ $locale->trans('notifications.detail_page_name') => $page->name,
+ '' => '',
+ ];
+
+ if ($chapter) {
+ $listMessageData += [
+ $locale->trans('notifications.detail_chapter_name') => $chapter->name,
+ ];
+ }
+
+ $listMessageData += [
+ $locale->trans('notifications.detail_book_name') => $book->name,
+ $locale->trans('notifications.detail_updated_by') => $this->user->name,
+ ];
+
return $this->newMailMessage($locale)
->subject($locale->trans('notifications.updated_page_subject', ['pageName' => $page->getShortName()]))
->line($locale->trans('notifications.updated_page_intro', ['appName' => setting('app-name')]))
return $this->newMailMessage($locale)
->subject($locale->trans('notifications.updated_page_subject', ['pageName' => $page->getShortName()]))
->line($locale->trans('notifications.updated_page_intro', ['appName' => setting('app-name')]))
- ->line(new ListMessageLine([
- $locale->trans('notifications.detail_page_name') => $page->name,
- $locale->trans('notifications.detail_updated_by') => $this->user->name,
- ]))
+ ->line(new ListMessageLine($listMessageData))
->line($locale->trans('notifications.updated_page_debounce'))
->action($locale->trans('notifications.action_view_page'), $page->getUrl())
->line($this->buildReasonFooterLine($locale));
->line($locale->trans('notifications.updated_page_debounce'))
->action($locale->trans('notifications.action_view_page'), $page->getUrl())
->line($this->buildReasonFooterLine($locale));
'updated_page_intro' => 'Eine Seite wurde in :appName aktualisiert:',
'updated_page_debounce' => 'Um eine Flut von Benachrichtigungen zu vermeiden, werden Sie für eine gewisse Zeit keine Benachrichtigungen für weitere Bearbeitungen dieser Seite durch denselben Bearbeiter erhalten.',
'updated_page_intro' => 'Eine Seite wurde in :appName aktualisiert:',
'updated_page_debounce' => 'Um eine Flut von Benachrichtigungen zu vermeiden, werden Sie für eine gewisse Zeit keine Benachrichtigungen für weitere Bearbeitungen dieser Seite durch denselben Bearbeiter erhalten.',
+ 'detail_book_name' => 'Name des Buches:',
+ 'detail_chapter_name' => 'Name des Kapitels:',
'detail_page_name' => 'Name der Seite:',
'detail_commenter' => 'Kommentator:',
'detail_comment' => 'Kommentar:',
'detail_page_name' => 'Name der Seite:',
'detail_commenter' => 'Kommentator:',
'detail_comment' => 'Kommentar:',
'updated_page_intro' => 'Eine Seite wurde in :appName aktualisiert:',
'updated_page_debounce' => 'Um eine Flut von Benachrichtigungen zu vermeiden, wirst du für eine gewisse Zeit keine Benachrichtigungen für weitere Bearbeitungen dieser Seite durch denselben Bearbeiter erhalten.',
'updated_page_intro' => 'Eine Seite wurde in :appName aktualisiert:',
'updated_page_debounce' => 'Um eine Flut von Benachrichtigungen zu vermeiden, wirst du für eine gewisse Zeit keine Benachrichtigungen für weitere Bearbeitungen dieser Seite durch denselben Bearbeiter erhalten.',
+ 'detail_book_name' => 'Buchname:',
+ 'detail_chapter_name' => 'Kapitelname:',
'detail_page_name' => 'Seitenname:',
'detail_commenter' => 'Kommentator:',
'detail_comment' => 'Kommentar:',
'detail_page_name' => 'Seitenname:',
'detail_commenter' => 'Kommentator:',
'detail_comment' => 'Kommentar:',
'updated_page_intro' => 'A page has been updated in :appName:',
'updated_page_debounce' => 'To prevent a mass of notifications, for a while you won\'t be sent notifications for further edits to this page by the same editor.',
'updated_page_intro' => 'A page has been updated in :appName:',
'updated_page_debounce' => 'To prevent a mass of notifications, for a while you won\'t be sent notifications for further edits to this page by the same editor.',
+ 'detail_book_name' => 'Book Name:',
+ 'detail_chapter_name' => 'Chapter Name:',
'detail_page_name' => 'Page Name:',
'detail_commenter' => 'Commenter:',
'detail_comment' => 'Comment:',
'detail_page_name' => 'Page Name:',
'detail_commenter' => 'Commenter:',
'detail_comment' => 'Comment:',