hackathon_manager 0.8.2 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/hackathon_manager/manage.sass +1 -1
- data/app/controllers/manage/questionnaires_controller.rb +2 -1
- data/app/controllers/questionnaires_controller.rb +1 -1
- data/app/datatables/admin_datatable.rb +2 -2
- data/app/datatables/bulk_message_datatable.rb +2 -2
- data/app/datatables/questionnaire_datatable.rb +3 -3
- data/app/datatables/school_datatable.rb +2 -2
- data/app/helpers/hackathon_manager_helper.rb +4 -0
- data/app/models/message.rb +2 -0
- data/app/models/questionnaire.rb +13 -1
- data/app/views/application/_triggered_email_summary.html.haml +4 -2
- data/app/views/manage/bus_lists/index.html.haml +2 -1
- data/app/views/manage/messages/_form.html.haml +1 -1
- data/app/views/manage/questionnaires/_form.html.haml +3 -0
- data/app/views/questionnaires/_form.html.haml +3 -0
- data/db/migrate/20181125213158_add_grad_year_and_race_ethnicity_to_questionnaires.rb +6 -0
- data/lib/hackathon_manager/version.rb +1 -1
- data/test/factories/questionnaire.rb +2 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f89949d65a0c100dfd2b6d0d31156b77ccabfefdea2432d6e22bec6bcc50ee8
|
4
|
+
data.tar.gz: 5b827226987d2e296b3775c0b2c102332e6e9c6b8351cd77945c5254fad348b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddffa76edd2a4eae2136629598070ae83319b618cf63035844545c58931bb9dfdcb0b10317a86ff8d5403977a167dc00ef2670085f00bdbf094096e3ff777ca1
|
7
|
+
data.tar.gz: c9881ea59a09602e0a01a0a108423b9f013a1fda0a0fcdff9b5a202354626e2d05419552026e0e10606f2aa92b3707115855b7faf40be0309b084f3afda11357
|
@@ -156,7 +156,8 @@ class Manage::QuestionnairesController < Manage::ApplicationController
|
|
156
156
|
:portfolio_url, :vcs_url, :agreement_accepted, :bus_captain_interest,
|
157
157
|
:riding_bus, :phone, :can_share_info, :code_of_conduct_accepted,
|
158
158
|
:travel_not_from_school, :travel_location, :data_sharing_accepted,
|
159
|
-
:
|
159
|
+
:graduation_year, :race_ethnicity, :resume, :delete_resume, :why_attend,
|
160
|
+
:is_bus_captain
|
160
161
|
)
|
161
162
|
end
|
162
163
|
|
@@ -127,7 +127,7 @@ class QuestionnairesController < ApplicationController
|
|
127
127
|
:portfolio_url, :vcs_url, :agreement_accepted, :bus_captain_interest,
|
128
128
|
:riding_bus, :phone, :can_share_info, :code_of_conduct_accepted,
|
129
129
|
:travel_not_from_school, :travel_location, :data_sharing_accepted,
|
130
|
-
:resume, :delete_resume, :why_attend
|
130
|
+
:graduation_year, :race_ethnicity, :resume, :delete_resume, :why_attend
|
131
131
|
)
|
132
132
|
end
|
133
133
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
class AdminDatatable < AjaxDatatablesRails::Base
|
2
|
-
def_delegators :@view, :link_to, :manage_admin_path
|
2
|
+
def_delegators :@view, :link_to, :manage_admin_path, :bold
|
3
3
|
|
4
4
|
def view_columns
|
5
5
|
@view_columns ||= {
|
@@ -15,7 +15,7 @@ class AdminDatatable < AjaxDatatablesRails::Base
|
|
15
15
|
records.map do |record|
|
16
16
|
{
|
17
17
|
id: record.id,
|
18
|
-
email: link_to(record.email, manage_admin_path(record)),
|
18
|
+
email: link_to(bold(record.email), manage_admin_path(record)),
|
19
19
|
admin_limited_access: record.admin_limited_access ? 'Limited Access' : 'Full Access'
|
20
20
|
}
|
21
21
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
class BulkMessageDatatable < AjaxDatatablesRails::Base
|
2
|
-
def_delegators :@view, :link_to, :manage_message_path, :display_datetime
|
2
|
+
def_delegators :@view, :link_to, :manage_message_path, :display_datetime, :bold
|
3
3
|
|
4
4
|
def view_columns
|
5
5
|
@view_columns ||= {
|
@@ -18,7 +18,7 @@ class BulkMessageDatatable < AjaxDatatablesRails::Base
|
|
18
18
|
records.map do |record|
|
19
19
|
{
|
20
20
|
id: record.id,
|
21
|
-
name: link_to(record.name, manage_message_path(record)),
|
21
|
+
name: link_to(bold(record.name), manage_message_path(record)),
|
22
22
|
subject: record.subject,
|
23
23
|
status: record.status.titleize,
|
24
24
|
created_at: display_datetime(record.created_at),
|
@@ -1,5 +1,5 @@
|
|
1
1
|
class QuestionnaireDatatable < AjaxDatatablesRails::Base
|
2
|
-
def_delegators :@view, :link_to, :manage_questionnaire_path, :manage_school_path, :current_user, :acc_status_class, :display_datetime
|
2
|
+
def_delegators :@view, :link_to, :manage_questionnaire_path, :manage_school_path, :current_user, :acc_status_class, :display_datetime, :bold
|
3
3
|
|
4
4
|
def view_columns
|
5
5
|
@view_columns ||= {
|
@@ -29,8 +29,8 @@ class QuestionnaireDatatable < AjaxDatatablesRails::Base
|
|
29
29
|
link: link_to('<i class="fa fa-search"></i>'.html_safe, manage_questionnaire_path(record)),
|
30
30
|
note: record.minor? ? '<div class="center"><i class="fa fa-exclamation-triangle icon-space-r"></i> Minor</div>'.html_safe : '',
|
31
31
|
id: record.id,
|
32
|
-
first_name: record.first_name,
|
33
|
-
last_name: record.last_name,
|
32
|
+
first_name: bold(record.first_name),
|
33
|
+
last_name: bold(record.last_name),
|
34
34
|
email: record.email,
|
35
35
|
phone: record.phone,
|
36
36
|
gender: record.gender,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
class SchoolDatatable < AjaxDatatablesRails::Base
|
2
|
-
def_delegators :@view, :link_to, :manage_school_path, :manage_bus_list_path
|
2
|
+
def_delegators :@view, :link_to, :manage_school_path, :manage_bus_list_path, :bold
|
3
3
|
|
4
4
|
def view_columns
|
5
5
|
@view_columns ||= {
|
@@ -17,7 +17,7 @@ class SchoolDatatable < AjaxDatatablesRails::Base
|
|
17
17
|
records.map do |record|
|
18
18
|
{
|
19
19
|
id: record.id,
|
20
|
-
name: link_to(record.name, manage_school_path(record)),
|
20
|
+
name: link_to(bold(record.name), manage_school_path(record)),
|
21
21
|
city: record.city,
|
22
22
|
state: record.state,
|
23
23
|
questionnaire_count: record.questionnaire_count,
|
@@ -26,6 +26,10 @@ module HackathonManagerHelper
|
|
26
26
|
markdown.render(text).html_safe
|
27
27
|
end
|
28
28
|
|
29
|
+
def bold(value)
|
30
|
+
"<strong>#{h(value)}</strong>".html_safe
|
31
|
+
end
|
32
|
+
|
29
33
|
# Same as link_to, but adds a special active class whenever the link matches
|
30
34
|
# the current page.
|
31
35
|
# Only https://github.com/rails/rails/blob/master/actionview/lib/action_view/helpers/url_helper.rb
|
data/app/models/message.rb
CHANGED
data/app/models/questionnaire.rb
CHANGED
@@ -8,7 +8,7 @@ class Questionnaire < ApplicationRecord
|
|
8
8
|
after_destroy :update_school_questionnaire_count
|
9
9
|
|
10
10
|
validates_presence_of :first_name, :last_name, :phone, :date_of_birth, :school_id, :experience, :shirt_size, :interest
|
11
|
-
validates_presence_of :gender, :major, :level_of_study
|
11
|
+
validates_presence_of :gender, :major, :level_of_study, :graduation_year, :race_ethnicity
|
12
12
|
validates_presence_of :agreement_accepted, message: "Please read & accept"
|
13
13
|
validates_presence_of :code_of_conduct_accepted, message: "Please read & accept"
|
14
14
|
validates_presence_of :data_sharing_accepted, message: "Please read & accept"
|
@@ -67,6 +67,18 @@ class Questionnaire < ApplicationRecord
|
|
67
67
|
"rsvp_denied" => "RSVP Denied"
|
68
68
|
}.freeze
|
69
69
|
|
70
|
+
POSSIBLE_GRAD_YEARS = (Date.today.year - 3...Date.today.year + 7).to_a.freeze
|
71
|
+
|
72
|
+
POSSIBLE_RACE_ETHNICITIES = [
|
73
|
+
"American Indian or Alaskan Native",
|
74
|
+
"Asian / Pacific Islander",
|
75
|
+
"Black or African American",
|
76
|
+
"Hispanic",
|
77
|
+
"White / Caucasian",
|
78
|
+
"Multiple ethnicities / Other",
|
79
|
+
"Prefer not to answer"
|
80
|
+
].freeze
|
81
|
+
|
70
82
|
# From My MLH's dropdown list.
|
71
83
|
# Should *not* validate against this list in case My MLH changes their options,
|
72
84
|
# as this would cause errors until a manual gem update
|
@@ -21,7 +21,8 @@
|
|
21
21
|
- if messages.present?
|
22
22
|
%ul.list-unstyled.mb-0
|
23
23
|
- messages.each do |message|
|
24
|
-
%li
|
24
|
+
%li
|
25
|
+
%strong= link_to(message.name, manage_message_path(message))
|
25
26
|
- else
|
26
27
|
None
|
27
28
|
%tr
|
@@ -31,6 +32,7 @@
|
|
31
32
|
- if messages.present?
|
32
33
|
%ul.list-unstyled.mb-0
|
33
34
|
- messages.each do |message|
|
34
|
-
%li
|
35
|
+
%li
|
36
|
+
%strong= link_to(message.name, manage_message_path(message))
|
35
37
|
- else
|
36
38
|
None
|
@@ -13,7 +13,8 @@
|
|
13
13
|
%tbody
|
14
14
|
- @bus_lists.each do |bus_list|
|
15
15
|
%tr
|
16
|
-
%td
|
16
|
+
%td
|
17
|
+
%strong= link_to(bus_list.name, manage_bus_list_path(bus_list))
|
17
18
|
%td #{bus_list.passengers.count} / #{bus_list.capacity}
|
18
19
|
%td= bus_list.needs_bus_captain ? "<strong class=\"text-danger\">Needs bus captain</strong>".html_safe : "No"
|
19
20
|
%td= bus_list.schools.count
|
@@ -17,7 +17,7 @@
|
|
17
17
|
.row
|
18
18
|
.col-lg-6.mb-3
|
19
19
|
%h5.mb-3 Body
|
20
|
-
= f.input :body, input_html: { rows:
|
20
|
+
= f.input :body, input_html: { rows: 36, 'data-message-live-preview' => 'textarea', class: 'text-monospace', style: 'font-size: 14px' }, hint: "Supports markdown and HTML", label: false, wrapper: :bootstrap_inline_form
|
21
21
|
.col-lg-6.mb-3
|
22
22
|
%h5.mb-3 Preview
|
23
23
|
%iframe.email-preview{src: live_preview_manage_messages_path(body: @message.body), 'data-message-live-preview' => 'iframe', 'data-message-live-preview-base-src' => live_preview_manage_messages_path}
|
@@ -32,6 +32,9 @@
|
|
32
32
|
= f.input :experience, as: :select, collection: Questionnaire::POSSIBLE_EXPERIENCES.invert, include_blank: "(select one...)", label: "Experience", input_html: { "data-validate" => "presence" }
|
33
33
|
= f.input :interest, as: :select, collection: Questionnaire::POSSIBLE_INTERESTS.invert, include_blank: "(select one...)", label: "Interest", input_html: { "data-validate" => "presence" }
|
34
34
|
|
35
|
+
= f.input :graduation_year, as: :select, collection: Questionnaire::POSSIBLE_GRAD_YEARS, include_blank: "(select one...)", label: "Graduation year", input_html: { "data-validate" => "presence" }, wrapper_html: { class: 'input--half' }
|
36
|
+
= f.input :race_ethnicity, as: :select, collection: Questionnaire::POSSIBLE_RACE_ETHNICITIES, include_blank: "(select one...)", label: "Race/Ethnicity", input_html: { "data-validate" => "presence" }, wrapper_html: { class: 'input--half' }
|
37
|
+
|
35
38
|
= 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
39
|
|
37
40
|
= f.input :portfolio_url, label: "Portfolio Link"
|
@@ -34,6 +34,9 @@
|
|
34
34
|
= f.input :experience, as: :select, collection: Questionnaire::POSSIBLE_EXPERIENCES.invert, include_blank: "(select one...)", label: "Experience", input_html: { "data-validate" => "presence" }, wrapper_html: { class: 'input--half' }
|
35
35
|
= f.input :interest, as: :select, collection: Questionnaire::POSSIBLE_INTERESTS.invert, include_blank: "(select one...)", label: "Interest", input_html: { "data-validate" => "presence" }, wrapper_html: { class: 'input--half' }
|
36
36
|
|
37
|
+
= f.input :graduation_year, as: :select, collection: Questionnaire::POSSIBLE_GRAD_YEARS, include_blank: "(select one...)", label: "Graduation year", input_html: { "data-validate" => "presence" }, wrapper_html: { class: 'input--half' }
|
38
|
+
= f.input :race_ethnicity, as: :select, collection: Questionnaire::POSSIBLE_RACE_ETHNICITIES, include_blank: "(select one...)", label: "Race/Ethnicity", input_html: { "data-validate" => "presence" }, wrapper_html: { class: 'input--half' }
|
39
|
+
|
37
40
|
= f.input :portfolio_url, label: "Portfolio link", placeholder: "http://mywebsite.com"
|
38
41
|
= f.input :vcs_url, label: "GitHub/Bitbucket link", placeholder: "https://github.com/coderit"
|
39
42
|
= f.input :resume, as: :deletable_attachment, hint: "Must be a PDF, 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"
|
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.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stuart Olivera
|
@@ -655,6 +655,7 @@ files:
|
|
655
655
|
- db/migrate/20180126174252_add_boarded_bus_to_questionnaires.rb
|
656
656
|
- db/migrate/20180701160855_remove_email_from_questionnaires.rb
|
657
657
|
- db/migrate/20180801144544_add_type_to_messages.rb
|
658
|
+
- db/migrate/20181125213158_add_grad_year_and_race_ethnicity_to_questionnaires.rb
|
658
659
|
- db/schools.csv
|
659
660
|
- db/seed_messages/questionnaire--accepted.md
|
660
661
|
- db/seed_messages/questionnaire--denied.md
|