-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmail_newsletter.pt
More file actions
84 lines (77 loc) · 3.8 KB
/
Copy pathmail_newsletter.pt
File metadata and controls
84 lines (77 loc) · 3.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<div metal:use-macro="layout.base" i18n:domain="onegov.org">
<tal:b metal:fill-slot="title">
${title}
</tal:b>
<tal:b metal:fill-slot="body">
<h1>${title}</h1>
<p tal:condition="lead" tal:content="lead"></p>
<tal:b condition="news">
<h2 i18n:translate>Latest news</h2>
<tal:b repeat="item news" tal:condition="not: request.app.org.show_news_as_tiles|False">
<strong><a href="${request.link(item)}">${item.title}</a></strong>
<tal:b tal:switch="item.text_in_newsletter">
<tal:b tal:case="False">
<p>${layout.with_hashtags(item.lead)}</p>
</tal:b>
<tal:b tal:case="True" tal:content="item.text">
</tal:b>
</tal:b>
</tal:b>
<tal:b tal:condition="request.app.org.show_news_as_tiles|False and news">
<div class="newslist" tal:condition="news">
<div class="row">
<div class="small-12 columns news-list-item" tal:repeat="item news">
<hr>
<div class="row">
<div class="small-12 medium-6 columns">
<div tal:condition="item.page_image and item.show_preview_image" style="width: 100%; padding-bottom: 50%; background-image: url(${item.page_image}); background-size: cover;"></div>
</div>
</div>
<a tal:attributes="href request.link(item)">
<h2 tal:condition="heading == 'h2'|True">${item.title}</h2>
</a>
<p class="news-date" tal:condition="not:hide_date|False">${layout.format_date(item.published_or_created, 'relative')}</p>
<p class="news-lead">${item.lead}</p>
</div>
</div>
</div>
</tal:b>
</tal:b>
<tal:b condition="publications">
<h2 i18n:translate>Publications</h2>
<tal:b repeat="publication publications">
<strong><a href="${request.link(publication)}">${name_without_extension(publication.name)}</a></strong>
<ul class="flat">
<li>${layout.format_date(publication.created, 'date')}</li>
</ul>
</tal:b>
</tal:b>
<tal:b condition="occurrences">
<h2 i18n:translate>Events</h2>
<tal:b repeat="occurrence occurrences">
<strong><a href="${request.link(occurrence)}">${occurrence.title}</a></strong>
<ul class="flat">
<li>${layout.format_date(occurrence.localized_start, 'date')} ${layout.format_date(occurrence.localized_start, 'time')} - ${layout.format_date(occurrence.localized_end, 'time')}</li>
<li>${occurrence.location}</li>
</ul>
</tal:b>
</tal:b>
<tal:b condition="closing_remark">
<hr>
<p tal:content="closing_remark"></p>
</tal:b>
</tal:b>
<tal:b metal:fill-slot="above-footer">
<p>
<span i18n:translate>
You are receiving this e-mail because you signed up for the <span tal:replace='layout.org.title' i18n:name='org' /> newsletter.
</span>
<p>
<a href="${request.link(newsletter)}" i18n:translate>Click here to view web version.</a>
</p>
<p>
<tal:b i18n:translate="">You no longer wish to receive the newsletter?</tal:b> <a href="${unsubscribe}" i18n:translate>Click here to unsubscribe.</a>.
</p>
</p>
</tal:b>
</div>