From 500902976af9aa262866571eacd7938a33a59151 Mon Sep 17 00:00:00 2001 From: Sami Mazouz Date: Sat, 2 Nov 2024 12:09:51 +0100 Subject: [PATCH] feat: use components for email templating (#4102) --- views/emails/html/newPost.blade.php | 24 ++++++++++++------------ views/emails/plain/newPost.blade.php | 8 ++++---- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/views/emails/html/newPost.blade.php b/views/emails/html/newPost.blade.php index 8b1d156..0f810c1 100644 --- a/views/emails/html/newPost.blade.php +++ b/views/emails/html/newPost.blade.php @@ -1,13 +1,13 @@ -@extends('flarum.forum::email.html.notification.base') + + + {!! $formatter->convert($translator->trans('flarum-subscriptions.email.new_post.html.body', [ + '{poster_display_name}' => $blueprint->post->user->display_name, + '{title}' => $blueprint->post->discussion->title, + '{url}' => $url->to('forum')->route('discussion', ['id' => $blueprint->post->discussion_id, 'near' => $blueprint->post->number]) + ])) !!} + -@section('notificationContent') -{!! $formatter->convert($translator->trans('flarum-subscriptions.email.new_post.html.body', [ -'{poster_display_name}' => $blueprint->post->user->display_name, -'{title}' => $blueprint->post->discussion->title, -'{url}' => $url->to('forum')->route('discussion', ['id' => $blueprint->post->discussion_id, 'near' => $blueprint->post->number]) -])) !!} -@endsection - -@section('contentPreview') - {!! $blueprint->post->formatContent() !!} -@endsection + + {!! $blueprint->post->formatContent() !!} + + diff --git a/views/emails/plain/newPost.blade.php b/views/emails/plain/newPost.blade.php index 09bc166..5713ccb 100644 --- a/views/emails/plain/newPost.blade.php +++ b/views/emails/plain/newPost.blade.php @@ -1,10 +1,10 @@ -@extends('flarum.forum::email.plain.notification.base') - -@section('content') + + {!! $translator->trans('flarum-subscriptions.email.new_post.plain.body', [ '{poster_display_name}' => $blueprint->post->user->display_name, '{title}' => $blueprint->post->discussion->title, '{url}' => $url->to('forum')->route('discussion', ['id' => $blueprint->post->discussion_id, 'near' => $blueprint->post->number]), '{content}' => $blueprint->post->content ]) !!} -@endsection + +