From 1f90a7eee08c4871a1b6a68e86d854e91d56f29f Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Wed, 13 Jul 2016 08:55:59 +0100 Subject: [PATCH] Show full email template on single template page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There’s no point in collapsing […] the email on the single template page because it’s the only thing on the page. Users will probably be going back and forth quite a bit to edit their template and see the changes; they shouldn’t have to expanded it evey time to check they’ve got the heading syntax right, for example. --- app/templates/components/email-message.html | 11 ++++++++--- app/templates/views/templates/_template.html | 3 ++- app/templates/views/templates/template.html | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/app/templates/components/email-message.html b/app/templates/components/email-message.html index 8543fae86..6099d4341 100644 --- a/app/templates/components/email-message.html +++ b/app/templates/components/email-message.html @@ -6,7 +6,8 @@ recipient=None, id=None, show_placeholder_for_recipient=False, - show_id=False + show_id=False, + expanded=False ) %}
{% if from_name or subject %} @@ -45,11 +46,15 @@ {% endif %} - {% endmacro %} diff --git a/app/templates/views/templates/_template.html b/app/templates/views/templates/_template.html index 50cf966f9..50c01ef71 100644 --- a/app/templates/views/templates/_template.html +++ b/app/templates/views/templates/_template.html @@ -6,7 +6,8 @@ {{ email_message( template.formatted_subject_as_markup, template.formatted_as_markup, - id=template.id + id=template.id, + expanded=expanded ) }} {% elif 'sms' == template.template_type %} {{ sms_message( diff --git a/app/templates/views/templates/template.html b/app/templates/views/templates/template.html index 4257761f6..3f73a33ae 100644 --- a/app/templates/views/templates/template.html +++ b/app/templates/views/templates/template.html @@ -14,7 +14,7 @@

{{ template.name }}

- {% with show_title=False %} + {% with show_title=False, expanded=True %} {% include 'views/templates/_template.html' %} {% endwith %}