forked from saleor/saleor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated MJML to v4 and changed the syntax of Django {% load %} tags to not result in empty email sections.
- Loading branch information
Showing
12 changed files
with
5,526 additions
and
5,617 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 23 additions & 29 deletions
52
templates/templated_email/source/confirm_fulfillment.mjml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,30 @@ | ||
<mjml> | ||
<mj-head> | ||
<mj-include path="./shared/styles" /> | ||
<mj-include path="./shared/styles.mjml" /> | ||
</mj-head> | ||
<mj-body> | ||
<mj-container> | ||
<mj-section css-class="no-display"> | ||
<mj-column> | ||
<mj-text> | ||
{% load i18n %} | ||
</mj-text> | ||
</mj-column> | ||
</mj-section> | ||
<mj-include path="./shared/header" /> | ||
<mj-section> | ||
<mj-column> | ||
<mj-text font-size="16px"> | ||
{% trans "Hi!" context "Fulfillment confirmation email text" %} | ||
</mj-text> | ||
<mj-text> | ||
{% blocktrans trimmed context "Fulfillment confirmation email text" %} | ||
Thank you for your order. Below is the list of shipped products. | ||
<mj-raw> | ||
{% load i18n %} | ||
</mj-raw> | ||
<mj-include path="./shared/header.mjml" /> | ||
<mj-section> | ||
<mj-column> | ||
<mj-text font-size="16px"> | ||
{% trans "Hi!" context "Fulfillment confirmation email text" %} | ||
</mj-text> | ||
<mj-text> | ||
{% blocktrans trimmed context "Fulfillment confirmation email text" %} | ||
Thank you for your order. Below is the list of shipped products. | ||
{% endblocktrans %} | ||
{% if fulfillment.tracking_number %} | ||
{% blocktrans trimmed with tracking_number=fulfillment.tracking_number context "Fulfillment confirmation email text" %} | ||
You can track your shipment with {{ tracking_number }} code. | ||
{% endblocktrans %} | ||
{% if fulfillment.tracking_number %} | ||
{% blocktrans trimmed with tracking_number=fulfillment.tracking_number context "Fulfillment confirmation email text" %} | ||
You can track your shipment with {{ tracking_number }} code. | ||
{% endblocktrans %} | ||
{% endif %} | ||
</mj-text> | ||
</mj-column> | ||
</mj-section> | ||
<mj-include path="./partials/_fulfillment_lines" /> | ||
<mj-include path="./shared/footer" /> | ||
</mj-container> | ||
{% endif %} | ||
</mj-text> | ||
</mj-column> | ||
</mj-section> | ||
<mj-include path="./partials/_fulfillment_lines.mjml" /> | ||
<mj-include path="./shared/footer.mjml" /> | ||
</mj-body> | ||
</mjml> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,24 @@ | ||
<mjml> | ||
<mj-head> | ||
<mj-include path="./shared/styles" /> | ||
<mj-include path="./shared/styles.mjml" /> | ||
</mj-head> | ||
<mj-body> | ||
<mj-container> | ||
<mj-section css-class="no-display"> | ||
<mj-column> | ||
<mj-text> | ||
{% load i18n %} | ||
</mj-text> | ||
</mj-column> | ||
</mj-section> | ||
<mj-include path="./shared/header" /> | ||
<mj-section> | ||
<mj-column> | ||
<mj-text font-size="16px"> | ||
{% trans "Hi!" context "Note confirmation e-mail text" %} | ||
</mj-text> | ||
<mj-text> | ||
{% blocktrans trimmed context "Note confirmation e-mail text" %} | ||
A new note has been added to your order. To see details please visit: <a href="{{ url }}">{{ url }}</a> | ||
{% endblocktrans %} | ||
</mj-text> | ||
</mj-column> | ||
</mj-section> | ||
<mj-include path="./shared/footer" /> | ||
</mj-container> | ||
<mj-raw> | ||
{% load i18n %} | ||
</mj-raw> | ||
<mj-include path="./shared/header.mjml" /> | ||
<mj-section> | ||
<mj-column> | ||
<mj-text font-size="16px"> | ||
{% trans "Hi!" context "Note confirmation e-mail text" %} | ||
</mj-text> | ||
<mj-text> | ||
{% blocktrans trimmed context "Note confirmation e-mail text" %} | ||
A new note has been added to your order. To see details please visit: <a href="{{ url }}">{{ url }}</a> | ||
{% endblocktrans %} | ||
</mj-text> | ||
</mj-column> | ||
</mj-section> | ||
<mj-include path="./shared/footer.mjml" /> | ||
</mj-body> | ||
</mjml> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,52 @@ | ||
<mjml> | ||
<mj-head> | ||
<mj-include path="./shared/styles" /> | ||
<mj-include path="./shared/styles.mjml" /> | ||
</mj-head> | ||
<mj-body> | ||
<mj-container> | ||
<mj-section css-class="no-display"> | ||
<mj-column> | ||
<mj-text> | ||
{% load i18n %} | ||
{% load i18n_address_tags %} | ||
</mj-text> | ||
</mj-column> | ||
</mj-section> | ||
<mj-include path="./shared/header" /> | ||
<mj-section> | ||
<mj-column> | ||
<mj-text font-size="16px"> | ||
{% trans "Hi!" context "Order confirmation e-mail text" %} | ||
</mj-text> | ||
<mj-text> | ||
{% blocktrans trimmed context "Order confirmation e-mail text" %} | ||
Thank you for your order. Below is the list of ordered products. To see your payment details please visit: <a href="{{ url }}">{{ url }}</a> | ||
{% endblocktrans %} | ||
</mj-text> | ||
</mj-column> | ||
</mj-section> | ||
<mj-include path="./partials/_order_lines" /> | ||
<mj-section> | ||
<mj-column> | ||
<mj-table> | ||
<thead class="table-header-row"> | ||
<tr> | ||
<th>{% trans "Billing address" context "Order confirmation e-mail billing address" %}</th> | ||
<th>{% trans "Shipping address" context "Order confirmation e-mail shipping address" %}</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td class="address"> | ||
{% format_address order.billing_address %} | ||
</td> | ||
<td css-class="address"> | ||
{% if order.shipping_address %} | ||
{% format_address order.shipping_address %} | ||
{% else %} | ||
{% trans "No shipping required" context "Order confirmation e-mail text" %} | ||
{% endif %} | ||
</td> | ||
</tr> | ||
</tbody> | ||
</mj-table> | ||
</mj-column> | ||
</mj-section> | ||
<mj-include path="./shared/footer" /> | ||
</mj-container> | ||
<mj-raw> | ||
{% load i18n %} | ||
{% load i18n_address_tags %} | ||
</mj-raw> | ||
<mj-include path="./shared/header.mjml" /> | ||
<mj-section> | ||
<mj-column> | ||
<mj-text font-size="16px"> | ||
{% trans "Hi!" context "Order confirmation e-mail text" %} | ||
</mj-text> | ||
<mj-text> | ||
{% blocktrans trimmed context "Order confirmation e-mail text" %} | ||
Thank you for your order. Below is the list of ordered products. To see your payment details please visit: <a href="{{ url }}">{{ url }}</a> | ||
{% endblocktrans %} | ||
</mj-text> | ||
</mj-column> | ||
</mj-section> | ||
<mj-include path="./partials/_order_lines.mjml" /> | ||
<mj-section> | ||
<mj-column> | ||
<mj-table> | ||
<thead class="table-header-row"> | ||
<tr> | ||
<th>{% trans "Billing address" context "Order confirmation e-mail billing address" %}</th> | ||
<th>{% trans "Shipping address" context "Order confirmation e-mail shipping address" %}</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td class="address"> | ||
{% format_address order.billing_address %} | ||
</td> | ||
<td css-class="address"> | ||
{% if order.shipping_address %} | ||
{% format_address order.shipping_address %} | ||
{% else %} | ||
{% trans "No shipping required" context "Order confirmation e-mail text" %} | ||
{% endif %} | ||
</td> | ||
</tr> | ||
</tbody> | ||
</mj-table> | ||
</mj-column> | ||
</mj-section> | ||
<mj-include path="./shared/footer.mjml" /> | ||
</mj-body> | ||
</mjml> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,24 @@ | ||
<mjml> | ||
<mj-head> | ||
<mj-include path="./shared/styles" /> | ||
<mj-include path="./shared/styles.mjml" /> | ||
</mj-head> | ||
<mj-body> | ||
<mj-container> | ||
<mj-section css-class="no-display"> | ||
<mj-column> | ||
<mj-text> | ||
{% load i18n %} | ||
</mj-text> | ||
</mj-column> | ||
</mj-section> | ||
<mj-include path="./shared/header" /> | ||
<mj-section> | ||
<mj-column> | ||
<mj-text font-size="16px"> | ||
{% trans "Hi!" context "Payment confirmation e-mail text" %} | ||
</mj-text> | ||
<mj-text> | ||
{% blocktrans trimmed context "Payment confirmation e-mail text" %} | ||
Thank you for your payment. To see your payment details please visit: <a href="{{ url }}">{{ url }}</a> | ||
{% endblocktrans %} | ||
</mj-text> | ||
</mj-column> | ||
</mj-section> | ||
<mj-include path="./shared/footer" /> | ||
</mj-container> | ||
<mj-raw> | ||
{% load i18n %} | ||
</mj-raw> | ||
<mj-include path="./shared/header.mjml" /> | ||
<mj-section> | ||
<mj-column> | ||
<mj-text font-size="16px"> | ||
{% trans "Hi!" context "Payment confirmation e-mail text" %} | ||
</mj-text> | ||
<mj-text> | ||
{% blocktrans trimmed context "Payment confirmation e-mail text" %} | ||
Thank you for your payment. To see your payment details please visit: <a href="{{ url }}">{{ url }}</a> | ||
{% endblocktrans %} | ||
</mj-text> | ||
</mj-column> | ||
</mj-section> | ||
<mj-include path="./shared/footer.mjml" /> | ||
</mj-body> | ||
</mjml> |
12 changes: 4 additions & 8 deletions
12
templates/templated_email/source/partials/_order_lines.mjml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,30 @@ | ||
<mjml> | ||
<mj-head> | ||
<mj-include path="./shared/styles" /> | ||
<mj-include path="./shared/styles.mjml" /> | ||
</mj-head> | ||
<mj-body> | ||
<mj-container> | ||
<mj-section css-class="no-display"> | ||
<mj-column> | ||
<mj-text> | ||
{% load i18n %} | ||
</mj-text> | ||
</mj-column> | ||
</mj-section> | ||
<mj-include path="./shared/header" /> | ||
<mj-section> | ||
<mj-column> | ||
<mj-text font-size="16px"> | ||
{% trans "Hi!" context "Password reset e-mail text" %} | ||
</mj-text> | ||
<mj-text> | ||
{% blocktrans trimmed context "Password reset e-mail text" %} | ||
You're receiving this e-mail because you or someone else has requested a password for your user account at {{ domain }}.<br/> | ||
It can be safely ignored if you did not request a password reset. Click the link below to reset your password. | ||
{% endblocktrans %} | ||
</mj-text> | ||
<mj-text> | ||
<a href="{{ protocol}}://{{ domain }}{% url 'account:reset-password-confirm' uidb64=uid token=token %}"> | ||
{{ protocol}}://{{ domain }}{% url 'account:reset-password-confirm' uidb64=uid token=token %} | ||
</a> | ||
</mj-text> | ||
</mj-column> | ||
</mj-section> | ||
<mj-include path="./shared/footer" /> | ||
</mj-container> | ||
<mj-raw> | ||
{% load i18n %} | ||
</mj-raw> | ||
<mj-include path="./shared/header.mjml" /> | ||
<mj-section> | ||
<mj-column> | ||
<mj-text font-size="16px"> | ||
{% trans "Hi!" context "Password reset e-mail text" %} | ||
</mj-text> | ||
<mj-text> | ||
{% blocktrans trimmed context "Password reset e-mail text" %} | ||
You're receiving this e-mail because you or someone else has requested a password for your user account at {{ domain }}.<br/> | ||
It can be safely ignored if you did not request a password reset. Click the link below to reset your password. | ||
{% endblocktrans %} | ||
</mj-text> | ||
<mj-text> | ||
<a href="{{ protocol}}://{{ domain }}{% url 'account:reset-password-confirm' uidb64=uid token=token %}"> | ||
{{ protocol}}://{{ domain }}{% url 'account:reset-password-confirm' uidb64=uid token=token %} | ||
</a> | ||
</mj-text> | ||
</mj-column> | ||
</mj-section> | ||
<mj-include path="./shared/footer.mjml" /> | ||
</mj-body> | ||
</mjml> |
Oops, something went wrong.