From 50d4f324ff5f4badabae0a178ca7b01f46defdd9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Thu, 14 Nov 2019 23:55:33 +0100 Subject: [PATCH] Add mail base template Add mail body template Add mail contact html+text template Add mail recover html+text template Add mail recover_mail html+text template Add mail register html+text template Remove generic html template --- Resources/views/mail/base.html.twig | 10 +++++ Resources/views/mail/body.html.twig | 30 +++++++++++++ Resources/views/mail/contact.html.twig | 41 +++-------------- Resources/views/mail/contact.text.twig | 9 ++++ Resources/views/mail/generic.html.twig | 49 --------------------- Resources/views/mail/recover.html.twig | 16 +++++++ Resources/views/mail/recover.text.twig | 11 +++++ Resources/views/mail/recover_mail.html.twig | 16 +++++++ Resources/views/mail/recover_mail.text.twig | 11 +++++ Resources/views/mail/register.html.twig | 44 ++++-------------- Resources/views/mail/register.text.twig | 9 ++++ 11 files changed, 126 insertions(+), 120 deletions(-) create mode 100644 Resources/views/mail/base.html.twig create mode 100644 Resources/views/mail/body.html.twig create mode 100644 Resources/views/mail/contact.text.twig delete mode 100644 Resources/views/mail/generic.html.twig create mode 100644 Resources/views/mail/recover.html.twig create mode 100644 Resources/views/mail/recover.text.twig create mode 100644 Resources/views/mail/recover_mail.html.twig create mode 100644 Resources/views/mail/recover_mail.text.twig create mode 100644 Resources/views/mail/register.text.twig diff --git a/Resources/views/mail/base.html.twig b/Resources/views/mail/base.html.twig new file mode 100644 index 0000000..b7be100 --- /dev/null +++ b/Resources/views/mail/base.html.twig @@ -0,0 +1,10 @@ + + + + {% block title %}Welcome!{% endblock %} + {% block stylesheets %}{% endblock %} + + + {% block body %}{% endblock %} + + diff --git a/Resources/views/mail/body.html.twig b/Resources/views/mail/body.html.twig new file mode 100644 index 0000000..fd32b8b --- /dev/null +++ b/Resources/views/mail/body.html.twig @@ -0,0 +1,30 @@ +{% extends '@RapsysAir/mail/base.html.twig' %} +{% block stylesheets %} + + + +{% endblock %} +{% block body %} + + + + + +
{{ site_title|trans }}

{{ site_title|trans }}

+ {% block content %}{% endblock %} + + + + + +{% endblock %} diff --git a/Resources/views/mail/contact.html.twig b/Resources/views/mail/contact.html.twig index 7fe13ff..67cd520 100644 --- a/Resources/views/mail/contact.html.twig +++ b/Resources/views/mail/contact.html.twig @@ -1,43 +1,14 @@ - - - - - - {{ subject }} - - - - - - - - -
{{ title|trans }}

{{ title|trans }}

- +{% extends '@RapsysAir/mail/body.html.twig' %} +{% block title %}{{ subject }}{% endblock %} +{% block content %} +
  -

{% trans %}Hi,{% endtrans %} {{ contact_name }}

-

{% trans %}Subject:{% endtrans %} {{ subject }}

+

{{ 'Subject: %subject%'|trans({'%subject%': subject}) }}

{{ message|nl2br }}

 
- - - - - - - +{% endblock %} diff --git a/Resources/views/mail/contact.text.twig b/Resources/views/mail/contact.text.twig new file mode 100644 index 0000000..dda3abd --- /dev/null +++ b/Resources/views/mail/contact.text.twig @@ -0,0 +1,9 @@ +{{ subject }} +{% for i in range(1, subject|length) %}={% endfor %} + + +{{ message }} + +-- + +{{ copy_long }} - {{ copy_short }} diff --git a/Resources/views/mail/generic.html.twig b/Resources/views/mail/generic.html.twig deleted file mode 100644 index 5e6da39..0000000 --- a/Resources/views/mail/generic.html.twig +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - {{ title }} - - - - - - - - -
{{ title }}

{{ title }}

- - - - - - -
  -

{{ subtitle }}

- {% if subject %} -

{% trans %}Subject:{% endtrans %} {{ subject }}

- {% endif %} - {% if raw is defined %} -

{{ raw|raw }}

- {% else %} -

{{ message|nl2br }}

- {% endif %} -
 
- - - - - - - diff --git a/Resources/views/mail/recover.html.twig b/Resources/views/mail/recover.html.twig new file mode 100644 index 0000000..d7ed809 --- /dev/null +++ b/Resources/views/mail/recover.html.twig @@ -0,0 +1,16 @@ +{% extends '@RapsysAir/mail/body.html.twig' %} +{% block title %}{{ subject }}{% endblock %} +{% block content %} + + + + + + +
  +

{{ 'Subject: %subject%'|trans({'%subject%': 'welcome back to %site_title%'|trans({'%site_title%': site_title|trans})}) }}

+

{{ 'Thanks so much for rejoining %site_title%, the space reservation program.'|trans({'%site_title%': site_title|trans}) }}

+

{% trans %}To recover your account you can follow this link: {% endtrans %}

+

{{ recover_url }}

+
 
+{% endblock %} diff --git a/Resources/views/mail/recover.text.twig b/Resources/views/mail/recover.text.twig new file mode 100644 index 0000000..794d375 --- /dev/null +++ b/Resources/views/mail/recover.text.twig @@ -0,0 +1,11 @@ +{{ subject }} +{% for i in range(1, subject|length) %}={% endfor %} + + +*{{ 'Thanks so much for rejoining %site_title%, the space reservation program.'|trans({'%site_title%': site_title|trans}) }}* + +{{ 'To recover your account you can follow this link: %recover_url%'|trans({'%recover_url%': recover_url}) }} + +-- + +{{ copy_long }} - {{ copy_short }} diff --git a/Resources/views/mail/recover_mail.html.twig b/Resources/views/mail/recover_mail.html.twig new file mode 100644 index 0000000..0cfc299 --- /dev/null +++ b/Resources/views/mail/recover_mail.html.twig @@ -0,0 +1,16 @@ +{% extends '@RapsysAir/mail/body.html.twig' %} +{% block title %}{{ subject }}{% endblock %} +{% block content %} + + + + + + +
  +

{{ 'Subject: %subject%'|trans({'%subject%': 'welcome back to %site_title%'|trans({'%site_title%': site_title|trans})}) }}

+

{{ 'Thanks so much for rejoining %site_title%, the space reservation program.'|trans({'%site_title%': site_title|trans}) }}

+

{% trans %}Your account password has been changed, to recover your account you can follow this link: {% endtrans %}

+

{{ recover_url }}

+
 
+{% endblock %} diff --git a/Resources/views/mail/recover_mail.text.twig b/Resources/views/mail/recover_mail.text.twig new file mode 100644 index 0000000..5a44050 --- /dev/null +++ b/Resources/views/mail/recover_mail.text.twig @@ -0,0 +1,11 @@ +{{ subject }} +{% for i in range(1, subject|length) %}={% endfor %} + + +*{{ 'Thanks so much for rejoining %site_title%, the space reservation program.'|trans({'%site_title%': site_title|trans}) }}* + +{{ 'Your account password has been changed, to recover your account you can follow this link: %recover_url%'|trans({'%recover_url%': recover_url}) }} + +-- + +{{ copy_long }} - {{ copy_short }} diff --git a/Resources/views/mail/register.html.twig b/Resources/views/mail/register.html.twig index 8a6c0d3..b5228d2 100644 --- a/Resources/views/mail/register.html.twig +++ b/Resources/views/mail/register.html.twig @@ -1,43 +1,15 @@ - - - - - - {{ 'Welcome to %title%'|trans({'%title%': title}) }} - - - - - - - - -
{{ title|trans }}

{{ title|trans }}

- +{% extends '@RapsysAir/mail/body.html.twig' %} +{% block title %}{{ subject }}{% endblock %} +{% block content %} +
  -

{% trans %}Hi,{% endtrans %} {{ contact_name }}

-

{% trans %}Subject:{% endtrans %} {{ 'Welcome to %title%'|trans({'%title%': title|trans}) }}

-

{{ 'Thanks so much for joining us, from now you can reserver your %title% spaces.'|trans({'%title%': title|trans}) }}

+

{{ 'Subject: %subject%'|trans({'%subject%': 'welcome to %site_title%'|trans({'%site_title%': site_title|trans})}) }}

+

{{ 'Hi %recipient_name%,'|trans({'%recipient_name%': recipient_name}) }}

+

{{ 'Thanks so much for joining %site_title%, the space reservation program.'|trans({'%site_title%': site_title|trans}) }}

 
- - - - - - - +{% endblock %} diff --git a/Resources/views/mail/register.text.twig b/Resources/views/mail/register.text.twig new file mode 100644 index 0000000..b91e442 --- /dev/null +++ b/Resources/views/mail/register.text.twig @@ -0,0 +1,9 @@ +{{ subject }} +{% for i in range(1, subject|length) %}={% endfor %} + + +*{{ 'Thanks so much for joining %site_title%, the space reservation program.'|trans({'%site_title%': site_title|trans}) }}* + +-- + +{{ copy_long }} - {{ copy_short }} -- 2.41.0