hackathon_manager 0.6.6 → 0.7.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 +5 -5
- data/README.md +7 -1
- data/app/assets/javascripts/hackathon_manager/manage/application.js +4 -6
- data/app/assets/javascripts/hackathon_manager/manage/lib/datatables.js +82 -0
- data/app/assets/javascripts/hackathon_manager/manage/lib/setupDataTables.js +13 -64
- data/app/assets/javascripts/hackathon_manager/vendor/datatables.min.js +290 -0
- data/app/assets/stylesheets/hackathon_manager/dashboard.css +109 -0
- data/app/assets/stylesheets/hackathon_manager/datatables.min.css +18 -0
- data/app/assets/stylesheets/hackathon_manager/manage.sass +64 -47
- data/app/controllers/manage/stats_controller.rb +66 -30
- data/app/controllers/rsvps_controller.rb +2 -0
- data/app/datatables/admin_datatable.rb +3 -3
- data/app/datatables/message_datatable.rb +5 -5
- data/app/datatables/questionnaire_datatable.rb +6 -5
- data/app/datatables/school_datatable.rb +3 -3
- data/app/helpers/hackathon_manager_helper.rb +63 -4
- data/app/helpers/manage/bootstrap_form_helper.rb +98 -0
- data/app/models/bus_list.rb +1 -1
- data/app/models/message.rb +3 -3
- data/app/models/questionnaire.rb +1 -1
- data/app/models/school.rb +10 -4
- data/app/models/user.rb +3 -1
- data/app/views/application/_triggered_email_summary.html.haml +11 -9
- data/app/views/layouts/hackathon_manager/application.html.haml +4 -0
- data/app/views/layouts/manage/_flashes.html.haml +4 -0
- data/app/views/layouts/manage/_page_title.html.haml +8 -0
- data/app/views/layouts/manage/application.html.haml +72 -19
- data/app/views/manage/admins/_form.html.haml +4 -5
- data/app/views/manage/admins/edit.html.haml +5 -10
- data/app/views/manage/admins/index.html.haml +4 -8
- data/app/views/manage/admins/new.html.haml +5 -6
- data/app/views/manage/admins/show.html.haml +12 -14
- data/app/views/manage/bus_lists/_form.html.haml +3 -6
- data/app/views/manage/bus_lists/edit.html.haml +3 -7
- data/app/views/manage/bus_lists/index.html.haml +16 -23
- data/app/views/manage/bus_lists/new.html.haml +2 -5
- data/app/views/manage/bus_lists/show.html.haml +78 -66
- data/app/views/manage/configs/show.html.haml +31 -27
- data/app/views/manage/dashboard/index.html.haml +28 -19
- data/app/views/manage/dashboard/map_data.tsv.erb +6 -13
- data/app/views/manage/messages/_form.html.haml +3 -3
- data/app/views/manage/messages/edit.html.haml +3 -10
- data/app/views/manage/messages/index.html.haml +5 -10
- data/app/views/manage/messages/new.html.haml +2 -7
- data/app/views/manage/messages/show.html.haml +65 -67
- data/app/views/manage/questionnaires/_acc_status_badge.html.haml +2 -0
- data/app/views/manage/questionnaires/_check_in_badge.html.haml +4 -0
- data/app/views/manage/questionnaires/_checkin.html.haml +40 -0
- data/app/views/manage/questionnaires/_form.html.haml +21 -21
- data/app/views/manage/questionnaires/_history.html.haml +7 -0
- data/app/views/manage/questionnaires/_overview.html.haml +126 -0
- data/app/views/manage/questionnaires/edit.html.haml +5 -11
- data/app/views/manage/questionnaires/index.html.haml +19 -23
- data/app/views/manage/questionnaires/new.html.haml +2 -7
- data/app/views/manage/questionnaires/show.html.haml +28 -65
- data/app/views/manage/schools/_form.html.haml +2 -2
- data/app/views/manage/schools/edit.html.haml +5 -11
- data/app/views/manage/schools/index.html.haml +4 -8
- data/app/views/manage/schools/merge.html.haml +6 -8
- data/app/views/manage/schools/new.html.haml +2 -7
- data/app/views/manage/schools/show.html.haml +58 -55
- data/app/views/manage/stats/index.html.haml +18 -15
- data/app/views/questionnaires/_form.html.haml +2 -2
- data/config/initializers/simple_form.rb +4 -0
- data/config/initializers/simple_form_bootstrap.rb +412 -0
- data/config/locales/en.yml +73 -0
- data/db/migrate/20180701160855_remove_email_from_questionnaires.rb +5 -0
- data/lib/hackathon_manager/version.rb +1 -1
- metadata +39 -31
- data/app/assets/javascripts/hackathon_manager/vendor/buttons.colVis.min.js +0 -6
- data/app/assets/javascripts/hackathon_manager/vendor/buttons.html5.min.js +0 -22
- data/app/assets/javascripts/hackathon_manager/vendor/dataTables.buttons.min.js +0 -35
- data/app/assets/javascripts/hackathon_manager/vendor/jquery.dataTables.min.js +0 -164
- data/app/assets/javascripts/hackathon_manager/vendor/pdfmake.min.js +0 -22
- data/app/assets/stylesheets/hackathon_manager/datatables/buttons.dataTables.min.css +0 -1
- data/app/assets/stylesheets/hackathon_manager/datatables/jquery.dataTables.min.css +0 -1
|
@@ -4,34 +4,27 @@
|
|
|
4
4
|
counties = {}
|
|
5
5
|
amount = 1
|
|
6
6
|
@schools.each do |school|
|
|
7
|
-
|
|
8
|
-
require 'net/http'
|
|
9
|
-
|
|
10
7
|
if school.fips_code.blank?
|
|
11
|
-
|
|
12
8
|
next if school.city.blank? || school.state.blank?
|
|
13
9
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
results = JSON.parse(resp.body)["results"][0]
|
|
17
|
-
|
|
10
|
+
resp = HTTParty.get("https://maps.googleapis.com/maps/api/geocode/json?address=#{CGI.escape(school.city)}+#{CGI.escape(school.state)}&sensor=true")
|
|
11
|
+
results = resp.parsed_response["results"][0]
|
|
18
12
|
if results.blank?
|
|
19
13
|
redo
|
|
20
14
|
end
|
|
21
15
|
|
|
22
16
|
lat = results["geometry"]["location"]["lat"]
|
|
23
17
|
lng = results["geometry"]["location"]["lng"]
|
|
24
|
-
|
|
25
18
|
next if lat.blank? || lng.blank?
|
|
26
19
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
20
|
+
resp = HTTParty.get("https://geo.fcc.gov/api/census/area?lat=#{lat}&lon=#{lng}&format=json")
|
|
21
|
+
results = resp.parsed_response["results"]
|
|
22
|
+
next if results.blank?
|
|
30
23
|
|
|
24
|
+
fips = results[0]["county_fips"]
|
|
31
25
|
next if fips.blank?
|
|
32
26
|
|
|
33
27
|
Fips.create(fips_code: fips, city: school.city, state: school.state)
|
|
34
|
-
|
|
35
28
|
else
|
|
36
29
|
fips = school.fips_code.fips_code
|
|
37
30
|
end
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
.form-container
|
|
2
|
-
=
|
|
2
|
+
= bs_horizontal_simple_form_for @message, url: url_for(action: @message.new_record? ? "create" : "update", controller: "messages") do |f|
|
|
3
3
|
= f.error_notification
|
|
4
4
|
|
|
5
5
|
.form-inputs
|
|
6
6
|
= f.input :name
|
|
7
|
-
= f.input :subject, hint: "All emails are from <pre>#{html_escape(Rails.configuration.hackathon['email_from'])}</pre>".html_safe
|
|
7
|
+
= f.input :subject, hint: "All emails are from <pre class=\"d-inline\">#{html_escape(Rails.configuration.hackathon['email_from'])}</pre>".html_safe
|
|
8
8
|
= f.input :template, as: :select, collection: Message::POSSIBLE_TEMPLATES.map { |x| [x.titleize, x] }, include_blank: false
|
|
9
9
|
- if @message.status == "drafted"
|
|
10
10
|
= f.input :recipients, as: :select, collection: @message.possible_recipients, input_html: { class: "selectize", multiple: true, }, hint: "Sent manually, in bulk", placeholder: "Type to search by school or type..."
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
= f.input :body, input_html: { rows: 10 }, hint: "Supports markdown and HTML"
|
|
15
15
|
|
|
16
16
|
.form-actions
|
|
17
|
-
= f.button :submit
|
|
17
|
+
= f.button :submit, class: 'btn-primary'
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
%h1.section-title= title "Editing Message"
|
|
1
|
+
= render "layouts/manage/page_title", title: "Edit Message", subtitle: @message.name do
|
|
2
|
+
= link_to 'Cancel', manage_message_path(@message), class: 'btn btn-sm btn-outline-secondary'
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
.form-container
|
|
8
|
-
.center
|
|
9
|
-
= link_to 'Show', manage_message_path(@message)
|
|
10
|
-
\|
|
|
11
|
-
= link_to 'Back', manage_messages_path
|
|
4
|
+
= render 'form'
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
= render "layouts/manage/page_title", title: "Messages" do
|
|
2
|
+
= link_to "New Message", new_manage_message_path, class: "btn btn-sm btn-outline-secondary"
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
%div
|
|
5
|
+
%table.messages.datatable.table.table-striped.table-hover{ "data-source" => datatable_manage_messages_path(format: :json) }
|
|
5
6
|
%thead
|
|
6
7
|
%tr
|
|
7
|
-
%th
|
|
8
8
|
%th ID
|
|
9
9
|
%th Name
|
|
10
10
|
%th Subject
|
|
@@ -13,11 +13,6 @@
|
|
|
13
13
|
%th Bulk Delivered
|
|
14
14
|
%tbody
|
|
15
15
|
|
|
16
|
-
%
|
|
17
|
-
|
|
18
|
-
- unless current_user.admin_limited_access
|
|
19
|
-
%p= btn_link_to 'New Message', new_manage_message_path
|
|
20
|
-
|
|
21
|
-
%br
|
|
16
|
+
%hr
|
|
22
17
|
|
|
23
18
|
= render 'triggered_email_summary'
|
|
@@ -1,82 +1,80 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
:ruby
|
|
2
|
+
begin
|
|
3
|
+
recipient_count = pluralize(BulkMessageWorker.build_recipients(@message.recipients).count, "recipient")
|
|
4
|
+
rescue => recipient_error
|
|
5
|
+
end
|
|
3
6
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
= render "layouts/manage/page_title", title: @message.name, subtitle: "Message" do
|
|
8
|
+
.btn-group
|
|
9
|
+
- if @message.can_queue?
|
|
10
|
+
- if recipient_error.present?
|
|
11
|
+
%button.btn.btn-sm.btn-outline-secondary{disabled: 'disabled', title: 'Cannot deliver when there is a recipient error; see error above.'} Deliver
|
|
12
|
+
- else
|
|
13
|
+
= link_to deliver_manage_message_path(@message), method: :patch, data: { confirm: "Are you sure? The message \"#{@message.name}\" will be sent to #{recipient_count}." }, class: 'btn btn-sm btn-primary' do
|
|
14
|
+
%span.fa.fa-send.icon-space-r-half
|
|
15
|
+
Send
|
|
16
|
+
- if @message.can_edit?
|
|
17
|
+
= link_to 'Edit', edit_manage_message_path(@message), class: 'btn btn-sm btn-outline-secondary'
|
|
18
|
+
= link_to 'Delete', manage_message_path(@message), method: :delete, data: { confirm: "Are you sure? The message \"#{@message.name}\" will be permanently erased. This action is irreversible." }, class: 'btn btn-sm btn-outline-secondary'
|
|
19
|
+
= link_to 'Duplicate', duplicate_manage_message_path(@message), method: :patch, class: 'btn btn-sm btn-outline-secondary'
|
|
9
20
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
%
|
|
21
|
-
|
|
22
|
-
%br
|
|
23
|
-
%small
|
|
24
|
-
%em Sent manually, in bulk
|
|
25
|
-
- if @message.recipients.present?
|
|
26
|
-
%br
|
|
21
|
+
.row
|
|
22
|
+
.col-lg-6
|
|
23
|
+
%dl.row
|
|
24
|
+
%dt.col-md-3 Name
|
|
25
|
+
%dd.col-md-9= @message.name
|
|
26
|
+
%dt.col-md-3 Subject
|
|
27
|
+
%dd.col-md-9= @message.subject
|
|
28
|
+
%dt.col-md-3 Template
|
|
29
|
+
%dd.col-md-9= @message.template.titleize
|
|
30
|
+
.col-lg-6
|
|
31
|
+
%p.mb-1
|
|
32
|
+
%b Recipients
|
|
27
33
|
%small
|
|
34
|
+
%em Sent manually, in bulk
|
|
35
|
+
%ul.pl-4.mb-1
|
|
36
|
+
- @message.recipients_list.each do |recipient|
|
|
37
|
+
%li= recipient
|
|
38
|
+
- if @message.recipients.blank?
|
|
39
|
+
%p.text-muted (none)
|
|
40
|
+
- if @message.recipients.present?
|
|
41
|
+
%p.small
|
|
28
42
|
- if recipient_error.present?
|
|
29
43
|
%strong{style: 'color: red;'} Error parsing recipients:
|
|
30
44
|
= recipient_error
|
|
31
45
|
%br To resolve this, edit & remove the offending recipient.
|
|
32
46
|
- else
|
|
33
47
|
%em #{recipient_count} currently match this query
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
%
|
|
39
|
-
|
|
48
|
+
%p.mb-1
|
|
49
|
+
%b Trigger
|
|
50
|
+
%small
|
|
51
|
+
%em Sent automatically, to an applicant once they match this criteria
|
|
52
|
+
%p
|
|
53
|
+
= Message::POSSIBLE_TRIGGERS[@message.trigger] || "<span class=\"text-muted\">(no automatic trigger)</span>".html_safe
|
|
54
|
+
|
|
55
|
+
%div
|
|
40
56
|
%p
|
|
41
57
|
%b Preview:
|
|
42
|
-
= link_to
|
|
58
|
+
= link_to preview_manage_message_path, target: '_blank' do
|
|
59
|
+
Open full preview
|
|
60
|
+
%span.fa.fa-external-link.icon-space-l-half
|
|
43
61
|
|
|
44
62
|
%iframe.email-preview{src: preview_manage_message_path(@message)}
|
|
45
63
|
|
|
46
64
|
- if @message.recipients_list.present?
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
%
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
%
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
%
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
%
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
%hr
|
|
64
|
-
|
|
65
|
-
- unless current_user.admin_limited_access
|
|
66
|
-
- if @message.can_queue?
|
|
67
|
-
- if recipient_error.present?
|
|
68
|
-
%button.button{disabled: 'disabled'} Deliver
|
|
69
|
-
%small Cannot deliver when there is a recipient error; see error above.
|
|
70
|
-
%br
|
|
71
|
-
%br
|
|
72
|
-
- else
|
|
73
|
-
= btn_link_to 'Deliver', deliver_manage_message_path(@message), method: :patch, data: { confirm: "Are you sure? The message \"#{@message.name}\" will be sent to #{recipient_count}." }
|
|
74
|
-
\|
|
|
75
|
-
- if @message.can_edit?
|
|
76
|
-
= link_to 'Edit', edit_manage_message_path(@message)
|
|
77
|
-
\|
|
|
78
|
-
= link_to 'Delete', manage_message_path(@message), method: :delete, data: { confirm: "Are you sure? The message \"#{@message.name}\" will be permanently erased. This action is irreversible." }
|
|
79
|
-
\|
|
|
80
|
-
= link_to 'Duplicate', duplicate_manage_message_path(@message), method: :patch
|
|
81
|
-
\|
|
|
82
|
-
= link_to 'Back', manage_messages_path
|
|
65
|
+
.card.mt-3.mb-3
|
|
66
|
+
.card-body
|
|
67
|
+
%h5.card-title Bulk delivery details
|
|
68
|
+
%p.card-text
|
|
69
|
+
%b
|
|
70
|
+
Status:
|
|
71
|
+
= @message.status.titleize
|
|
72
|
+
%p.card-text
|
|
73
|
+
%b Queued At:
|
|
74
|
+
= @message.queued_at || "(n/a)"
|
|
75
|
+
%p.card-text
|
|
76
|
+
%b Started At:
|
|
77
|
+
= @message.started_at || "(n/a)"
|
|
78
|
+
%p.card-text
|
|
79
|
+
%b Delivered At:
|
|
80
|
+
= @message.delivered_at || "(n/a)"
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
.row
|
|
2
|
+
.col-md-6
|
|
3
|
+
.card.mb-3
|
|
4
|
+
.card-body
|
|
5
|
+
%h5.card-title.mb-1 Acceptance
|
|
6
|
+
%p.card-text
|
|
7
|
+
= render 'acc_status_badge'
|
|
8
|
+
%small
|
|
9
|
+
= @questionnaire.acc_status_author_id ? @questionnaire.acc_status_author.email : "(no author)"
|
|
10
|
+
= @questionnaire.acc_status_date ? display_datetime(@questionnaire.acc_status_date, in_sentence: true) : "(no date)"
|
|
11
|
+
- unless current_user.admin_limited_access?
|
|
12
|
+
= bs_vertical_simple_form @questionnaire, url: url_for(action: "update_acc_status", controller: "questionnaires") do |f|
|
|
13
|
+
= f.input :acc_status, as: :select, collection: Questionnaire::POSSIBLE_ACC_STATUS.invert, include_blank: false, label: "Acceptance Status:", hint: "Updating this status may trigger an automatic email to the applicant - see #{link_to('messages', manage_messages_path(anchor: 'triggered-email-overview'))} for details.".html_safe
|
|
14
|
+
= f.button :submit, value: "Update Status", class: 'btn-primary'
|
|
15
|
+
.col-md-6
|
|
16
|
+
.card.mb-3
|
|
17
|
+
.card-body
|
|
18
|
+
%h5.card-title.mb-1 Check-in
|
|
19
|
+
%p.card-text
|
|
20
|
+
= render 'check_in_badge'
|
|
21
|
+
- if @questionnaire.checked_in_at
|
|
22
|
+
%small
|
|
23
|
+
= @questionnaire.checked_in_by_id ? @questionnaire.checked_in_by.email : "(never checked in)"
|
|
24
|
+
= @questionnaire.checked_in_at ? display_datetime(@questionnaire.checked_in_at, in_sentence: true) : "(not checked in)"
|
|
25
|
+
%p
|
|
26
|
+
Please confirm their phone number and email address before checking in.
|
|
27
|
+
- if !@questionnaire.can_rsvp?
|
|
28
|
+
%br
|
|
29
|
+
%span.text-danger
|
|
30
|
+
Note: This applicant has not been accepted.
|
|
31
|
+
= bs_horizontal_simple_form_for @questionnaire, url: url_for(action: "check_in", controller: "questionnaires", method: :put), html: { "data-validate" => "form" } do |f|
|
|
32
|
+
- if !@questionnaire.checked_in?
|
|
33
|
+
= f.input :phone, input_html: { "data-validate" => "presence" }
|
|
34
|
+
= f.input :email, input_html: { "data-validate" => "presence email", value: @questionnaire.user.try(:email) }, required: true
|
|
35
|
+
= hidden_field_tag("check_in", !@questionnaire.checked_in?)
|
|
36
|
+
= f.button :submit, value: ( @questionnaire.checked_in? ? "Remove check-in" : "Check In" ), class: 'btn-primary'
|
|
37
|
+
- if !@questionnaire.checked_in?
|
|
38
|
+
%p.card-text
|
|
39
|
+
%small
|
|
40
|
+
%i An invite to Slack will be sent if they haven't joined already.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.form-container
|
|
2
|
-
=
|
|
2
|
+
= bs_horizontal_simple_form_for @questionnaire, url: url_for(action: @questionnaire.new_record? ? "create" : "update", controller: "questionnaires"), html: { "data-validate" => "form" } do |f|
|
|
3
3
|
|
|
4
4
|
- if f.error_notification.present?
|
|
5
5
|
= f.error_notification
|
|
@@ -8,19 +8,19 @@
|
|
|
8
8
|
- if @questionnaire&.user&.provider == 'mlh'
|
|
9
9
|
%legend Provided by My MLH
|
|
10
10
|
%br
|
|
11
|
-
= f.input :first_name,
|
|
12
|
-
= f.input :last_name,
|
|
13
|
-
= f.input :email,
|
|
14
|
-
= f.input :phone,
|
|
11
|
+
= f.input :first_name, input_html: { "data-validate" => "presence" }, label: "First Name", autofocus: true
|
|
12
|
+
= f.input :last_name, input_html: { "data-validate" => "presence" }, label: "Last Name"
|
|
13
|
+
= f.input :email, input_html: { "data-validate" => "presence email", value: @questionnaire.user.try(:email) }, required: true
|
|
14
|
+
= f.input :phone, input_html: { "data-validate" => "presence" }
|
|
15
15
|
= f.input :date_of_birth, start_year: Date.today.year - 18, end_year: Date.today.year - 90, order: [:month, :day, :year], input_html: { "data-validate" => "presence" }
|
|
16
16
|
|
|
17
|
-
= f.input :school_id, as: :school_selection,
|
|
18
|
-
= f.input :level_of_study,
|
|
19
|
-
= f.input :major,
|
|
17
|
+
= f.input :school_id, as: :school_selection, input_html: { "data-validate" => "presence" }
|
|
18
|
+
= f.input :level_of_study, input_html: { "data-validate" => "presence" }
|
|
19
|
+
= f.input :major, input_html: { "data-validate" => "presence" }
|
|
20
20
|
= f.input :shirt_size, as: :select, collection: Questionnaire::POSSIBLE_SHIRT_SIZES, include_blank: "(select one...)", input_html: { "data-validate" => "presence" }
|
|
21
|
-
= f.input :gender,
|
|
22
|
-
= f.input :dietary_restrictions,
|
|
23
|
-
= f.input :special_needs,
|
|
21
|
+
= f.input :gender, input_html: { "data-validate" => "presence" }
|
|
22
|
+
= f.input :dietary_restrictions, label: "Health Restrictions"
|
|
23
|
+
= f.input :special_needs, label: "Special needs"
|
|
24
24
|
|
|
25
25
|
%br
|
|
26
26
|
|
|
@@ -34,19 +34,19 @@
|
|
|
34
34
|
|
|
35
35
|
= f.input :resume, as: :deletable_attachment, hint: "Must be under 2MB", input_html: { "data-validate" => "file-max-size file-content-type", "data-validate-file-max-size" => "2097152", "data-validate-file-content-type" => "application/pdf" }, label: "Resume (PDF)"
|
|
36
36
|
|
|
37
|
-
= f.input :portfolio_url, label: "Portfolio Link"
|
|
38
|
-
= f.input :vcs_url, label: "GitHub/BitBucket"
|
|
37
|
+
= f.input :portfolio_url, label: "Portfolio Link"
|
|
38
|
+
= f.input :vcs_url, label: "GitHub/BitBucket"
|
|
39
39
|
|
|
40
|
-
= f.input :can_share_info,
|
|
40
|
+
= f.input :can_share_info, label: "Share resume with employers?"
|
|
41
41
|
|
|
42
42
|
%hr
|
|
43
43
|
|
|
44
44
|
- travel_state = !@questionnaire.new_record? && @questionnaire.travel_not_from_school
|
|
45
|
-
= f.input :travel_not_from_school,
|
|
45
|
+
= f.input :travel_not_from_school, label: "I will not be traveling from my school"
|
|
46
46
|
= f.input :travel_location, input_html: { "data-validate" => "presence", disabled: !travel_state }, wrapper_html: { style: travel_state ? "" : "display: none" }, label: "Travel Location"
|
|
47
47
|
|
|
48
|
-
= f.input :riding_bus,
|
|
49
|
-
= f.input :is_bus_captain,
|
|
48
|
+
= f.input :riding_bus, label: "Riding Bus", disabled: !@questionnaire.eligible_for_a_bus?
|
|
49
|
+
= f.input :is_bus_captain, label: "Is Bus Captain", disabled: !@questionnaire.eligible_for_a_bus?
|
|
50
50
|
- if !@questionnaire.eligible_for_a_bus?
|
|
51
51
|
%p (school not eligible for bus)
|
|
52
52
|
|
|
@@ -58,20 +58,20 @@
|
|
|
58
58
|
= link_to asset_url(Rails.configuration.hackathon['agreement_pdf_asset']), target: '_blank' do
|
|
59
59
|
#{Rails.configuration.hackathon['name']} Agreement
|
|
60
60
|
%span.fa.fa-external-link.icon-space-l-half
|
|
61
|
-
= f.input :agreement_accepted,
|
|
61
|
+
= f.input :agreement_accepted, label: "I accept the #{Rails.configuration.hackathon['name']} agreement.", input_html: { "data-validate" => "presence" }
|
|
62
62
|
|
|
63
63
|
.supporting-text
|
|
64
64
|
Please read the
|
|
65
65
|
%a{ href:"http://static.mlh.io/docs/mlh-code-of-conduct.pdf", target: "_blank" }
|
|
66
66
|
MLH Code of Conduct
|
|
67
67
|
%span.fa.fa-external-link.icon-space-l-half
|
|
68
|
-
= f.input :code_of_conduct_accepted,
|
|
68
|
+
= f.input :code_of_conduct_accepted, label: "I accept the MLH Code of Conduct.", input_html: { "data-validate" => "presence" }
|
|
69
69
|
|
|
70
70
|
.supporting-text
|
|
71
71
|
I agree to the terms of both the
|
|
72
72
|
<a href="https://github.com/MLH/mlh-policies/tree/master/prize-terms-and-conditions" target="_blank">MLH Contest Terms</a> and Conditions and the
|
|
73
73
|
<a href="https://mlh.io/privacy" target="_blank">MLH Privacy Policy</a>. Please note that you may receive pre and post-event informational e-mails and occasional messages about hackathons from MLH as per the MLH Privacy Policy.
|
|
74
|
-
= f.input :data_sharing_accepted,
|
|
74
|
+
= f.input :data_sharing_accepted, label: "I accept the MLH policies.", input_html: { "data-validate" => "presence" }
|
|
75
75
|
|
|
76
76
|
.center
|
|
77
|
-
= f.button :submit, value: ( @questionnaire.new_record? ? 'Create' : 'Save' )
|
|
77
|
+
= f.button :submit, value: ( @questionnaire.new_record? ? 'Create' : 'Save' ), class: 'btn-primary'
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
- not_provided = "<span class=\"text-muted\">Not provided</span>".html_safe.freeze
|
|
2
|
+
|
|
3
|
+
.row
|
|
4
|
+
.col-md-6
|
|
5
|
+
- if @questionnaire.minor?
|
|
6
|
+
.alert.alert-warning
|
|
7
|
+
%p.mb-1
|
|
8
|
+
%strong
|
|
9
|
+
%span.fa.fa-exclamation-triangle.icon-space-r-half
|
|
10
|
+
Applicant is a minor
|
|
11
|
+
%p.mb-0
|
|
12
|
+
Will be
|
|
13
|
+
= format_age(@questionnaire.age_at_time_of_event)
|
|
14
|
+
old at the start of the event.
|
|
15
|
+
|
|
16
|
+
.card.mb-3
|
|
17
|
+
.card-header Personal Information
|
|
18
|
+
.card-body
|
|
19
|
+
.row
|
|
20
|
+
%dt.col-md-4 First name
|
|
21
|
+
%dd.col-md-8= @questionnaire.first_name
|
|
22
|
+
%dt.col-md-4 Last name
|
|
23
|
+
%dd.col-md-8= @questionnaire.last_name
|
|
24
|
+
%dt.col-md-4 Email
|
|
25
|
+
%dd.col-md-8= @questionnaire.email
|
|
26
|
+
%dt.col-md-4 Phone
|
|
27
|
+
%dd.col-md-8= @questionnaire.phone
|
|
28
|
+
%dt.col-md-4 Date of birth
|
|
29
|
+
%dd.col-md-8
|
|
30
|
+
= @questionnaire.date_of_birth_formatted
|
|
31
|
+
%span.badge.badge-pill.badge-dark{"data-container" => "body", "data-toggle" => "popover", "data-placement" => "right", "data-content" => "Age at time of event", "data-trigger" => "hover"}
|
|
32
|
+
= @questionnaire.age_at_time_of_event / 1.year
|
|
33
|
+
%dt.col-md-4 Gender
|
|
34
|
+
%dd.col-md-8= @questionnaire.gender
|
|
35
|
+
%dt.col-md-4 Shirt size
|
|
36
|
+
%dd.col-md-8= @questionnaire.shirt_size
|
|
37
|
+
|
|
38
|
+
.card.mb-3
|
|
39
|
+
.card-header Compliance
|
|
40
|
+
.card-body.px-0.py-0
|
|
41
|
+
%ul.list-group.list-group-flush
|
|
42
|
+
- if @questionnaire.agreement_accepted
|
|
43
|
+
%li.list-group-item
|
|
44
|
+
.text-success
|
|
45
|
+
%span.fa.fa-check.fa-fw.icon-space-r
|
|
46
|
+
Event Agreement
|
|
47
|
+
- else
|
|
48
|
+
%li.list-group-item.list-group-item-danger
|
|
49
|
+
%span.fa.fa-close.fa-fw.icon-space-r
|
|
50
|
+
Event Agreement
|
|
51
|
+
- if @questionnaire.code_of_conduct_accepted
|
|
52
|
+
%li.list-group-item
|
|
53
|
+
.text-success
|
|
54
|
+
%span.fa.fa-check.fa-fw.icon-space-r
|
|
55
|
+
MLH Code of Conduct
|
|
56
|
+
- else
|
|
57
|
+
%li.list-group-item.list-group-item-danger
|
|
58
|
+
%span.fa.fa-close.fa-fw.icon-space-r
|
|
59
|
+
MLH Code of Conduct
|
|
60
|
+
- if @questionnaire.data_sharing_accepted
|
|
61
|
+
%li.list-group-item
|
|
62
|
+
.text-success
|
|
63
|
+
%span.fa.fa-check.fa-fw.icon-space-r
|
|
64
|
+
MLH Data Sharing
|
|
65
|
+
- else
|
|
66
|
+
%li.list-group-item.list-group-item-danger
|
|
67
|
+
%span.fa.fa-close.fa-fw.icon-space-r
|
|
68
|
+
MLH Data Sharing
|
|
69
|
+
- if !@questionnaire.minor?
|
|
70
|
+
%li.list-group-item
|
|
71
|
+
.text-success
|
|
72
|
+
%span.fa.fa-check.fa-fw.icon-space-r
|
|
73
|
+
18 years or older
|
|
74
|
+
- else
|
|
75
|
+
%li.list-group-item.list-group-item-warning
|
|
76
|
+
%span.fa.fa-exclamation-circle.fa-fw.icon-space-r
|
|
77
|
+
18 years or older
|
|
78
|
+
|
|
79
|
+
.col-md-6
|
|
80
|
+
.card.mb-3
|
|
81
|
+
.card-header Special notices
|
|
82
|
+
.card-body
|
|
83
|
+
.row
|
|
84
|
+
%dt.col-md-4 Dietary restrictions
|
|
85
|
+
%dd.col-md-8= @questionnaire.dietary_restrictions || "<span class=\"text-muted\">(none)</span>".html_safe
|
|
86
|
+
%dt.col-md-4 Special needs
|
|
87
|
+
%dd.col-md-8= @questionnaire.special_needs || "<span class=\"text-muted\">(none)</span>".html_safe
|
|
88
|
+
%dt.col-md-4 Traveling from
|
|
89
|
+
%dd.col-md-8
|
|
90
|
+
= @questionnaire.travel_not_from_school ? "Somewhere else (#{@questionnaire.travel_location})" : "<span class=\"text-muted\">My school</span>".html_safe
|
|
91
|
+
|
|
92
|
+
.card.mb-3
|
|
93
|
+
.card-header Resume
|
|
94
|
+
.card-body
|
|
95
|
+
.row
|
|
96
|
+
- if HackathonManager.field_enabled?(:why_attend)
|
|
97
|
+
%dt.col-md-4 Why #{Rails.configuration.hackathon['name']}?
|
|
98
|
+
%dd.col-md-8
|
|
99
|
+
= @questionnaire.why_attend.presence || not_provided
|
|
100
|
+
%dt.col-md-4 Experience
|
|
101
|
+
%dd.col-md-8
|
|
102
|
+
= Questionnaire::POSSIBLE_EXPERIENCES[@questionnaire.experience]
|
|
103
|
+
%dt.col-md-4 Portfolio
|
|
104
|
+
%dd.col-md-8
|
|
105
|
+
= @questionnaire.portfolio_url? ? link_to(@questionnaire.portfolio_url, @questionnaire.portfolio_url, target: '_blank') : not_provided
|
|
106
|
+
%dt.col-md-4 GitHub/BitBucket
|
|
107
|
+
%dd.col-md-8
|
|
108
|
+
= @questionnaire.vcs_url? ? link_to(@questionnaire.vcs_url, @questionnaire.vcs_url, target: '_blank') : not_provided
|
|
109
|
+
%dt.col-md-4 Resume
|
|
110
|
+
%dd.col-md-8
|
|
111
|
+
= @questionnaire.resume? ? link_to("Download »".html_safe, @questionnaire.resume.url) : not_provided
|
|
112
|
+
|
|
113
|
+
.card.mb-3
|
|
114
|
+
.card-header Education
|
|
115
|
+
.card-body
|
|
116
|
+
.row
|
|
117
|
+
%dt.col-md-4 School
|
|
118
|
+
%dd.col-md-8
|
|
119
|
+
- school = @questionnaire.school
|
|
120
|
+
= link_to school.name, manage_school_path(school)
|
|
121
|
+
- if school.full_location.present?
|
|
122
|
+
.small.text-muted= school.full_location
|
|
123
|
+
%dt.col-md-4 Major
|
|
124
|
+
%dd.col-md-8= @questionnaire.major
|
|
125
|
+
%dt.col-md-4 Level of study
|
|
126
|
+
%dd.col-md-8= @questionnaire.level_of_study
|