From 81e6a022e6c46748b34728daeef310e2a65c3c5e Mon Sep 17 00:00:00 2001
From: Vishnu Ks
Date: Mon, 31 Dec 2018 08:54:59 +0000
Subject: [PATCH] emails: Inline CSS in missed_message.
As part of this change, we port into the .messages class the work in
4e8e7348da840d39ae3da900e17505da35fbbcc5 to change overflow-y to auto,
not scroll (skipping that would result in a regression).
---
templates/zerver/emails/digest.source.html | 2 +-
templates/zerver/emails/email.css | 41 ++++++++++++++++++-
...essage.html => missed_message.source.html} | 18 ++++----
tools/check-templates | 2 +-
tools/linter_lib/custom_check.py | 1 -
5 files changed, 50 insertions(+), 14 deletions(-)
rename templates/zerver/emails/{missed_message.html => missed_message.source.html} (62%)
diff --git a/templates/zerver/emails/digest.source.html b/templates/zerver/emails/digest.source.html
index a46465e1bf..c9e4c2222f 100644
--- a/templates/zerver/emails/digest.source.html
+++ b/templates/zerver/emails/digest.source.html
@@ -39,7 +39,7 @@
{% for convo in hot_conversations %}
-
+
{% for recipient_block in convo.first_few_messages %}
{% for recipient_block in messages %}
{% if not recipient_block.header.stream_message %}
-
-
{{ recipient_block.header.html|safe }}
-
+
+
{{ recipient_block.header.html|safe }}
+
{% else %}
-
-
{{ recipient_block.header.html|safe }}
-
+
+
{{ recipient_block.header.html|safe }}
+
{% endif %}
{% for sender_block in recipient_block.senders %}
- {% if sender_block.sender %}
{{ sender_block.sender }}
{% endif %}
+ {% if sender_block.sender %}
{{ sender_block.sender }}
{% endif %}
{% for message_block in sender_block.content %}
-
+
{{ message_block.html|safe }}
{% endfor %}
diff --git a/tools/check-templates b/tools/check-templates
index a91ce57841..54f341d449 100755
--- a/tools/check-templates
+++ b/tools/check-templates
@@ -17,7 +17,7 @@ EXCLUDED_FILES = [
## Test data Files for testing modules in tests
"tools/tests/test_template_data",
# Our parser doesn't handle the way its conditionals are layered
- 'templates/zerver/emails/missed_message.html',
+ 'templates/zerver/emails/missed_message.source.html',
]
def check_our_files(modified_only, all_dups, targets):
diff --git a/tools/linter_lib/custom_check.py b/tools/linter_lib/custom_check.py
index 4262ded376..214a74c3ad 100644
--- a/tools/linter_lib/custom_check.py
+++ b/tools/linter_lib/custom_check.py
@@ -801,7 +801,6 @@ def build_custom_checkers(by_lang):
# Old-style email templates need to use inline style
# attributes; it should be possible to clean these up
# when we convert these templates to use premailer.
- 'templates/zerver/emails/missed_message.html',
'templates/zerver/emails/email_base_messages.html',
# Email log templates; should clean up.