Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Galette
Galette
Commits
043ab6f2
Commit
043ab6f2
authored
Jun 22, 2022
by
Guillaume Agniéray
Committed by
Johan Cwiklinski
Jun 23, 2022
Browse files
Rework mailing preview with SUI
parent
36913deb
Changes
1
Hide whitespace changes
Inline
Side-by-side
galette/templates/default/modals/mailing_preview.html.twig
View file @
043ab6f2
{%
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
}}
<
{{
email
}}
>
</a>
{%
if
not
loop.last
%}
,
{%
endif
%}
<a
href=
"mailto:
{{
email
}}
"
>
{{
recipient.sname
}}
<
{{
email
}}
>
</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
%}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment