From d7a3afe8f4133eb9cffd9cff485c8534856f1e46 Mon Sep 17 00:00:00 2001 From: mike cullerton Date: Wed, 27 Jan 2021 17:12:03 -0500 Subject: [PATCH] changed the template to use the responsive html email template at https://github.com/leemunroe/responsive-html-email-template added method get_cr_connect_wrapper to render our new html email template. This takes the email text generated from the task element documentation as the email_body. --- crc/scripts/email.py | 4 +- crc/templates/mail_content_template.html | 6 - crc/templates/mail_main_template.html | 432 +++++++++++++++++++++-- 3 files changed, 413 insertions(+), 29 deletions(-) diff --git a/crc/scripts/email.py b/crc/scripts/email.py index 864f8e77..3160dc22 100644 --- a/crc/scripts/email.py +++ b/crc/scripts/email.py @@ -110,6 +110,6 @@ email ("My Subject", "dhf8r@virginia.edu", pi.email) return rendered, wrapped - # @staticmethod - def get_cr_connect_wrapper(self, email_body): + @staticmethod + def get_cr_connect_wrapper(email_body): return render_template('mail_content_template.html', email_body=email_body, base_url=request.base_url) diff --git a/crc/templates/mail_content_template.html b/crc/templates/mail_content_template.html index 095d097f..76ea2b7a 100644 --- a/crc/templates/mail_content_template.html +++ b/crc/templates/mail_content_template.html @@ -1,10 +1,4 @@ {% extends "mail_main_template.html" %} -{% block head %} - {{ super() }} -{% endblock %}} -{% block header %} - {{ super() }} -{% endblock %}} {% block content %}
{{ email_body | safe }} diff --git a/crc/templates/mail_main_template.html b/crc/templates/mail_main_template.html index 5b7f3cb7..df0c2cfe 100644 --- a/crc/templates/mail_main_template.html +++ b/crc/templates/mail_main_template.html @@ -1,29 +1,419 @@ - {% block head %} + + + + CR-Connect Email Research Ramp-Up Toolkit - {% endblock %} - - -
{% block content %}{% endblock %}
- - - \ No newline at end of file + + + + + + + + + + +