mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 16:24:08 -04:00
Truncate previews of email messages to ~3 lines
Emails can get very long. When you’re trying to do other things on the page this results in a lot of scrolling. This commit truncates email messages to about 3 lines, and adds a JS toggle which reveal the full contents of the email.
This commit is contained in:
@@ -31,8 +31,10 @@
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
<div class="email-message-body">
|
||||
<div class="email-message-body" data-module="expand-collapse">
|
||||
<div class="email-message-body-wrapper collapsed">
|
||||
{{ body|nl2br }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<div class="column-two-thirds">
|
||||
{% if 'email' == template_type %}
|
||||
{{ email_message(
|
||||
template.subject,
|
||||
None,
|
||||
template.formatted_as_markup,
|
||||
name=template.name,
|
||||
) }}
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
{% endfor %}
|
||||
{% endcall %}
|
||||
|
||||
<p class="bottom-gutter">
|
||||
<p class="table-show-more-link">
|
||||
<a href="{{ url_for('.get_example_csv', service_id=current_service.id, template_id=template.id) }}">Download this example</a>
|
||||
</p>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user