Commit 043ab6f2 authored by Guillaume Agniéray's avatar Guillaume Agniéray Committed by Johan Cwiklinski
Browse files

Rework mailing preview with SUI

parent 36913deb
{% extends (mode == 'ajax') ? "ajax.html.twig" : "page.html.twig" %}
{% block content %}
<section id="mailing_header" class="ajax_mailing_preview">
<header class="ui-state-active ui-corner-top">{{ _T("Headers") }}</header>
<dl>
<dt>{{ _T("From:") }}</dt>
<dd>{{ sender }}</dd>
<dt>{{ _T("To:") }}</dt>
<dd>
<section id="mailing_header" class="ajax_mailing_preview">
<div class="ui top attached accordion-styled header">
{{ _T("Headers") }}
</div>
<div class="ui bottom attached accordion-styled segment">
<table class="ui very basic striped table">
<tbody>
<tr>
<th>{{ _T("From:") }}</th>
<td>{{ sender }}</td>
</tr>
<tr>
<th>{{ _T("To:") }}</th>
<td>
{% for recipient in recipients %}
{% if recipient.email is null and recipient.hasParent() %}
{% set email = recipient.parent.email %}
{% else %}
{% set email = recipient.email %}
{% endif %}
<a href="mailto:{{ email }}">{{ recipient.sname }} &lt;{{ email }}&gt;</a>{% if not loop.last %}, {% endif %}
<a href="mailto:{{ email }}">{{ recipient.sname }} &lt;{{ email }}&gt;</a>{% if not loop.last %}, {% endif %}
{% endfor %}
</dd>
<dt>{{ _T("Subject:") }}</dt>
<dd>{{ mailing.subject }}</dd>
<dt>{{ _T("Attachments:") }}</dt>
<dd>
</td>
</tr>
<tr>
<th>{{ _T("Subject:") }}</th>
<td>{{ mailing.subject }}</td>
</tr>
<tr>
<th>{{ _T("Attachments:") }}</th>
<td>
{% for attachment in attachments %}
<span class="attached"><a target="_blank" href="{{ path_for("previewAttachment", {"id": mailing_id, "pos": loop.index}) }}"><i class="ui link icon"></i>{{ attachment.getFileName() }}</a></span>
<span class="attached"><a target="_blank" href="{{ path_for("previewAttachment", {"id": mailing_id, "pos": loop.index}) }}"><i class="ui paperclip icon"></i>{{ attachment.getFileName() }}</a></span>
{% else %}
-
{% endfor %}
</dd>
</dl>
</section>
<section id="mailing_preview" class="ajax_mailing_preview">
<header class="ui-state-active ui-corner-top">{{ _T("Mail body") }}</header>
<div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<section id="mailing_preview" class="ajax_mailing_preview">
<div class="ui top attached accordion-styled header">
{{ _T("Mail body") }}
</div>
<div class="ui bottom attached accordion-styled segment">
{% if mailing.html %}
{{ mailing.message }}
{{ mailing.message }}
{% else %}
<pre>{{ mailing.wrapped_message|escape }}</pre>
<pre>{{ mailing.wrapped_message|escape }}</pre>
{% endif %}
</div>
</section>
</div>
</section>
{% endblock %}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment