diff --git a/src/Controller/CapsuleEditorController.php b/src/Controller/CapsuleEditorController.php index 3fdc4dc8414f3f89b911e674148384507f7b1757..a10dc17bbf9fc055579b29e8c9fd095b54d63eb0 100644 --- a/src/Controller/CapsuleEditorController.php +++ b/src/Controller/CapsuleEditorController.php @@ -11,6 +11,7 @@ use App\Repository\CapsulePendingEditorRepository; use App\Repository\CapsuleRepository; use App\Repository\UserRepository; use Doctrine\ORM\EntityManagerInterface; +use http\Env; use Symfony\Bridge\Twig\Mime\TemplatedEmail; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Request; @@ -188,7 +189,8 @@ class CapsuleEditorController extends AbstractController ->htmlTemplate('capsule/editors/email_editor.html.twig') ->context([ 'user' => $current_user, - 'capsule' => $capsule + 'capsule' => $capsule, + 'member_url_external' => $_ENV['MEMBER_URL_EXTERNAL'] ]); $this->mailer->send($email); diff --git a/templates/capsule/editors/email_editor.html.twig b/templates/capsule/editors/email_editor.html.twig index c28c681c7391b4298561210d159b2ac3e9e3348d..a4125b0cf15cb6d0478a9e2021557733fb5d23e3 100644 --- a/templates/capsule/editors/email_editor.html.twig +++ b/templates/capsule/editors/email_editor.html.twig @@ -12,6 +12,9 @@ <div class="col-6"> <p class="alert"> {{ 'editors.add.user.email.text'|trans({'%user_name%': user.getFullName(), '%capsule_name%': capsule.getName()}) }} + <a href="{{ member_url_external }}{{ capsule.getEditionLink() }}"> + {{ editors.add.user.email.link }} + </a> </p> <p>{{ 'general.greeting'|trans }}</p> diff --git a/translations/messages.en.yaml b/translations/messages.en.yaml index 0ed1025b0694e185b185798e3a2ad14e91f3cc35..328bafbdfce7185e51848ee6f5784ae114121fc5 100644 --- a/translations/messages.en.yaml +++ b/translations/messages.en.yaml @@ -133,4 +133,5 @@ editors: email: title: New capsule on your list text: You have been add by %user_name% as editor of the capsule "%capsule_name%". - You can now access and edit it. You will find the capsule in your capsule list. \ No newline at end of file + You can now access and edit it. You will find the capsule in your capsule list. + link: Go to capsule edition page diff --git a/translations/messages.fr.yaml b/translations/messages.fr.yaml index 15bad03240f71d694d527add8ad9fe2ee88edc4b..9c27b16cfb93fbfb822f503a0b4bee8ee7e7924b 100644 --- a/translations/messages.fr.yaml +++ b/translations/messages.fr.yaml @@ -131,4 +131,5 @@ editors: email: title: Nouvelle capsule dans votre liste text: Vous avez été ajouté par %user_name% en tant qu'éditeur de la capsule "%capsule_name%". - Vous pouvez maintenant y accéder et l'éditer. Vous la retrouverez dans la liste de vos capsules. \ No newline at end of file + Vous pouvez maintenant y accéder et l'éditer. Vous la retrouverez dans la liste de vos capsules. + link: Se rendre sur la page d'édition de la capsule \ No newline at end of file