hackathon_manager 0.6.2 → 0.6.3
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/app/assets/javascripts/hackathon_manager/bus_lists.js +29 -0
- data/app/assets/javascripts/hackathon_manager/manage/application.js +1 -0
- data/app/assets/javascripts/hackathon_manager/manage/lib/setupDataTables.js +18 -3
- data/app/assets/javascripts/hackathon_manager/vendor/buttons.colVis.min.js +6 -0
- data/app/assets/javascripts/hackathon_manager/vendor/jquery.dataTables.min.js +162 -162
- data/app/controllers/bus_lists_controller.rb +23 -0
- data/app/datatables/questionnaire_datatable.rb +10 -2
- data/app/models/questionnaire.rb +4 -0
- data/app/views/bus_lists/show.html.haml +3 -0
- data/app/views/manage/bus_lists/show.html.haml +2 -0
- data/app/views/manage/questionnaires/_form.html.haml +45 -27
- data/app/views/manage/questionnaires/index.html.haml +4 -0
- data/app/views/manage/schools/show.html.haml +39 -18
- data/config/routes.rb +4 -2
- data/db/migrate/20180126174252_add_boarded_bus_to_questionnaires.rb +5 -0
- data/lib/hackathon_manager/version.rb +1 -1
- data/test/factories/bus_list.rb +3 -2
- metadata +4 -1
|
@@ -7,10 +7,14 @@ class QuestionnaireDatatable < AjaxDatatablesRails::Base
|
|
|
7
7
|
first_name: { source: 'Questionnaire.first_name' },
|
|
8
8
|
last_name: { source: 'Questionnaire.last_name' },
|
|
9
9
|
email: { source: 'User.email' },
|
|
10
|
+
phone: { source: 'Questionnaire.phone' },
|
|
11
|
+
gender: { source: 'Questionnaire.gender' },
|
|
12
|
+
date_of_birth: { source: 'Questionnaire.date_of_birth', searchable: false },
|
|
10
13
|
admin: { source: 'User.admin', cond: :eq, searchable: false },
|
|
11
14
|
acc_status: { source: 'Questionnaire.acc_status', searchable: true },
|
|
12
15
|
checked_in: { source: 'Questionnaire.checked_in_at', searchable: false },
|
|
13
|
-
school: { source: 'School.name' }
|
|
16
|
+
school: { source: 'School.name' },
|
|
17
|
+
created_at: { source: 'Questionnaire.created_at', searchable: false }
|
|
14
18
|
}
|
|
15
19
|
end
|
|
16
20
|
|
|
@@ -26,9 +30,13 @@ class QuestionnaireDatatable < AjaxDatatablesRails::Base
|
|
|
26
30
|
first_name: record.first_name,
|
|
27
31
|
last_name: record.last_name,
|
|
28
32
|
email: record.email,
|
|
33
|
+
phone: record.phone,
|
|
34
|
+
gender: record.gender,
|
|
35
|
+
date_of_birth: record.date_of_birth_formatted,
|
|
29
36
|
acc_status: "<span class=\"acc-status-#{record.acc_status}\">#{record.acc_status.titleize}</span>".html_safe,
|
|
30
37
|
checked_in: record.checked_in? ? '<span class="acc-status-accepted">Yes</span>'.html_safe : 'No',
|
|
31
|
-
school: link_to(record.school.name, manage_school_path(record.school))
|
|
38
|
+
school: link_to(record.school.name, manage_school_path(record.school)),
|
|
39
|
+
created_at: record.created_at.present? ? record.created_at.strftime("%B %d, %Y at %I:%M %p") : ''
|
|
32
40
|
}
|
|
33
41
|
end
|
|
34
42
|
end
|
data/app/models/questionnaire.rb
CHANGED
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
%table.table
|
|
28
28
|
%thead
|
|
29
29
|
%tr
|
|
30
|
+
%th Boarded bus?
|
|
30
31
|
%th First Name
|
|
31
32
|
%th Last Name
|
|
32
33
|
%th Email
|
|
@@ -36,6 +37,8 @@
|
|
|
36
37
|
%tbody
|
|
37
38
|
- @bus_list.passengers.each do |p|
|
|
38
39
|
%tr
|
|
40
|
+
%td
|
|
41
|
+
%input{type: 'checkbox', checked: p.boarded_bus?, data: { "boarded-bus": true, action: boarded_bus_bus_list_path, id: p.id } }
|
|
39
42
|
%td= p.first_name
|
|
40
43
|
%td= p.last_name
|
|
41
44
|
%td= p.email
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
%th Email
|
|
31
31
|
%th Phone Number
|
|
32
32
|
%th School
|
|
33
|
+
%th Boarded bus?
|
|
33
34
|
%th Checked in?
|
|
34
35
|
- unless current_user.admin_limited_access
|
|
35
36
|
%th Actions
|
|
@@ -42,6 +43,7 @@
|
|
|
42
43
|
%td= p.email
|
|
43
44
|
%td= phone_link_to p.phone
|
|
44
45
|
%td= link_to p.school.name, manage_school_path(p.school)
|
|
46
|
+
%td= p.boarded_bus? ? '<span class="acc-status-accepted">Yes</span>'.html_safe : 'No'
|
|
45
47
|
%td= p.checked_in? ? '<span class="acc-status-accepted">Yes</span>'.html_safe : 'No'
|
|
46
48
|
- unless current_user.admin_limited_access
|
|
47
49
|
%td
|
|
@@ -4,24 +4,25 @@
|
|
|
4
4
|
- if f.error_notification.present?
|
|
5
5
|
= f.error_notification
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
7
|
+
%fieldset
|
|
8
|
+
- if @questionnaire&.user&.provider == 'mlh'
|
|
9
|
+
%legend Provided by My MLH
|
|
10
|
+
%br
|
|
11
|
+
= f.input :first_name, placeholder: "Joe", input_html: { "data-validate" => "presence" }, label: "First Name", autofocus: true
|
|
12
|
+
= f.input :last_name, placeholder: "Smith", input_html: { "data-validate" => "presence" }, label: "Last Name"
|
|
13
|
+
= f.input :email, placeholder: "joe@example.com", input_html: { "data-validate" => "presence email", value: @questionnaire.user.try(:email) }, required: true
|
|
14
|
+
= f.input :phone, placeholder: "(123) 456-7890", input_html: { "data-validate" => "presence" }
|
|
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
|
+
|
|
17
|
+
= f.input :school_id, as: :school_selection, placeholder: "My University", input_html: { "data-validate" => "presence" }
|
|
18
|
+
= f.input :level_of_study, placeholder: "University (Undergraduate)", input_html: { "data-validate" => "presence" }
|
|
19
|
+
= f.input :major, placeholder: "Major", input_html: { "data-validate" => "presence" }
|
|
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, placeholder: "Female, Male, Non-Binary, Prefer not to say, other", input_html: { "data-validate" => "presence" }
|
|
22
|
+
= f.input :dietary_restrictions, placeholder: "Allergies, medical assistance, etc. (optional)", label: "Health Restrictions"
|
|
23
|
+
= f.input :special_needs, placeholder: "Any special needs or requests (optional)", label: "Special needs"
|
|
24
|
+
|
|
25
|
+
%br
|
|
25
26
|
|
|
26
27
|
.form-inputs
|
|
27
28
|
%br
|
|
@@ -36,24 +37,41 @@
|
|
|
36
37
|
= f.input :portfolio_url, label: "Portfolio Link", placeholder:"http://mywebsite.com"
|
|
37
38
|
= f.input :vcs_url, label: "GitHub/BitBucket", placeholder:"https://github.com/coderit"
|
|
38
39
|
|
|
40
|
+
= f.input :can_share_info, as: :formatted_boolean, label: "Share resume with employers?"
|
|
41
|
+
|
|
42
|
+
%hr
|
|
43
|
+
|
|
39
44
|
- travel_state = !@questionnaire.new_record? && @questionnaire.travel_not_from_school
|
|
40
45
|
= f.input :travel_not_from_school, as: :formatted_boolean, label: "I will not be traveling from my school"
|
|
41
46
|
= f.input :travel_location, input_html: { "data-validate" => "presence", disabled: !travel_state }, wrapper_html: { style: travel_state ? "" : "display: none" }, label: "Travel Location"
|
|
42
47
|
|
|
43
|
-
= f.input :can_share_info, as: :formatted_boolean, label: "Share resume with employers?"
|
|
44
|
-
|
|
45
48
|
= f.input :riding_bus, as: :formatted_boolean, label: "Riding Bus", disabled: !@questionnaire.eligible_for_a_bus?
|
|
46
49
|
= f.input :is_bus_captain, as: :formatted_boolean, label: "Is Bus Captain", disabled: !@questionnaire.eligible_for_a_bus?
|
|
47
50
|
- if !@questionnaire.eligible_for_a_bus?
|
|
48
51
|
%p (school not eligible for bus)
|
|
49
52
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
%hr
|
|
54
|
+
|
|
55
|
+
.form-inputs
|
|
56
|
+
.supporting-text
|
|
57
|
+
Please read the
|
|
58
|
+
= link_to asset_url(Rails.configuration.hackathon['agreement_pdf_asset']), target: '_blank' do
|
|
59
|
+
#{Rails.configuration.hackathon['name']} Agreement
|
|
60
|
+
%span.fa.fa-external-link.icon-space-l-half
|
|
61
|
+
= f.input :agreement_accepted, as: :formatted_boolean, label: "I accept the #{Rails.configuration.hackathon['name']} agreement.", input_html: { "data-validate" => "presence" }
|
|
62
|
+
|
|
63
|
+
.supporting-text
|
|
64
|
+
Please read the
|
|
65
|
+
%a{ href:"http://static.mlh.io/docs/mlh-code-of-conduct.pdf", target: "_blank" }
|
|
66
|
+
MLH Code of Conduct
|
|
67
|
+
%span.fa.fa-external-link.icon-space-l-half
|
|
68
|
+
= f.input :code_of_conduct_accepted, as: :formatted_boolean, label: "I accept the MLH Code of Conduct.", input_html: { "data-validate" => "presence" }
|
|
69
|
+
|
|
70
|
+
.supporting-text
|
|
71
|
+
I agree to the terms of both the
|
|
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
|
+
<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, as: :formatted_boolean, label: "I accept the MLH policies.", input_html: { "data-validate" => "presence" }
|
|
57
75
|
|
|
58
76
|
.center
|
|
59
77
|
= f.button :submit, value: ( @questionnaire.new_record? ? 'Create' : 'Save' )
|
|
@@ -1,21 +1,42 @@
|
|
|
1
|
-
%section.section
|
|
2
|
-
%h1.section-title= title
|
|
1
|
+
%section.section.manage
|
|
2
|
+
%h1.section-title= title @school.name
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
%
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
%
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
%
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
%
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
%
|
|
18
|
-
|
|
4
|
+
.container.container-half
|
|
5
|
+
%p
|
|
6
|
+
%b Name:
|
|
7
|
+
= @school.name
|
|
8
|
+
%p
|
|
9
|
+
%b Address:
|
|
10
|
+
= @school.address || "(not provided)"
|
|
11
|
+
%p
|
|
12
|
+
%b City:
|
|
13
|
+
= @school.city || "(not provided)"
|
|
14
|
+
%p
|
|
15
|
+
%b State:
|
|
16
|
+
= @school.state || "(not provided)"
|
|
17
|
+
%p
|
|
18
|
+
%b Bus List:
|
|
19
|
+
= @school.bus_list ? link_to(@school.bus_list.name, manage_bus_list_path(@school.bus_list)) : '(not assigned)'
|
|
20
|
+
|
|
21
|
+
.container.container-half
|
|
22
|
+
%p
|
|
23
|
+
%strong Duplicate Names
|
|
24
|
+
%p If someone attempts to apply using a name below, they'll automatically be converted to this school.
|
|
25
|
+
%table.table
|
|
26
|
+
%thead
|
|
27
|
+
%tr
|
|
28
|
+
%th School Name
|
|
29
|
+
%th Date Created
|
|
30
|
+
%tbody
|
|
31
|
+
- dupes = SchoolNameDuplicate.where(school_id: @school.id)
|
|
32
|
+
- dupes.each do |dupe|
|
|
33
|
+
%tr
|
|
34
|
+
%td= dupe.name
|
|
35
|
+
%td= dupe.created_at
|
|
36
|
+
- if dupes.blank?
|
|
37
|
+
%tr
|
|
38
|
+
%td{colspan: 2}
|
|
39
|
+
%em No duplicate names exist for this school.
|
|
19
40
|
|
|
20
41
|
%hr
|
|
21
42
|
|
|
@@ -30,7 +51,7 @@
|
|
|
30
51
|
%hr
|
|
31
52
|
|
|
32
53
|
%p
|
|
33
|
-
%strong Questionnaires
|
|
54
|
+
%strong Questionnaires
|
|
34
55
|
%table.table
|
|
35
56
|
%thead
|
|
36
57
|
%tr
|
data/config/routes.rb
CHANGED
|
@@ -21,6 +21,10 @@ Rails.application.routes.draw do
|
|
|
21
21
|
get :deny, on: :collection
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
+
resource :bus_list do
|
|
25
|
+
patch :boarded_bus, on: :collection
|
|
26
|
+
end
|
|
27
|
+
|
|
24
28
|
namespace :manage do
|
|
25
29
|
root to: "dashboard#index"
|
|
26
30
|
resources :dashboard do
|
|
@@ -71,6 +75,4 @@ Rails.application.routes.draw do
|
|
|
71
75
|
resource :config do
|
|
72
76
|
end
|
|
73
77
|
end
|
|
74
|
-
|
|
75
|
-
resource :bus_list
|
|
76
78
|
end
|
data/test/factories/bus_list.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hackathon_manager
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stuart Olivera
|
|
@@ -444,6 +444,7 @@ files:
|
|
|
444
444
|
- app/assets/images/hackathon_manager/arrow_down.svg
|
|
445
445
|
- app/assets/images/hackathon_manager/arrow_down_hover.svg
|
|
446
446
|
- app/assets/javascripts/hackathon_manager/application.js
|
|
447
|
+
- app/assets/javascripts/hackathon_manager/bus_lists.js
|
|
447
448
|
- app/assets/javascripts/hackathon_manager/forms.js
|
|
448
449
|
- app/assets/javascripts/hackathon_manager/jquery.transit.min.js
|
|
449
450
|
- app/assets/javascripts/hackathon_manager/manage/application.js
|
|
@@ -458,6 +459,7 @@ files:
|
|
|
458
459
|
- app/assets/javascripts/hackathon_manager/sidebar.js
|
|
459
460
|
- app/assets/javascripts/hackathon_manager/toggle.js
|
|
460
461
|
- app/assets/javascripts/hackathon_manager/validate.js
|
|
462
|
+
- app/assets/javascripts/hackathon_manager/vendor/buttons.colVis.min.js
|
|
461
463
|
- app/assets/javascripts/hackathon_manager/vendor/buttons.html5.min.js
|
|
462
464
|
- app/assets/javascripts/hackathon_manager/vendor/d3.v3.min.js
|
|
463
465
|
- app/assets/javascripts/hackathon_manager/vendor/dataTables.buttons.min.js
|
|
@@ -644,6 +646,7 @@ files:
|
|
|
644
646
|
- db/migrate/20180108231420_add_trigger_to_message.rb
|
|
645
647
|
- db/migrate/20180116022530_set_default_count_on_schools.rb
|
|
646
648
|
- db/migrate/20180118035548_convert_message_recipients_to_recipient_queries.rb
|
|
649
|
+
- db/migrate/20180126174252_add_boarded_bus_to_questionnaires.rb
|
|
647
650
|
- db/schools.csv
|
|
648
651
|
- db/seeds.rb
|
|
649
652
|
- lib/hackathon_manager.rb
|