hackathon_manager 0.7.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/app/assets/javascripts/hackathon_manager/manage/application.js +1 -0
- data/app/assets/javascripts/hackathon_manager/manage/lib/datatables.js +1 -0
- data/app/assets/javascripts/hackathon_manager/manage/lib/debounce.js +19 -0
- data/app/assets/javascripts/hackathon_manager/manage/lib/forms.js +34 -0
- data/app/assets/javascripts/hackathon_manager/manage/lib/messageLivePreview.js +16 -0
- data/app/assets/javascripts/hackathon_manager/manage/lib/setupDataTables.js +10 -12
- data/app/assets/stylesheets/hackathon_manager/dashboard.css +6 -0
- data/app/controllers/manage/application_controller.rb +1 -1
- data/app/controllers/manage/messages_controller.rb +13 -2
- data/app/controllers/manage/questionnaires_controller.rb +0 -4
- data/app/controllers/questionnaires_controller.rb +0 -1
- data/app/controllers/rsvps_controller.rb +0 -5
- data/app/datatables/{message_datatable.rb → bulk_message_datatable.rb} +6 -4
- data/app/datatables/questionnaire_datatable.rb +6 -2
- data/app/mailers/mail_preview.rb +0 -17
- data/app/mailers/mailer.rb +2 -26
- data/app/models/message.rb +25 -1
- data/app/views/application/_triggered_email_summary.html.haml +14 -7
- data/app/views/layouts/manage/application.html.haml +4 -4
- data/app/views/mailer/bulk_templates/_default.html.erb +379 -1
- data/app/views/manage/bus_lists/index.html.haml +2 -2
- data/app/views/manage/configs/show.html.haml +2 -2
- data/app/views/manage/dashboard/map_data.tsv.erb +7 -0
- data/app/views/manage/messages/_form.html.haml +13 -4
- data/app/views/manage/messages/index.html.haml +5 -4
- data/app/views/manage/messages/show.html.haml +24 -24
- data/app/views/manage/questionnaires/_overview.html.haml +12 -2
- data/app/views/manage/questionnaires/index.html.haml +3 -1
- data/config/locales/en.yml +4 -0
- data/config/routes.rb +1 -0
- data/db/migrate/20180801144544_add_type_to_messages.rb +17 -0
- data/{app/views/mailer/accepted_email.html.erb → db/seed_messages/questionnaire--accepted.md} +4 -2
- data/db/seed_messages/questionnaire--denied.md +16 -0
- data/db/seed_messages/questionnaire--pending.md +13 -0
- data/db/seed_messages/questionnaire--rsvp_confirmed.md +9 -0
- data/db/seeds.rb +41 -0
- data/lib/hackathon_manager.rb +2 -2
- data/lib/hackathon_manager/engine.rb +1 -1
- data/lib/hackathon_manager/version.rb +1 -1
- data/test/factories/bus_list.rb +2 -2
- data/test/factories/fips.rb +3 -3
- data/test/factories/message.rb +7 -6
- data/test/factories/questionnaire.rb +18 -18
- data/test/factories/school.rb +4 -4
- data/test/factories/users.rb +5 -5
- metadata +11 -7
- data/app/views/mailer/application_confirmation_email.html.erb +0 -10
- data/app/views/mailer/denied_email.html.erb +0 -11
- data/app/views/mailer/rsvp_confirmation_email.html.erb +0 -5
@@ -1,4 +1,4 @@
|
|
1
|
-
%h3.pb-2#triggered-email-overview
|
1
|
+
%h3.pb-2#triggered-email-overview Automated Messages
|
2
2
|
|
3
3
|
%table.table.table-striped
|
4
4
|
%caption
|
@@ -10,16 +10,13 @@
|
|
10
10
|
%li Hard-coded emails are those managed in the source code repository, and cannot be disabled.
|
11
11
|
%thead
|
12
12
|
%tr
|
13
|
-
%th
|
14
|
-
%th
|
15
|
-
%th Triggered Emails
|
13
|
+
%th Automation Event
|
14
|
+
%th Message(s)
|
16
15
|
%tbody
|
17
16
|
- Message::POSSIBLE_TRIGGERS.keys.each do |trigger|
|
18
17
|
%tr
|
19
18
|
%td= Message::POSSIBLE_TRIGGERS[trigger]
|
20
|
-
- messages = Message.where(trigger: trigger).all
|
21
|
-
%td
|
22
|
-
= ['questionnaire.pending', 'questionnaire.accepted', 'questionnaire.denied', 'questionnaire.rsvp_confirmed'].include?(trigger) ? '<strong class="text-success">Yes</strong>'.html_safe : 'No'
|
19
|
+
- messages = Message.automated.where(trigger: trigger).all
|
23
20
|
%td
|
24
21
|
- if messages.present?
|
25
22
|
%ul.list-unstyled.mb-0
|
@@ -27,3 +24,13 @@
|
|
27
24
|
%li= link_to(message.name, manage_message_path(message))
|
28
25
|
- else
|
29
26
|
None
|
27
|
+
%tr
|
28
|
+
%td Disabled
|
29
|
+
%td
|
30
|
+
- messages = Message.automated.where(trigger: nil).all
|
31
|
+
- if messages.present?
|
32
|
+
%ul.list-unstyled.mb-0
|
33
|
+
- messages.each do |message|
|
34
|
+
%li= link_to(message.name, manage_message_path(message))
|
35
|
+
- else
|
36
|
+
None
|
@@ -13,9 +13,9 @@
|
|
13
13
|
%body
|
14
14
|
= javascript_include_tag "hackathon_manager/manage/application"
|
15
15
|
|
16
|
-
%nav.navbar.navbar-dark.fixed-top.bg-dark.flex-
|
17
|
-
%a.navbar-brand.col-sm-3.col-md-2.mr-0{href:
|
18
|
-
%input.form-control.form-control-dark.w-100{"aria-label" => "Search", placeholder: "Search", type: "text"}/
|
16
|
+
%nav.navbar.navbar-dark.fixed-top.bg-dark.flex-nowrap.p-0.shadow
|
17
|
+
%a.navbar-brand.col-xs-6.col-sm-3.col-md-2.mr-0{href: manage_root_path} #{Rails.configuration.hackathon['name']} Manager
|
18
|
+
/ %input.form-control.form-control-dark.w-100{"aria-label" => "Search", placeholder: "Search", type: "text"}/
|
19
19
|
%ul.navbar-nav.px-3
|
20
20
|
%li.nav-item.text-nowrap
|
21
21
|
= link_to "Sign out", destroy_user_session_path, method: :delete, class: "nav-link"
|
@@ -74,7 +74,7 @@
|
|
74
74
|
Blazer
|
75
75
|
%span.fa.fa-external-link.icon-space-l-half
|
76
76
|
.nav-item-description Run custom SQL queries
|
77
|
-
%main.col-md-
|
77
|
+
%main.col-md-10.ml-sm-auto.px-4{role: "main"}
|
78
78
|
= render "layouts/manage/flashes"
|
79
79
|
= yield
|
80
80
|
|
@@ -1 +1,379 @@
|
|
1
|
-
|
1
|
+
<!--
|
2
|
+
From "Really Simple Free Responsive HTML Email Template",
|
3
|
+
https://github.com/leemunroe/responsive-html-email-template
|
4
|
+
-->
|
5
|
+
<!doctype html>
|
6
|
+
<html>
|
7
|
+
<head>
|
8
|
+
<meta name="viewport" content="width=device-width" />
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
10
|
+
<title>Simple Transactional Email</title>
|
11
|
+
<style>
|
12
|
+
/* -------------------------------------
|
13
|
+
GLOBAL RESETS
|
14
|
+
------------------------------------- */
|
15
|
+
img {
|
16
|
+
border: none;
|
17
|
+
-ms-interpolation-mode: bicubic;
|
18
|
+
max-width: 100%;
|
19
|
+
}
|
20
|
+
|
21
|
+
body {
|
22
|
+
background-color: #f6f6f6;
|
23
|
+
font-family: sans-serif;
|
24
|
+
-webkit-font-smoothing: antialiased;
|
25
|
+
font-size: 14px;
|
26
|
+
line-height: 1.4;
|
27
|
+
margin: 0;
|
28
|
+
padding: 0;
|
29
|
+
-ms-text-size-adjust: 100%;
|
30
|
+
-webkit-text-size-adjust: 100%;
|
31
|
+
}
|
32
|
+
|
33
|
+
table {
|
34
|
+
border-collapse: separate;
|
35
|
+
mso-table-lspace: 0pt;
|
36
|
+
mso-table-rspace: 0pt;
|
37
|
+
width: 100%; }
|
38
|
+
table td {
|
39
|
+
font-family: sans-serif;
|
40
|
+
font-size: 14px;
|
41
|
+
vertical-align: top;
|
42
|
+
}
|
43
|
+
|
44
|
+
/* -------------------------------------
|
45
|
+
BODY & CONTAINER
|
46
|
+
------------------------------------- */
|
47
|
+
|
48
|
+
.body {
|
49
|
+
background-color: #f6f6f6;
|
50
|
+
width: 100%;
|
51
|
+
}
|
52
|
+
|
53
|
+
/* Set a max-width, and make it display as block so it will automatically stretch to that width, but will also shrink down on a phone or something */
|
54
|
+
.container {
|
55
|
+
display: block;
|
56
|
+
Margin: 0 auto !important;
|
57
|
+
/* makes it centered */
|
58
|
+
max-width: 580px;
|
59
|
+
padding: 10px;
|
60
|
+
width: 580px;
|
61
|
+
}
|
62
|
+
|
63
|
+
/* This should also be a block element, so that it will fill 100% of the .container */
|
64
|
+
.content {
|
65
|
+
box-sizing: border-box;
|
66
|
+
display: block;
|
67
|
+
Margin: 0 auto;
|
68
|
+
max-width: 580px;
|
69
|
+
padding: 10px;
|
70
|
+
}
|
71
|
+
|
72
|
+
/* -------------------------------------
|
73
|
+
HEADER, FOOTER, MAIN
|
74
|
+
------------------------------------- */
|
75
|
+
.main {
|
76
|
+
background: #ffffff;
|
77
|
+
border-radius: 3px;
|
78
|
+
width: 100%;
|
79
|
+
}
|
80
|
+
|
81
|
+
.wrapper {
|
82
|
+
box-sizing: border-box;
|
83
|
+
padding: 20px;
|
84
|
+
}
|
85
|
+
|
86
|
+
.content-block {
|
87
|
+
padding-bottom: 10px;
|
88
|
+
padding-top: 10px;
|
89
|
+
}
|
90
|
+
|
91
|
+
.footer {
|
92
|
+
clear: both;
|
93
|
+
Margin-top: 10px;
|
94
|
+
text-align: center;
|
95
|
+
width: 100%;
|
96
|
+
}
|
97
|
+
.footer td,
|
98
|
+
.footer p,
|
99
|
+
.footer span,
|
100
|
+
.footer a {
|
101
|
+
color: #999999;
|
102
|
+
font-size: 12px;
|
103
|
+
text-align: center;
|
104
|
+
}
|
105
|
+
|
106
|
+
/* -------------------------------------
|
107
|
+
TYPOGRAPHY
|
108
|
+
------------------------------------- */
|
109
|
+
h1,
|
110
|
+
h2,
|
111
|
+
h3,
|
112
|
+
h4 {
|
113
|
+
color: #000000;
|
114
|
+
font-family: sans-serif;
|
115
|
+
font-weight: 400;
|
116
|
+
line-height: 1.4;
|
117
|
+
margin: 0;
|
118
|
+
margin-bottom: 30px;
|
119
|
+
}
|
120
|
+
|
121
|
+
h1 {
|
122
|
+
font-size: 35px;
|
123
|
+
font-weight: 300;
|
124
|
+
text-align: center;
|
125
|
+
text-transform: capitalize;
|
126
|
+
}
|
127
|
+
|
128
|
+
p,
|
129
|
+
ul,
|
130
|
+
ol {
|
131
|
+
font-family: sans-serif;
|
132
|
+
font-size: 14px;
|
133
|
+
font-weight: normal;
|
134
|
+
margin: 0;
|
135
|
+
margin-bottom: 15px;
|
136
|
+
}
|
137
|
+
p li,
|
138
|
+
ul li,
|
139
|
+
ol li {
|
140
|
+
list-style-position: inside;
|
141
|
+
margin-left: 5px;
|
142
|
+
}
|
143
|
+
|
144
|
+
a {
|
145
|
+
color: #3498db;
|
146
|
+
text-decoration: underline;
|
147
|
+
}
|
148
|
+
|
149
|
+
/* -------------------------------------
|
150
|
+
BUTTONS
|
151
|
+
------------------------------------- */
|
152
|
+
.btn {
|
153
|
+
box-sizing: border-box;
|
154
|
+
width: 100%; }
|
155
|
+
.btn > tbody > tr > td {
|
156
|
+
padding-bottom: 15px; }
|
157
|
+
.btn table {
|
158
|
+
width: auto;
|
159
|
+
}
|
160
|
+
.btn table td {
|
161
|
+
background-color: #ffffff;
|
162
|
+
border-radius: 5px;
|
163
|
+
text-align: center;
|
164
|
+
}
|
165
|
+
.btn a {
|
166
|
+
background-color: #ffffff;
|
167
|
+
border: solid 1px #3498db;
|
168
|
+
border-radius: 5px;
|
169
|
+
box-sizing: border-box;
|
170
|
+
color: #3498db;
|
171
|
+
cursor: pointer;
|
172
|
+
display: inline-block;
|
173
|
+
font-size: 14px;
|
174
|
+
font-weight: bold;
|
175
|
+
margin: 0;
|
176
|
+
padding: 12px 25px;
|
177
|
+
text-decoration: none;
|
178
|
+
text-transform: capitalize;
|
179
|
+
}
|
180
|
+
|
181
|
+
.btn-primary table td {
|
182
|
+
background-color: #3498db;
|
183
|
+
}
|
184
|
+
|
185
|
+
.btn-primary a {
|
186
|
+
background-color: #3498db;
|
187
|
+
border-color: #3498db;
|
188
|
+
color: #ffffff;
|
189
|
+
}
|
190
|
+
|
191
|
+
/* -------------------------------------
|
192
|
+
OTHER STYLES THAT MIGHT BE USEFUL
|
193
|
+
------------------------------------- */
|
194
|
+
.last {
|
195
|
+
margin-bottom: 0;
|
196
|
+
}
|
197
|
+
|
198
|
+
.first {
|
199
|
+
margin-top: 0;
|
200
|
+
}
|
201
|
+
|
202
|
+
.align-center {
|
203
|
+
text-align: center;
|
204
|
+
}
|
205
|
+
|
206
|
+
.align-right {
|
207
|
+
text-align: right;
|
208
|
+
}
|
209
|
+
|
210
|
+
.align-left {
|
211
|
+
text-align: left;
|
212
|
+
}
|
213
|
+
|
214
|
+
.clear {
|
215
|
+
clear: both;
|
216
|
+
}
|
217
|
+
|
218
|
+
.mt0 {
|
219
|
+
margin-top: 0;
|
220
|
+
}
|
221
|
+
|
222
|
+
.mb0 {
|
223
|
+
margin-bottom: 0;
|
224
|
+
}
|
225
|
+
|
226
|
+
.preheader {
|
227
|
+
color: transparent;
|
228
|
+
display: none;
|
229
|
+
height: 0;
|
230
|
+
max-height: 0;
|
231
|
+
max-width: 0;
|
232
|
+
opacity: 0;
|
233
|
+
overflow: hidden;
|
234
|
+
mso-hide: all;
|
235
|
+
visibility: hidden;
|
236
|
+
width: 0;
|
237
|
+
}
|
238
|
+
|
239
|
+
.powered-by a {
|
240
|
+
text-decoration: none;
|
241
|
+
}
|
242
|
+
|
243
|
+
hr {
|
244
|
+
border: 0;
|
245
|
+
border-bottom: 1px solid #f6f6f6;
|
246
|
+
Margin: 20px 0;
|
247
|
+
}
|
248
|
+
|
249
|
+
/* -------------------------------------
|
250
|
+
RESPONSIVE AND MOBILE FRIENDLY STYLES
|
251
|
+
------------------------------------- */
|
252
|
+
@media only screen and (max-width: 620px) {
|
253
|
+
table[class=body] h1 {
|
254
|
+
font-size: 28px !important;
|
255
|
+
margin-bottom: 10px !important;
|
256
|
+
}
|
257
|
+
table[class=body] p,
|
258
|
+
table[class=body] ul,
|
259
|
+
table[class=body] ol,
|
260
|
+
table[class=body] td,
|
261
|
+
table[class=body] span,
|
262
|
+
table[class=body] a {
|
263
|
+
font-size: 16px !important;
|
264
|
+
}
|
265
|
+
table[class=body] .wrapper,
|
266
|
+
table[class=body] .article {
|
267
|
+
padding: 10px !important;
|
268
|
+
}
|
269
|
+
table[class=body] .content {
|
270
|
+
padding: 0 !important;
|
271
|
+
}
|
272
|
+
table[class=body] .container {
|
273
|
+
padding: 0 !important;
|
274
|
+
width: 100% !important;
|
275
|
+
}
|
276
|
+
table[class=body] .main {
|
277
|
+
border-left-width: 0 !important;
|
278
|
+
border-radius: 0 !important;
|
279
|
+
border-right-width: 0 !important;
|
280
|
+
}
|
281
|
+
table[class=body] .btn table {
|
282
|
+
width: 100% !important;
|
283
|
+
}
|
284
|
+
table[class=body] .btn a {
|
285
|
+
width: 100% !important;
|
286
|
+
}
|
287
|
+
table[class=body] .img-responsive {
|
288
|
+
height: auto !important;
|
289
|
+
max-width: 100% !important;
|
290
|
+
width: auto !important;
|
291
|
+
}
|
292
|
+
}
|
293
|
+
|
294
|
+
/* -------------------------------------
|
295
|
+
PRESERVE THESE STYLES IN THE HEAD
|
296
|
+
------------------------------------- */
|
297
|
+
@media all {
|
298
|
+
.ExternalClass {
|
299
|
+
width: 100%;
|
300
|
+
}
|
301
|
+
.ExternalClass,
|
302
|
+
.ExternalClass p,
|
303
|
+
.ExternalClass span,
|
304
|
+
.ExternalClass font,
|
305
|
+
.ExternalClass td,
|
306
|
+
.ExternalClass div {
|
307
|
+
line-height: 100%;
|
308
|
+
}
|
309
|
+
.apple-link a {
|
310
|
+
color: inherit !important;
|
311
|
+
font-family: inherit !important;
|
312
|
+
font-size: inherit !important;
|
313
|
+
font-weight: inherit !important;
|
314
|
+
line-height: inherit !important;
|
315
|
+
text-decoration: none !important;
|
316
|
+
}
|
317
|
+
.btn-primary table td:hover {
|
318
|
+
background-color: #34495e !important;
|
319
|
+
}
|
320
|
+
.btn-primary a:hover {
|
321
|
+
background-color: #34495e !important;
|
322
|
+
border-color: #34495e !important;
|
323
|
+
}
|
324
|
+
}
|
325
|
+
|
326
|
+
</style>
|
327
|
+
</head>
|
328
|
+
<body class="">
|
329
|
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0" class="body">
|
330
|
+
<tr>
|
331
|
+
<td> </td>
|
332
|
+
<td class="container">
|
333
|
+
<div class="content">
|
334
|
+
|
335
|
+
<!-- START CENTERED WHITE CONTAINER -->
|
336
|
+
<span class="preheader">This is preheader text. Some clients will show this text as a preview.</span>
|
337
|
+
<table role="presentation" class="main">
|
338
|
+
|
339
|
+
<!-- START MAIN CONTENT AREA -->
|
340
|
+
<tr>
|
341
|
+
<td class="wrapper">
|
342
|
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
343
|
+
<tr>
|
344
|
+
<td>
|
345
|
+
<%= markdown(@message.body) %>
|
346
|
+
</td>
|
347
|
+
</tr>
|
348
|
+
</table>
|
349
|
+
</td>
|
350
|
+
</tr>
|
351
|
+
|
352
|
+
<!-- END MAIN CONTENT AREA -->
|
353
|
+
</table>
|
354
|
+
|
355
|
+
<!-- START FOOTER -->
|
356
|
+
<div class="footer">
|
357
|
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
358
|
+
<tr>
|
359
|
+
<td class="content-block">
|
360
|
+
You received this email because you applied to <%= Rails.configuration.hackathon['name'] %>. <%= link_to 'Manage account', questionnaires_url %>.
|
361
|
+
</td>
|
362
|
+
</tr>
|
363
|
+
<tr>
|
364
|
+
<td class="content-block powered-by">
|
365
|
+
Powered by <a href="https://github.com/codeRIT/hackathon_manager">hackathon_manager</a>
|
366
|
+
</td>
|
367
|
+
</tr>
|
368
|
+
</table>
|
369
|
+
</div>
|
370
|
+
<!-- END FOOTER -->
|
371
|
+
|
372
|
+
<!-- END CENTERED WHITE CONTAINER -->
|
373
|
+
</div>
|
374
|
+
</td>
|
375
|
+
<td> </td>
|
376
|
+
</tr>
|
377
|
+
</table>
|
378
|
+
</body>
|
379
|
+
</html>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
%tr
|
8
8
|
%th Name
|
9
9
|
%th Capacity
|
10
|
-
%th Needs
|
10
|
+
%th Needs bus captain?
|
11
11
|
%th Schools
|
12
12
|
|
13
13
|
%tbody
|
@@ -15,5 +15,5 @@
|
|
15
15
|
%tr
|
16
16
|
%td= link_to(bus_list.name, manage_bus_list_path(bus_list))
|
17
17
|
%td #{bus_list.passengers.count} / #{bus_list.capacity}
|
18
|
-
%td= bus_list.needs_bus_captain ? "<strong class=\"text-danger\">
|
18
|
+
%td= bus_list.needs_bus_captain ? "<strong class=\"text-danger\">Needs bus captain</strong>".html_safe : "No"
|
19
19
|
%td= bus_list.schools.count
|