Skip to content

Commit 9703205

Browse files
committed
chore: add events templates
1 parent ced3175 commit 9703205

File tree

8 files changed

+506
-2
lines changed

8 files changed

+506
-2
lines changed

dispatcher/helpers/send.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,14 @@ def su_sentence():
2929
"NEW_JOIN_REQUEST": 'MyAEGEE: New join request for your body',
3030
"NEW_MEMBER": 'MyAEGEE: Welcome to AEGEE'
3131
},
32-
#"EVENTS": {},
32+
"EVENTS": {
33+
"MAIL_APPLIED": f"You've successfully applied for {su_sentence()}",
34+
"MAIL_UPDATED": f"Your application for {su_sentence()} was updated",
35+
"MAIL_EVENT_CREATED": "The event was created",
36+
"MAIL_EVENT_UPDATED": "The event was updated",
37+
"MAIL_EVENT_STATUS_CHANGED": "Your event's status was changed",
38+
"MAIL_EVENT_SUBMITTED": "An event was submitted",
39+
},
3340
"SUMMERUNIVERSITIES": {
3441
"MAIL_APPLIED_MEMBER": f"You've successfully applied for {su_sentence()}",
3542
"MAIL_APPLIED_ORGANISERS": f"Somebody has applied for {su_sentence()}",
@@ -55,7 +62,14 @@ def su_sentence():
5562
"NEW_JOIN_REQUEST": 'member_joined',
5663
"NEW_MEMBER": 'new_member'
5764
},
58-
#"EVENTS": {},
65+
"EVENTS": {
66+
"MAIL_APPLIED": "events_applied",
67+
"MAIL_UPDATED": "events_edited",
68+
"MAIL_EVENT_CREATED": "events_event_created",
69+
"MAIL_EVENT_UPDATED": "events_event_updated",
70+
"MAIL_EVENT_STATUS_CHANGED": "events_status_changed",
71+
"MAIL_EVENT_SUBMITTED": "events_submitted",
72+
},
5973
"SUMMERUNIVERSITIES": {
6074
"MAIL_APPLIED_MEMBER": "summeruniversity_applied",
6175
"MAIL_APPLIED_ORGANISERS": "summeruniversity_organizer_applied",
@@ -120,6 +134,7 @@ def generate_fake_payload(subj="", template=""):
120134
"ideal_su": "I get to suck",
121135
"motivation": "I wanna suck",
122136
"status": "totally snafu",
137+
"email": "[email protected]",
123138
"answers": [
124139
"ho-hoo, ho-hoo",
125140
"42",
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
2+
<!DOCTYPE html>
3+
<html lang="en">
4+
5+
{% import "snippets/macros.jinja2" as macros %}
6+
{{ macros.head("MyAEGEE: Your application for VAR"|replace("VAR",event["name"])) }}
7+
8+
<body style="width:100% !important;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;">
9+
<table cellpadding="0" cellspacing="0" border="0" id="backgroundTable" style="margin:0; padding:0; width:100% !important; line-height: 100% !important; border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;background-color: #F9FAFB;"
10+
width="100%">
11+
<tbody>
12+
<tr>
13+
<td width="10" valign="top">&nbsp;</td>
14+
<td valign="top" align="center">
15+
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width: 100%; max-width: 600px; background-color: #FFF; border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;"
16+
id="contentTable">
17+
<tbody>
18+
<tr>
19+
<td width="600" valign="top" align="center" style="border-collapse:collapse;">
20+
<table align="center" border="0" cellpadding="0" cellspacing="0" style="background: #F9FAFB;" width="100%">
21+
<tbody>
22+
<tr>
23+
<td align="center" valign="top">
24+
<div style="font-family: &quot;lato&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 28px;">&nbsp;</div>
25+
</td>
26+
</tr>
27+
</tbody>
28+
</table>
29+
<table align="center" border="0" cellpadding="0" cellspacing="0" style="border: 1px solid #E0E4E8;"
30+
width="100%">
31+
<tbody>
32+
<tr>
33+
<td align="center" style="padding: 56px 56px 28px 56px;" valign="top">
34+
<a style="color: #3498DB; text-decoration: none;" href="my.aegee.eu"
35+
target="_blank"><img style="width: 56px; height: 56px; border: 0;" alt="AEGEE-Europe"
36+
src="https://my.aegee.eu/images/logo.png">
37+
</a></td>
38+
</tr>
39+
<tr>
40+
<td align="center" style="padding: 0 56px 28px 56px;" valign="top">
41+
<div style="font-family: &quot;lato&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 28px;font-size: 20px; color: #333;"><strong>You've successfully applied to {{ event["name"] }}</strong></div>
42+
</td>
43+
</tr>
44+
<tr>
45+
<td style="padding: 0 56px 28px 56px;" valign="top">
46+
<div style="font-family: &quot;lato&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 28px;font-size: 16px; color: #333;">
47+
Here are your application details:
48+
{% include "snippets/summeruniversity_application_info.jinja2" %}
49+
</div>
50+
</td>
51+
</tr>
52+
</tbody>
53+
</table>
54+
<table align="center" border="0" cellpadding="0" cellspacing="0" style="background: #F9FAFB;" width="100%">
55+
<tbody>
56+
<tr>
57+
<td align="center" style="padding: 28px 56px;" valign="top">
58+
<div style="font-family: &quot;lato&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 28px;font-size: 16px; line-height: 24px; color: #A7ADB5;">This email was autogenerated by MyAEGEE mailer.</div>
59+
</td>
60+
</tr>
61+
</tbody>
62+
</table>
63+
</td>
64+
</tr>
65+
</tbody>
66+
</table>
67+
</td>
68+
</tr>
69+
</tbody>
70+
</table>
71+
72+
73+
74+
</body>
75+
76+
</html>
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
2+
<!DOCTYPE html>
3+
<html lang="en">
4+
5+
{% import "snippets/macros.jinja2" as macros %}
6+
{{ macros.head("MyAEGEE: Your application for VAR"|replace("VAR",event["name"])) }}
7+
8+
<body style="width:100% !important;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;">
9+
<table cellpadding="0" cellspacing="0" border="0" id="backgroundTable" style="margin:0; padding:0; width:100% !important; line-height: 100% !important; border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;background-color: #F9FAFB;"
10+
width="100%">
11+
<tbody>
12+
<tr>
13+
<td width="10" valign="top">&nbsp;</td>
14+
<td valign="top" align="center">
15+
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width: 100%; max-width: 600px; background-color: #FFF; border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;"
16+
id="contentTable">
17+
<tbody>
18+
<tr>
19+
<td width="600" valign="top" align="center" style="border-collapse:collapse;">
20+
<table align="center" border="0" cellpadding="0" cellspacing="0" style="background: #F9FAFB;" width="100%">
21+
<tbody>
22+
<tr>
23+
<td align="center" valign="top">
24+
<div style="font-family: &quot;lato&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 28px;">&nbsp;</div>
25+
</td>
26+
</tr>
27+
</tbody>
28+
</table>
29+
<table align="center" border="0" cellpadding="0" cellspacing="0" style="border: 1px solid #E0E4E8;"
30+
width="100%">
31+
<tbody>
32+
<tr>
33+
<td align="center" style="padding: 56px 56px 28px 56px;" valign="top">
34+
<a style="color: #3498DB; text-decoration: none;" href="my.aegee.eu"
35+
target="_blank"><img style="width: 56px; height: 56px; border: 0;" alt="AEGEE-Europe"
36+
src="https://my.aegee.eu/images/logo.png">
37+
</a></td>
38+
</tr>
39+
<tr>
40+
<td align="center" style="padding: 0 56px 28px 56px;" valign="top">
41+
<div style="font-family: &quot;lato&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 28px;font-size: 20px; color: #333;"><strong>Your application for {{ event["name"] }} was successfully updated.</strong></div>
42+
</td>
43+
</tr>
44+
<tr>
45+
<td style="padding: 0 56px 28px 56px;" valign="top">
46+
<div style="font-family: &quot;lato&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 28px;font-size: 16px; color: #333;">
47+
Here are your application details:
48+
{% include "snippets/events_application_info.jinja2" %}
49+
</div>
50+
</td>
51+
</tr>
52+
</tbody>
53+
</table>
54+
<table align="center" border="0" cellpadding="0" cellspacing="0" style="background: #F9FAFB;" width="100%">
55+
<tbody>
56+
<tr>
57+
<td align="center" style="padding: 28px 56px;" valign="top">
58+
<div style="font-family: &quot;lato&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 28px;font-size: 16px; line-height: 24px; color: #A7ADB5;">This email was autogenerated by MyAEGEE mailer.</div>
59+
</td>
60+
</tr>
61+
</tbody>
62+
</table>
63+
</td>
64+
</tr>
65+
</tbody>
66+
</table>
67+
</td>
68+
</tr>
69+
</tbody>
70+
</table>
71+
72+
73+
74+
</body>
75+
76+
</html>
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
2+
<!DOCTYPE html>
3+
<html lang="en">
4+
5+
{% import "snippets/macros.jinja2" as macros %}
6+
{{ macros.head("MyAEGEE: The event has been created") }}
7+
8+
<body style="width:100% !important;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;">
9+
<table cellpadding="0" cellspacing="0" border="0" id="backgroundTable" style="margin:0; padding:0; width:100% !important; line-height: 100% !important; border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;background-color: #F9FAFB;"
10+
width="100%">
11+
<tbody>
12+
<tr>
13+
<td width="10" valign="top">&nbsp;</td>
14+
<td valign="top" align="center">
15+
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width: 100%; max-width: 600px; background-color: #FFF; border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;"
16+
id="contentTable">
17+
<tbody>
18+
<tr>
19+
<td width="600" valign="top" align="center" style="border-collapse:collapse;">
20+
<table align="center" border="0" cellpadding="0" cellspacing="0" style="background: #F9FAFB;" width="100%">
21+
<tbody>
22+
<tr>
23+
<td align="center" valign="top">
24+
<div style="font-family: &quot;lato&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 28px;">&nbsp;</div>
25+
</td>
26+
</tr>
27+
</tbody>
28+
</table>
29+
<table align="center" border="0" cellpadding="0" cellspacing="0" style="border: 1px solid #E0E4E8;"
30+
width="100%">
31+
<tbody>
32+
<tr>
33+
<td align="center" style="padding: 56px 56px 28px 56px;" valign="top">
34+
<a style="color: #3498DB; text-decoration: none;" href="my.aegee.eu"
35+
target="_blank"><img style="width: 56px; height: 56px; border: 0;" alt="Logo"
36+
src="https://my.aegee.eu/images/logo.png">
37+
</a></td>
38+
</tr>
39+
<tr>
40+
<td align="center" style="padding: 0 56px 28px 56px;" valign="top">
41+
<div style="font-family: &quot;lato&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 28px;font-size: 20px; color: #333;">
42+
<strong>The event "{{ event["name"] }}" has been created.</strong>
43+
</div>
44+
<div style="font-family: &quot;lato&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 28px;font-size: 16px; color: #333;">
45+
You are receiving this as one of the organizers.
46+
</div>
47+
</td>
48+
</tr>
49+
<tr>
50+
<td align="center" style="padding: 0 56px 28px 56px;" valign="top">
51+
<div>
52+
<a href="https://my.aegee.eu/events/{{ event["url"] }}" style="background-color:#1468C5;border-radius:50px;color:#ffffff;display:inline-block;font-family: 'lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:18px;font-weight: bold;line-height:40px;text-align:center;text-decoration:none;width:270px;-webkit-text-size-adjust:none;"
53+
target="_blank">See event</a>
54+
</div>
55+
</td>
56+
</tr>
57+
</tbody>
58+
</table>
59+
<table align="center" border="0" cellpadding="0" cellspacing="0" style="background: #F9FAFB;" width="100%">
60+
<tbody>
61+
<tr>
62+
<td align="center" style="padding: 28px 56px;" valign="top">
63+
<div style="font-family: &quot;lato&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 28px;font-size: 16px; line-height: 24px; color: #A7ADB5;">This email was autogenerated by MyAEGEE mailer.</div>
64+
</td>
65+
</tr>
66+
</tbody>
67+
</table>
68+
</td>
69+
</tr>
70+
</tbody>
71+
</table>
72+
</td>
73+
</tr>
74+
</tbody>
75+
</table>
76+
77+
78+
79+
</body>
80+
81+
</html>
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
2+
<!DOCTYPE html>
3+
<html lang="en">
4+
5+
{% import "snippets/macros.jinja2" as macros %}
6+
{{ macros.head("MyAEGEE: The event has been updated") }}
7+
8+
<body style="width:100% !important;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;margin-top:0;margin-bottom:0;margin-right:0;margin-left:0;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;">
9+
<table cellpadding="0" cellspacing="0" border="0" id="backgroundTable" style="margin:0; padding:0; width:100% !important; line-height: 100% !important; border-collapse:collapse; mso-table-lspace:0pt; mso-table-rspace:0pt;background-color: #F9FAFB;"
10+
width="100%">
11+
<tbody>
12+
<tr>
13+
<td width="10" valign="top">&nbsp;</td>
14+
<td valign="top" align="center">
15+
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width: 100%; max-width: 600px; background-color: #FFF; border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt;"
16+
id="contentTable">
17+
<tbody>
18+
<tr>
19+
<td width="600" valign="top" align="center" style="border-collapse:collapse;">
20+
<table align="center" border="0" cellpadding="0" cellspacing="0" style="background: #F9FAFB;" width="100%">
21+
<tbody>
22+
<tr>
23+
<td align="center" valign="top">
24+
<div style="font-family: &quot;lato&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 28px;">&nbsp;</div>
25+
</td>
26+
</tr>
27+
</tbody>
28+
</table>
29+
<table align="center" border="0" cellpadding="0" cellspacing="0" style="border: 1px solid #E0E4E8;"
30+
width="100%">
31+
<tbody>
32+
<tr>
33+
<td align="center" style="padding: 56px 56px 28px 56px;" valign="top">
34+
<a style="color: #3498DB; text-decoration: none;" href="my.aegee.eu"
35+
target="_blank"><img style="width: 56px; height: 56px; border: 0;" alt="Logo"
36+
src="https://my.aegee.eu/images/logo.png">
37+
</a></td>
38+
</tr>
39+
<tr>
40+
<td align="center" style="padding: 0 56px 28px 56px;" valign="top">
41+
<div style="font-family: &quot;lato&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 28px;font-size: 20px; color: #333;">
42+
<strong>The event "{{ event["name"] }}" has been updated.</strong>
43+
</div>
44+
<div style="font-family: &quot;lato&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 28px;font-size: 16px; color: #333;">
45+
You are receiving this as one of the organizers.
46+
</div>
47+
</td>
48+
</tr>
49+
<tr>
50+
<td align="center" style="padding: 0 56px 28px 56px;" valign="top">
51+
<div>
52+
<a href="https://my.aegee.eu/events/{{ event["url"] }}" style="background-color:#1468C5;border-radius:50px;color:#ffffff;display:inline-block;font-family: 'lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:18px;font-weight: bold;line-height:40px;text-align:center;text-decoration:none;width:270px;-webkit-text-size-adjust:none;"
53+
target="_blank">See event</a>
54+
</div>
55+
</td>
56+
</tr>
57+
</tbody>
58+
</table>
59+
<table align="center" border="0" cellpadding="0" cellspacing="0" style="background: #F9FAFB;" width="100%">
60+
<tbody>
61+
<tr>
62+
<td align="center" style="padding: 28px 56px;" valign="top">
63+
<div style="font-family: &quot;lato&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; line-height: 28px;font-size: 16px; line-height: 24px; color: #A7ADB5;">This email was autogenerated by MyAEGEE mailer.</div>
64+
</td>
65+
</tr>
66+
</tbody>
67+
</table>
68+
</td>
69+
</tr>
70+
</tbody>
71+
</table>
72+
</td>
73+
</tr>
74+
</tbody>
75+
</table>
76+
77+
78+
79+
</body>
80+
81+
</html>

0 commit comments

Comments
 (0)