From 0d76da27b4a35551af53dc2bea7b4f68c10b4e18 Mon Sep 17 00:00:00 2001 From: James Rowan Date: Tue, 27 Jun 2017 13:09:15 -0400 Subject: [PATCH] emails: Add base template for missed message and digest emails. Also removes the files from lint, so that the new indentation doesn't obscure the change. The files are reindented in the next commit. --- templates/zerver/emails/digest.html | 5 ++++ .../zerver/emails/email_base_messages.html | 26 +++++++++++++++++++ templates/zerver/emails/missed_message.html | 5 ++++ tools/check-templates | 2 ++ 4 files changed, 38 insertions(+) create mode 100644 templates/zerver/emails/email_base_messages.html diff --git a/templates/zerver/emails/digest.html b/templates/zerver/emails/digest.html index efc15c6000..0e8030313c 100644 --- a/templates/zerver/emails/digest.html +++ b/templates/zerver/emails/digest.html @@ -1,7 +1,9 @@ +{% extends "zerver/emails/email_base_messages.html" %} {# Mail sent to a user who hasn't logged in for 24 hours. #} +{% block content %} Hello {{ name }},

A lot has happened on Zulip while you've been away! Visit Zulip to catch up.

@@ -92,8 +94,11 @@ Hello {{ name }},

Cheers,
The Zulip Team

+{% endblock %} +{% block manage_preferences %}

Manage email preferences | Unsubscribe from digest emails

+{% endblock %} diff --git a/templates/zerver/emails/email_base_messages.html b/templates/zerver/emails/email_base_messages.html new file mode 100644 index 0000000000..268a8d70ab --- /dev/null +++ b/templates/zerver/emails/email_base_messages.html @@ -0,0 +1,26 @@ + + + + + Zulip + + + + {% block preheader %}{% endblock %} + + {% block content %}{% endblock %} + {% block manage_preferences %}{% endblock %} + + diff --git a/templates/zerver/emails/missed_message.html b/templates/zerver/emails/missed_message.html index 8124112aa2..8e043159e8 100644 --- a/templates/zerver/emails/missed_message.html +++ b/templates/zerver/emails/missed_message.html @@ -1,7 +1,9 @@ +{% extends "zerver/emails/email_base_messages.html" %} {# Mail sent to user when they were not logged in and received a PM or @-mention #} +{% block content %} Hello {{ name }},

@@ -43,5 +45,8 @@ Hello {{ name }},

The Zulip Team

+{% endblock %} +{% block manage_preferences %}

Manage email preferences | Unsubscribe from missed message emails

+{% endblock %} diff --git a/tools/check-templates b/tools/check-templates index 25b4a49fea..54febb0852 100755 --- a/tools/check-templates +++ b/tools/check-templates @@ -127,6 +127,8 @@ def check_html_templates(templates, all_dups): 'templates/zerver/api.html', 'templates/zerver/apps.html', 'templates/zerver/compose.html', + 'templates/zerver/emails/digest.html', + 'templates/zerver/emails/missed_message.html', 'templates/zerver/hello.html', 'templates/zerver/home.html', 'templates/zerver/index.html',