mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-02 23:47:42 -04:00
Show full email template on single template page
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.
This commit is contained in:
@@ -6,7 +6,8 @@
|
||||
recipient=None,
|
||||
id=None,
|
||||
show_placeholder_for_recipient=False,
|
||||
show_id=False
|
||||
show_id=False,
|
||||
expanded=False
|
||||
) %}
|
||||
<div class="email-message">
|
||||
{% if from_name or subject %}
|
||||
@@ -45,11 +46,15 @@
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
<div class="email-message-body" data-module="expand-collapse" data-max-height="200">
|
||||
<div class="email-message-body" {% if not expanded %}data-module="expand-collapse" data-max-height="200"{% endif %}>
|
||||
{% if not expanded %}
|
||||
<div class="email-message-body-wrapper">
|
||||
{{ body|nl2br }}
|
||||
{% endif %}
|
||||
{{ body|nl2br }}
|
||||
{% if not expanded %}
|
||||
</div>
|
||||
<div class='toggle' tabindex='0'>...<span class='visually-hidden'>show full email</span></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<h1 class="heading-large">{{ template.name }}</h1>
|
||||
|
||||
<div class="grid-row">
|
||||
{% with show_title=False %}
|
||||
{% with show_title=False, expanded=True %}
|
||||
{% include 'views/templates/_template.html' %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user