email.html 12.1 KB
Newer Older
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
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
{% load i18n %}
{% load listutil %}
{% load baseurl %}
{% load static from staticfiles %}

{% with primary_color="#EE227A" item_h2_style="color:#EE227A;font-family:Calibri, 'Trebuchet MS', sans-serif; font-size: 18px; margin-bottom: 10px; margin-top: 30px;" item_tr_style="padding-left: 30px; padding-right: 30px; padding-bottom: 10px; margin: 0px; vertical-align: top;" %}
<html style="background-color: #F0F0F0;">
<head>
    <title>{{ newsletter.title }}</title>
    <style type="text/css">
        a[x-apple-data-detectors] {
            color: inherit !important;
            text-decoration: none !important;
            font-size: inherit !important;
            font-family: inherit !important;
            font-weight: inherit !important;
            line-height: inherit !important;
        }
    </style>
</head>
<body>

<div style="background-color: #F0F0F0; padding: 20px;">

    <p style="margin:0px 0px 10px 0px; background-color: #F0F0F0; font-family: Arial, sans-serif; text-align: center; font-size: 11px;">
        <a style="color: {{ primary_color }}; text-decoration: underline;" href="{% baseurl %}{{ newsletter.get_absolute_url }}">{% trans "view this email in your browser"|capfirst %}</a>
    </p>

    <div style="background-color: white; width: 700px ; margin-left: auto ; margin-right: auto;">
        <table width="100%" style="border-spacing: 0px; font-size: 15px; font-family: Arial, sans-serif">
            <col width="500px">
            <col width="200px">

            <tr style="height: 127px; color: white; overflow: hidden; ">
                <td style="background-color: {{ primary_color }}; text-align:center;">
                    <a href="{% baseurl %}{% url 'index' %}"><img src="{% baseurl %}{% static 'newsletters/logo-'|add:lang_code|add:'.png' %}" alt="Thalia" style="margin: 10px" width="280" height="107" style="width: 280px; height: 107px;"></a>
                </td>
                <td style="background-color: black;text-align:center;valign:middle;">
                    {% if newsletter.date %}
                        <span style="font-size: 20px; font-family: Calibri, 'Trebuchet MS', sans-serif">WEEK</span><br/>
                        <span style="font-size: 45px; font-family: Calibri, 'Trebuchet MS', sans-serif">{{ newsletter.date.isocalendar.1 }}</span>
                    {% endif %}
                </td>
            </tr>

            <tr>
                <td colspan="2" style="{{ item_tr_style }}">
                    <h2 style="{{ item_h2_style }}">
                        {% trans "dear members"|upper %},
                    </h2>
            </tr>
            <tr>
                <td style="{{ item_tr_style }}" colspan="2">
                    {{ newsletter.description|safe }}
                </td>
            </tr>
57
            {% if agenda_events %}
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
58
59
60
61
62
63
64
65
66
67
            <tr>
                <td colspan="2" style="{{ item_tr_style }}">
                    <h2 style="{{ item_h2_style }}">{% trans "agenda"|upper %}</h2>
                </td>
            </tr>
            <tr>
                <td style="{{ item_tr_style }}" colspan="2">
                    <table style="width: 100%">
                        <tbody>
                        <td>
68
                            {% for row in agenda_events|rows_distributed:2 %}
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
69
70
                             <td style="vertical-align: top;">
                                {% for item in row %}
71
                                <li style="font-family: Arial, sans-serif;"><i>{{ item.title }} - {{ item.start|date:"d F" }}</i></li>
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
72
73
74
75
76
77
78
79
                                {% endfor %}
                             </td>
                            {% endfor %}
                        </tr>
                        </tbody>
                    </table>
                </td>
            </tr>
80
            {% endif %}
81
            {% for item in newsletter.newslettercontent_set.all %}
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
82
83
84
85
86
87
            <tr>
                <td colspan="2" style="{{ item_tr_style }}">
                    <h2 style="{{ item_h2_style }}">{{ item.title.upper }}</h2>
                </td>
            </tr>

88
89
90
91
92
                {% if item.newsletterevent %}
                <tr>
                    <td style="{{ item_tr_style }}">
                        {{ item.description|safe }}

93
                        {% if item.newsletterevent.show_costs_warning %}
94
95
96
                            <p style="font-family: Arial, sans-serif">
                                <i><b>{% trans "Attention" %}:</b> {% trans "Registration deadline = unregistration deadline" %}!
                                {% trans "Thalia will recover the costs on you if you do not unregister on time" %}.
97
98
                                {% if item.newsletterevent.penalty_costs and item.newsletterevent.penalty_costs > 0 %}
                                    {% trans "These costs are" %}: <b>€{{ item.newsletterevent.penalty_costs }}.</b>
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
99
                                {% endif %}
100
101
                                </i>
                            </p>
102
                        {% endif %}
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
                    </td>

                    <td style="vertical-align: top;">
                        <div style="padding: 20px; background-color: black; border-left: 5px solid {{ primary_color }};">
                            <div style="margin-bottom: 5px;">
                                <b style="font-family: Calibri, 'Trebuchet MS', sans-serif;font-size: 15px; color: {{ primary_color }};">
                                    {% trans "What"|upper %}
                                </b>
                                <br>
                                <span style="font-family: Arial, sans-serif; font-size: 15px; color: white; ">
                                    {{ item.newsletterevent.what }}
                                </span>
                            </div>

                            <div style="margin-bottom: 5px;">
                                <b style="font-family: Calibri, 'Trebuchet MS', sans-serif;font-size: 15px; color: {{ primary_color }};">
                                    {% trans "Where"|upper %}
                                </b>
                                <br>
                                <span style="font-family: Arial, sans-serif; font-size: 15px; color: white; ">
                                    {{ item.newsletterevent.where }}
                                </span>
                            </div>

                            <div style="margin-bottom: 5px;">
                                <b style="font-family: Calibri, 'Trebuchet MS', sans-serif;font-size: 15px; color: {{ primary_color }};">
                                    {% trans "When"|upper %}
                                </b>
                                <br>
                                <span style="font-family: Arial, sans-serif; font-size: 15px; color: white; ">
                                    {% if item.newsletterevent.start_datetime|date:'d-M-Y H:i' == item.newsletterevent.end_datetime|date:'d-M-Y H:i' %}
                                        {{ item.newsletterevent.start_datetime }}
                                    {% elif item.newsletterevent.start_datetime|date:'d-M-Y' == item.newsletterevent.end_datetime|date:'d-M-Y' %}
                                        {{ item.newsletterevent.start_datetime }} - {{ item.newsletterevent.end_datetime|date:'H:i' }}
                                    {% else %}
                                        {{ item.newsletterevent.start_datetime }} - {{ item.newsletterevent.end_datetime }}
                                    {% endif %}
                                </span>
                            </div>

                            {% if item.newsletterevent.price is not None %}
                            <div style="margin-bottom: 5px;">
                                <b style="font-family: Calibri, 'Trebuchet MS', sans-serif;font-size: 15px; color: {{ primary_color }};">
                                    {% trans "Price"|upper %}
                                </b>
                                <br>
                                <span style="font-family: Arial, sans-serif; font-size: 15px; color: white; ">
                                    {% if item.newsletterevent.price == 0 %}
                                        {% trans "Free" %}
                                    {% else %}
                                        €{{ item.newsletterevent.price }}
                                    {% endif %}
                                </span>
                            </div>
                            {% endif %}
                        </div>
                    </td>
                </tr>
                {% else %}
                <tr>
                    <td colspan="2" style="{{ item_tr_style }}">
                        {{ item.description|safe }}
                    </td>
                </tr>
                {% endif %}
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
168
169
            {% endfor %}

170
171
172
173
174
175
            <tr>
                <td colspan="2" style="{{ item_tr_style }}">
                    <em>Is this email not in your preferred language? You can <a href="{% baseurl %}{% url 'members:edit-profile' %}" style="color:#EE227A;">edit your profile</a> on the website and adjust the preferred language setting. The next newsletter you'll receive will be in the language you selected.</em>
                </td>
            </tr>

Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
176
177
178
179
180
            <tr>
                <td colspan="2" style="padding: 20px;"></td>
            </tr>

            <tr style="margin-top: 20px;">
181
182
183
184
185
186
187
188
189
                <td style="background-color: {{ primary_color }}; overflow: hidden; padding-left:30px; padding-top: 10px; padding-bottom: 10px;">
                    <a href="{% baseurl %}{% url 'index' %}"><img src="{% baseurl %}{% static 'newsletters/logo-footer-'|add:lang_code|add:'.png' %}" alt="Thalia" width="180" height="75" style="float:left;width: 180px; height: 75px;"></a>
                </td>
                <td align="center" style="background-color: black; color: white;font-size: 12px; padding: 10px;">
                    <p style="font-size: 18px; color: white; font-family: 'Calibri', 'Trebuchet MS', sans-serif;">
                        M1.0.08<br>
                        <a href="https://www.thalia.nu" style="text-decoration:none; color: white; font-family: Calibri, 'Trebuchet MS', sans-serif">WWW.THALIA.NU</a><br>
                        <a href="mailto:info@thalia.nu" style="text-decoration:none; color: white; font-family: Calibri, 'Trebuchet MS', sans-serif">INFO@THALIA.NU</a>
                    </p>
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
190
                </td>
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
            </tr>
        </table>
    </div>
    {% if local_partner or main_partner %}
    <div style="width: 700px ; margin-top: 30px; margin-left: auto ; margin-right: auto;">
        <table cellspacing="0" cellpadding="0">
            {% if local_partner and main_partner and local_partner.is_active and main_partner.is_active %}
                <col width="350px">
                <col width="350px">
            {% else %}
                <col width="700px">
            {% endif %}
            <tr>
                {% if local_partner and local_partner.is_active %}
                <td align="center" style="color: black; font-size: 12px;">
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
206
                    <p style="margin: 10px; font-family: 'Gill Sans', 'Trebuchet MS', sans-serif;">
207
208
                        <a href="{{ local_partner.link }}"><img src="{% baseurl %}{% static 'newsletters/yoast-logo.png' %}" height="70" style="height: 70px; margin-bottom: 25px" alt="{{ local_partner.name }}"/></a><br/>
                        {% trans "our local partner"|upper %}
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
209
210
                    </p>
                </td>
211
212
213
214
                {% endif %}
                {% if main_partner and main_partner.is_active %}
                <td align="center" style="color: black; font-size: 12px;">
                    <p style="margin: 10px; font-family: 'Gill Sans', 'Trebuchet MS', sans-serif;">
215
                        <a href="{{ main_partner.link }}">
216
                            <img src="{% baseurl %}{% static 'newsletters/nedap-logo.png' %}" height="95" style="height: 95px;" alt="{{ main_partner.name }}"/>
217
                        </a><br/>
218
219
220
221
                        {% trans "our main partner"|upper %}
                    </p>
                </td>
                {% endif %}
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
222
223
224
            </tr>
        </table>
    </div>
225
    {% endif %}
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
226
227
</body>
</html>
228
{% endwith %}