hackathon_manager 0.13.12 → 0.14.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/app/assets/javascripts/hackathon_manager/manage/application.js +0 -2
- data/app/assets/javascripts/hackathon_manager/manage/lib/datatables.js +3 -3
- data/app/assets/javascripts/hackathon_manager/vendor/datatables.min.js +89 -74
- data/app/assets/stylesheets/hackathon_manager/datatables.min.css +3 -3
- data/app/assets/stylesheets/hackathon_manager/manage.sass +3 -3
- data/app/controllers/manage/admins_controller.rb +1 -0
- data/app/controllers/manage/configs_controller.rb +31 -3
- data/app/controllers/manage/questionnaires_controller.rb +3 -3
- data/app/controllers/questionnaires_controller.rb +1 -1
- data/app/controllers/rsvps_controller.rb +1 -1
- data/app/mailers/application_mailer.rb +1 -1
- data/app/mailers/mailer.rb +2 -2
- data/app/models/hackathon_config.rb +7 -0
- data/app/models/questionnaire.rb +1 -1
- data/app/models/user.rb +2 -0
- data/app/views/application/_questionnaire_summary.html.haml +1 -1
- data/app/views/bus_lists/show.html.haml +2 -2
- data/app/views/devise/registrations/new.html.haml +5 -5
- data/app/views/devise/sessions/new.html.haml +1 -1
- data/app/views/layouts/hackathon_manager/_header.html.haml +2 -2
- data/app/views/layouts/hackathon_manager/application.html.haml +3 -3
- data/app/views/layouts/mailer.html.erb +1 -1
- data/app/views/layouts/manage/application.html.haml +6 -6
- data/app/views/mailer/bus_captain_confirmation_email.html.erb +3 -3
- data/app/views/mailer/incomplete_reminder_email.html.erb +2 -2
- data/app/views/manage/configs/edit.html.haml +17 -0
- data/app/views/manage/configs/index.html.haml +34 -0
- data/app/views/manage/messages/_form.html.haml +1 -1
- data/app/views/manage/questionnaires/_form.html.haml +4 -4
- data/app/views/manage/questionnaires/_overview.html.haml +1 -1
- data/app/views/questionnaires/_form.html.haml +6 -6
- data/app/views/questionnaires/new.html.haml +1 -1
- data/app/views/questionnaires/show.html.haml +6 -6
- data/app/views/rsvps/show.html.haml +3 -3
- data/config/app.yml +33 -0
- data/config/initializers/devise.rb +1 -1
- data/config/locales/en.yml +24 -0
- data/config/routes.rb +1 -2
- data/db/migrate/20190216203450_create_settings.rb +17 -0
- data/db/seed_messages/questionnaire--accepted.md +1 -1
- data/db/seed_messages/questionnaire--pending.md +1 -1
- data/db/seed_messages/questionnaire--rsvp_confirmed.md +1 -1
- data/lib/hackathon_manager.rb +1 -13
- data/lib/hackathon_manager/engine.rb +1 -13
- data/lib/hackathon_manager/version.rb +1 -1
- metadata +26 -9
- data/app/views/manage/configs/show.html.haml +0 -27
- data/config/initializers/0_hackathon.rb +0 -3
@@ -1,9 +1,9 @@
|
|
1
1
|
.header
|
2
2
|
.header__wrapper.account-nav__wrapper
|
3
|
-
- if
|
3
|
+
- if HackathonConfig['logo_asset'].present?
|
4
4
|
.header-logo
|
5
5
|
= link_to root_path do
|
6
|
-
= image_tag
|
6
|
+
= image_tag HackathonConfig['logo_asset'], id: 'logo', alt: "#{HackathonConfig['name']} logo", title: HackathonConfig['name'], class: 'header-logo__image'
|
7
7
|
- else
|
8
8
|
.header-nav
|
9
9
|
= btn_link_to "Home", root_path
|
@@ -1,12 +1,12 @@
|
|
1
1
|
!!! 5
|
2
2
|
%html
|
3
3
|
%head
|
4
|
-
%title= yield(:title) ||
|
4
|
+
%title= yield(:title) || HackathonConfig['default_page_title']
|
5
5
|
%meta{ charset: "utf-8" }
|
6
6
|
%meta{ name:"viewport", content: "width=device-width, initial-scale=1" }
|
7
7
|
|
8
|
-
- if
|
9
|
-
%link{ href: image_url(
|
8
|
+
- if HackathonConfig['favicon_asset'].present?
|
9
|
+
%link{ href: image_url(HackathonConfig['favicon_asset']), rel: "shortcut icon" }
|
10
10
|
|
11
11
|
= stylesheet_link_tag "hackathon_manager/core", media: "all"
|
12
12
|
= csrf_meta_tags
|
@@ -357,7 +357,7 @@
|
|
357
357
|
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
358
358
|
<tr>
|
359
359
|
<td class="content-block">
|
360
|
-
You received this email because you applied to <%=
|
360
|
+
You received this email because you applied to <%= HackathonConfig['name'] %>. <%= link_to 'Manage account', questionnaires_url %>.
|
361
361
|
</td>
|
362
362
|
</tr>
|
363
363
|
<tr>
|
@@ -1,11 +1,11 @@
|
|
1
1
|
!!! 5
|
2
2
|
%html
|
3
3
|
%head
|
4
|
-
%title= yield(:title).presence || "#{
|
4
|
+
%title= yield(:title).presence || "#{HackathonConfig['name']} Manager"
|
5
5
|
%meta{ content: "width=device-width, initial-scale=1, shrink-to-fit=no", name: "viewport" }/
|
6
6
|
|
7
|
-
- if
|
8
|
-
%link{ href: image_url(
|
7
|
+
- if HackathonConfig['favicon_asset'].present?
|
8
|
+
%link{ href: image_url(HackathonConfig['favicon_asset']), rel: "shortcut icon" }
|
9
9
|
|
10
10
|
= stylesheet_link_tag "hackathon_manager/manage", :media => "all"
|
11
11
|
= csrf_meta_tags
|
@@ -14,7 +14,7 @@
|
|
14
14
|
= javascript_include_tag "hackathon_manager/manage/application"
|
15
15
|
|
16
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} #{
|
17
|
+
%a.navbar-brand.col-xs-6.col-sm-3.col-md-2.mr-0{href: manage_root_path} #{HackathonConfig['name']} Manager
|
18
18
|
/ %input.form-control.form-control-dark.w-100{"aria-label" => "Search", placeholder: "Search", type: "text"}/
|
19
19
|
%span.navbar-brand.navbar-mobile-toggle.mr-0.pl-3.pr-3{onclick: 'toggleMobileNav()'}
|
20
20
|
.fa.fa-bars.fa-fw.icon-space-r-half
|
@@ -68,10 +68,10 @@
|
|
68
68
|
%span Advanced
|
69
69
|
%ul.nav.flex-column.mb-2
|
70
70
|
%li.nav-item
|
71
|
-
= active_link_to
|
71
|
+
= active_link_to manage_configs_path, class: "nav-link" do
|
72
72
|
.fa.fa-wrench.fa-fw.icon-space-r-half
|
73
73
|
Config
|
74
|
-
.nav-item-description
|
74
|
+
.nav-item-description Manage configuration
|
75
75
|
%li.nav-item
|
76
76
|
= active_link_to sidekiq_web_path, target: '_blank', class: "nav-link" do
|
77
77
|
.fa.fa-tasks.fa-fw.icon-space-r-half
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<h2>You're a bus captain!</h2>
|
2
2
|
<p>Hey <%= @user.first_name %>,</p>
|
3
|
-
<p>Thanks for volunteering to be a bus captain! We know most people just want to hop on & off the bus, but coordinating busses isn't that easy. Thanks to you, this bus to <%=
|
3
|
+
<p>Thanks for volunteering to be a bus captain! We know most people just want to hop on & off the bus, but coordinating busses isn't that easy. Thanks to you, this bus to <%= HackathonConfig['name'] %> can be a success!</p>
|
4
4
|
<p>We've provided a portal to view all bus passengers for your bus, as well as provide important information about being a captain. <strong>Please take a look!</strong></p>
|
5
5
|
<p>
|
6
6
|
<a href="https://brickhack.io/bus_list" class="button" target="_blank">Bus List »</a>
|
@@ -8,5 +8,5 @@
|
|
8
8
|
<small><i>Link not working? Go to <a href="https://brickhack.io/bus_list">brickhack.io/bus_list</a></i></small>
|
9
9
|
</p>
|
10
10
|
<p>This will be the central source of truth for passengers & bus information, in addition to anything you hear from our travel director.</p>
|
11
|
-
<p>This also means your <strong>name, email, and phone number</strong> are visible to everyone riding the bus. This information is taken straight from your <%=
|
12
|
-
<p>Again, thank you so much for being a bus captain! If you have any questions at all, feel free to reach out. We can't wait to see you at <%=
|
11
|
+
<p>This also means your <strong>name, email, and phone number</strong> are visible to everyone riding the bus. This information is taken straight from your <%= HackathonConfig['name'] %> application, so please make sure it is up to date! You can check this at <a href="https://brickhack.io/apply">https://brickhack.io/apply</a></p>
|
12
|
+
<p>Again, thank you so much for being a bus captain! If you have any questions at all, feel free to reach out. We can't wait to see you at <%= HackathonConfig['name'] %>!</p>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<h2>Finish Your Application</h2>
|
2
|
-
<p>You're almost there! You completed the My MLH part of the application, but didn't finish the additional <%=
|
2
|
+
<p>You're almost there! You completed the My MLH part of the application, but didn't finish the additional <%= HackathonConfig['name'] %>-specific questions.</p>
|
3
3
|
<p><strong>Your application will not be considered until it is completed.</strong></p>
|
4
4
|
<p>Not to worry! Just <%= link_to 'head on back to the website', questionnaires_url %>, sign in with your existing My MLH account (if necessary), and complete the application.</p>
|
5
5
|
<p><%= link_to 'Finish Application »', questionnaires_url, class: 'button' %></p>
|
6
|
-
<p>Happy hacking!<br> - The <%=
|
6
|
+
<p>Happy hacking!<br> - The <%= HackathonConfig['name'] %> Team</p>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
= render "layouts/manage/page_title", title: "Edit Configuration", subtitle: @config.var do
|
2
|
+
= link_to 'Cancel', manage_configs_path, class: 'btn btn-sm btn-outline-secondary'
|
3
|
+
|
4
|
+
.form-container
|
5
|
+
= bs_horizontal_simple_form_for HackathonConfig, url: manage_config_path(@config.var), method: 'patch', html: { "data-validate" => "form" } do |f|
|
6
|
+
= f.error_notification
|
7
|
+
|
8
|
+
.form-inputs
|
9
|
+
- if [true, false].include? @config.value
|
10
|
+
-# = f.input :value, label: @config.var, as: :boolean, 'yes', 'no'
|
11
|
+
= f.input @config.var.to_sym, as: :radio_buttons, :collection => [['true',true], ['false',false]], label_method: :first, value_method: :last, :prompt => 'Choose one...'
|
12
|
+
- else
|
13
|
+
= f.input @config.var.to_sym, input_html: { value: @config.value }
|
14
|
+
|
15
|
+
.form-actions
|
16
|
+
= f.button :submit, class: 'btn-primary', value: "Update #{@config.var}"
|
17
|
+
|
@@ -0,0 +1,34 @@
|
|
1
|
+
= render "layouts/manage/page_title", title: "Hackathon Configuration"
|
2
|
+
|
3
|
+
.row
|
4
|
+
.col-lg-6.mb-3
|
5
|
+
- @config.each_key do |key|
|
6
|
+
.card.mb-3
|
7
|
+
.card-body
|
8
|
+
%p.mb-1
|
9
|
+
= link_to edit_manage_config_path(key), class: 'icon-space-r' do
|
10
|
+
%span.fa.fa-pencil
|
11
|
+
%b
|
12
|
+
= t("simple_form.labels.hackathon_config.#{key}")
|
13
|
+
|
14
|
+
%small
|
15
|
+
%code= key
|
16
|
+
%p.text-muted= t("simple_form.hints.hackathon_config.#{key}").html_safe
|
17
|
+
- if @config[key] == ''
|
18
|
+
%p.mb-0
|
19
|
+
%em
|
20
|
+
%small
|
21
|
+
— Not set —
|
22
|
+
- else
|
23
|
+
%pre.mb-0= @config[key]
|
24
|
+
|
25
|
+
.col-lg-6.mb-3
|
26
|
+
.card
|
27
|
+
.card-body
|
28
|
+
%h5.card-title Environment Variables
|
29
|
+
%h6.card-subtitle.mb-2.text-muted
|
30
|
+
Environment variables are configured on the production server.
|
31
|
+
%hr
|
32
|
+
%p
|
33
|
+
%b AWS S3 Bucket for Resumes:
|
34
|
+
%pre= ENV['AWS_BUCKET'] || '[No value]'
|
@@ -6,7 +6,7 @@
|
|
6
6
|
= f.input :type, as: :select, collection: Message::POSSIBLE_TYPES.map { |x| [x.titleize, x] }, include_blank: false
|
7
7
|
= f.input :trigger, as: :select, collection: Message::POSSIBLE_TRIGGERS.invert, include_blank: "(disabled)"
|
8
8
|
= f.input :name
|
9
|
-
= f.input :subject, hint: "All emails are from <pre class=\"d-inline\">#{html_escape(
|
9
|
+
= f.input :subject, hint: "All emails are from <pre class=\"d-inline\">#{html_escape(HackathonConfig['email_from'])}</pre>".html_safe
|
10
10
|
= f.input :template, as: :select, collection: Message::POSSIBLE_TEMPLATES.map { |x| [x.titleize, x] }, include_blank: false
|
11
11
|
- if @message.status == "drafted"
|
12
12
|
= f.input :recipients, as: :select, collection: @message.possible_recipients, input_html: { class: "selectize", multiple: true, }, placeholder: "Type to search by school or type..."
|
@@ -31,7 +31,7 @@
|
|
31
31
|
.card-header Resume
|
32
32
|
.card-body
|
33
33
|
- if HackathonManager.field_enabled?(:why_attend)
|
34
|
-
= f.input :why_attend, label: "Why #{
|
34
|
+
= f.input :why_attend, label: "Why #{HackathonConfig['name']}?", placeholder: "In a sentence or two, why would you like to attend #{HackathonConfig['name']}?", input_html: { rows: 3, maxlength: 280 }
|
35
35
|
|
36
36
|
= f.input :experience, as: :select, collection: Questionnaire::POSSIBLE_EXPERIENCES.invert, include_blank: "(select one...)", label: "Experience", input_html: { "data-validate" => "presence" }
|
37
37
|
= f.input :interest, as: :select, collection: Questionnaire::POSSIBLE_INTERESTS.invert, include_blank: "(select one...)", label: "Interest", input_html: { "data-validate" => "presence" }
|
@@ -64,10 +64,10 @@
|
|
64
64
|
.card-body
|
65
65
|
.supporting-text
|
66
66
|
Please read the
|
67
|
-
= link_to asset_url(
|
68
|
-
#{
|
67
|
+
= link_to asset_url(HackathonConfig['agreement_pdf_asset']), target: '_blank' do
|
68
|
+
#{HackathonConfig['name']} Agreement
|
69
69
|
%span.fa.fa-external-link.icon-space-l-half
|
70
|
-
= f.input :agreement_accepted, label: "I accept the #{
|
70
|
+
= f.input :agreement_accepted, label: "I accept the #{HackathonConfig['name']} agreement.", input_html: { "data-validate" => "presence" }
|
71
71
|
|
72
72
|
.supporting-text
|
73
73
|
Please read the
|
@@ -77,7 +77,7 @@
|
|
77
77
|
.card-body
|
78
78
|
.row
|
79
79
|
- if HackathonManager.field_enabled?(:why_attend)
|
80
|
-
%dt.col-md-4 Why #{
|
80
|
+
%dt.col-md-4 Why #{HackathonConfig['name']}?
|
81
81
|
%dd.col-md-8
|
82
82
|
= @questionnaire.why_attend.presence || not_provided
|
83
83
|
%dt.col-md-4 Experience
|
@@ -5,9 +5,9 @@
|
|
5
5
|
= f.error_notification
|
6
6
|
|
7
7
|
.wizard-stage.wizard-current
|
8
|
-
- if
|
8
|
+
- if HackathonConfig['disclaimer_message'].present?
|
9
9
|
#disclaimer
|
10
|
-
= markdown(
|
10
|
+
= markdown(HackathonConfig['disclaimer_message'])
|
11
11
|
|
12
12
|
.form-inputs
|
13
13
|
= f.input :first_name, input_html: { "data-validate" => "presence" }, autofocus: true, wrapper_html: { class: 'input--half' }
|
@@ -29,7 +29,7 @@
|
|
29
29
|
.wizard-stage
|
30
30
|
.form-inputs
|
31
31
|
- if HackathonManager.field_enabled?(:why_attend)
|
32
|
-
= f.input :why_attend, label: "Why #{
|
32
|
+
= f.input :why_attend, label: "Why #{HackathonConfig['name']}?", placeholder: "In a sentence or two, why would you like to attend #{HackathonConfig['name']}?", input_html: { rows: 3, maxlength: 280 }
|
33
33
|
|
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' }
|
@@ -51,10 +51,10 @@
|
|
51
51
|
.form-inputs
|
52
52
|
.supporting-text
|
53
53
|
Please read the
|
54
|
-
= link_to asset_url(
|
55
|
-
#{
|
54
|
+
= link_to asset_url(HackathonConfig['agreement_pdf_asset']), target: '_blank' do
|
55
|
+
#{HackathonConfig['name']} Agreement
|
56
56
|
%span.fa.fa-external-link.icon-space-l-half
|
57
|
-
= f.input :agreement_accepted, as: :formatted_boolean, label: "I read & accept the #{
|
57
|
+
= f.input :agreement_accepted, as: :formatted_boolean, label: "I read & accept the #{HackathonConfig['name']} agreement.", input_html: { "data-validate" => "presence" }
|
58
58
|
|
59
59
|
.supporting-text
|
60
60
|
Please read the
|
@@ -12,9 +12,9 @@
|
|
12
12
|
- if @questionnaire.did_rsvp?
|
13
13
|
- if @questionnaire.acc_status == "rsvp_confirmed"
|
14
14
|
%p
|
15
|
-
Congratulations! You're all set to attend #{
|
16
|
-
- if
|
17
|
-
= markdown(
|
15
|
+
Congratulations! You're all set to attend #{HackathonConfig['name']}!
|
16
|
+
- if HackathonConfig['thanks_for_rsvp_message'].present?
|
17
|
+
= markdown(HackathonConfig['thanks_for_rsvp_message'])
|
18
18
|
%p.center
|
19
19
|
= btn_link_to "Change RSVP", rsvp_path
|
20
20
|
- else
|
@@ -27,9 +27,9 @@
|
|
27
27
|
- elsif @questionnaire.acc_status == "denied"
|
28
28
|
%p
|
29
29
|
- else
|
30
|
-
- if
|
31
|
-
- if
|
32
|
-
= markdown(
|
30
|
+
- if HackathonConfig['registration_is_open']
|
31
|
+
- if HackathonConfig['thanks_for_applying_message'].present?
|
32
|
+
= markdown(HackathonConfig['thanks_for_applying_message'])
|
33
33
|
- else
|
34
34
|
%p Thanks for applying! You will be notified of your acceptance via email.
|
35
35
|
- else
|
@@ -9,9 +9,9 @@
|
|
9
9
|
%strong
|
10
10
|
%span.fa.fa-check.icon-space-r-half
|
11
11
|
YOU ARE ATTENDING!
|
12
|
-
- if
|
12
|
+
- if HackathonConfig['thanks_for_rsvp_message'].present?
|
13
13
|
%br
|
14
|
-
= markdown(
|
14
|
+
= markdown(HackathonConfig['thanks_for_rsvp_message'])
|
15
15
|
- else
|
16
16
|
%br
|
17
17
|
%br
|
@@ -25,7 +25,7 @@
|
|
25
25
|
- if @questionnaire.acc_status == "rsvp_denied"
|
26
26
|
%p Sorry to hear you won't be with us this year.
|
27
27
|
- else
|
28
|
-
%p You've been accepted to #{
|
28
|
+
%p You've been accepted to #{HackathonConfig['name']}!
|
29
29
|
%p Will you be attending?
|
30
30
|
|
31
31
|
.form-inputs
|
data/config/app.yml
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# config/app.yml for rails-settings-cached
|
2
|
+
defaults: &defaults
|
3
|
+
|
4
|
+
# Logic config
|
5
|
+
registration_is_open: true
|
6
|
+
event_is_over: false
|
7
|
+
last_day_to_apply: <%= Date.new(2000, 1, 1) %>
|
8
|
+
event_start_date: <%= Date.new(2000, 1, 1) %>
|
9
|
+
auto_late_waitlist: false
|
10
|
+
|
11
|
+
# Content config
|
12
|
+
name: HackFoo
|
13
|
+
logo_asset: ""
|
14
|
+
favicon_asset: ""
|
15
|
+
agreement_pdf_asset: agreement.pdf
|
16
|
+
email_from: '"HackFoo" <hello@example.com>'
|
17
|
+
default_page_title: HackFoo - Jan 1-2, 2017
|
18
|
+
|
19
|
+
disabled_fields: ""
|
20
|
+
disclaimer_message: ""
|
21
|
+
thanks_for_applying_message: ""
|
22
|
+
thanks_for_rsvp_message: ""
|
23
|
+
bus_captain_notes: ""
|
24
|
+
|
25
|
+
development:
|
26
|
+
<<: *defaults
|
27
|
+
|
28
|
+
test:
|
29
|
+
<<: *defaults
|
30
|
+
last_day_to_apply: <%= 2.months.from_now %>
|
31
|
+
|
32
|
+
production:
|
33
|
+
<<: *defaults
|
@@ -13,7 +13,7 @@ Devise.setup do |config|
|
|
13
13
|
# Configure the e-mail address which will be shown in Devise::Mailer,
|
14
14
|
# note that it will be overwritten if you use your own mailer class
|
15
15
|
# with default "from" parameter.
|
16
|
-
config.mailer_sender =
|
16
|
+
config.mailer_sender = HackathonConfig['email_from']
|
17
17
|
|
18
18
|
# Configure the class responsible to send e-mails.
|
19
19
|
# config.mailer = 'Devise::Mailer'
|
data/config/locales/en.yml
CHANGED
@@ -44,6 +44,25 @@ en:
|
|
44
44
|
type: Bulk emails are sent once, manually. Automated emails are sent upon a desired trigger/event.
|
45
45
|
name: A friendly name to recognize this email. Applicants won't see this.
|
46
46
|
trigger: Sent automatically when a new or updated applicant matches this criteria. Does not send to anyone already matching this criteria.
|
47
|
+
hackathon_config:
|
48
|
+
registration_is_open: Specify that registration is open. This does <strong>not</strong> block registration; it only changes messaging around it.
|
49
|
+
event_is_over: Specify that the event is over
|
50
|
+
last_day_to_apply: "Last date to apply to your hackathon (format: YYYY-MM-DD)"
|
51
|
+
event_start_date: "Start date of your hackathon (format: YYYY-MM-DD)"
|
52
|
+
auto_late_waitlist: Automatically set application status to "late waitlist" for new applications
|
53
|
+
|
54
|
+
name: Your hackathon's name
|
55
|
+
logo_asset: Optional logo asset made available in your Rails app's app/assets/images/ folder
|
56
|
+
favicon_asset: Optional favicon asset made available in your Rails app's app/assets/images/ folder
|
57
|
+
agreement_pdf_asset: Your hackathon's agreement (e.g. school activity release form), made available in your Rails app's app/assets/images/ folder
|
58
|
+
email_from: '"From" email address for all emails sent through the website (e.g. BrickHack <hello@example.com>)'
|
59
|
+
default_page_title: Default <title> for all pages (e.g. HackFoo - Jan 1-2, 2017)
|
60
|
+
|
61
|
+
disabled_fields: Optional comma-separated list of fields (e.g. why_attend)
|
62
|
+
disclaimer_message: Optional message that appears before signing up & applying. Supports markdown.
|
63
|
+
thanks_for_applying_message: Optional message that appears after completing an application. Supports markdown.
|
64
|
+
thanks_for_rsvp_message: Optional message that appears after RSVP'ing as attending. Supports markdown.
|
65
|
+
bus_captain_notes: Optional message that appers on the bus captain's bus list page. Supports markdown.
|
47
66
|
placeholders:
|
48
67
|
bus_list:
|
49
68
|
notes: |
|
@@ -75,3 +94,8 @@ en:
|
|
75
94
|
vcs_url: https://github.com/coderit
|
76
95
|
user:
|
77
96
|
email: joe@example.com
|
97
|
+
labels:
|
98
|
+
hackathon_config:
|
99
|
+
name: Hackathon Name
|
100
|
+
email_from: From Email
|
101
|
+
agreement_pdf_asset: Agreement PDF Asset
|
data/config/routes.rb
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
class CreateSettings < ActiveRecord::Migration[5.2]
|
2
|
+
def self.up
|
3
|
+
create_table :settings do |t|
|
4
|
+
t.string :var, null: false
|
5
|
+
t.text :value, null: true
|
6
|
+
t.integer :thing_id, null: true
|
7
|
+
t.string :thing_type, null: true, limit: 30
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
|
11
|
+
add_index :settings, %i(thing_type thing_id var), unique: true
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.down
|
15
|
+
drop_table :settings
|
16
|
+
end
|
17
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
## Congratulations <%= @questionnaire.first_name %>, you're in!
|
2
2
|
|
3
|
-
You have been accepted to attend <%=
|
3
|
+
You have been accepted to attend <%= HackathonConfig['name'] %>! **Please RSVP:**
|
4
4
|
|
5
5
|
<p>
|
6
6
|
<a href="https://brickhack.io/rsvp/accept" class="button" target="_blank">Yes, I will Attend »</a>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Hey <%= @questionnaire.first_name %>,
|
6
6
|
|
7
|
-
We've received your application to <%=
|
7
|
+
We've received your application to <%= HackathonConfig['name'] %>!
|
8
8
|
|
9
9
|
If needed, you can edit your information by clicking the button below.
|
10
10
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
## You are confirmed!
|
2
2
|
|
3
|
-
This is your confirmation for <%=
|
3
|
+
This is your confirmation for <%= HackathonConfig['name'] %>! We can't wait to see you there. In the meantime, follow us on [Facebook](https://www.facebook.com/brickhackrit) and [Twitter](https://twitter.com/brickhackrit) to get news and updates.
|
4
4
|
|
5
5
|
**If you can no longer attend, please let us know so we can open the spot to someone else. [I Can No Longer Attend »](https://brickhack.io/rsvp/deny)**
|
6
6
|
|
data/lib/hackathon_manager.rb
CHANGED
@@ -1,20 +1,8 @@
|
|
1
1
|
require "hackathon_manager/engine"
|
2
2
|
|
3
3
|
module HackathonManager
|
4
|
-
def self.reload_config(app)
|
5
|
-
hackathon = app.config_for(:hackathon)
|
6
|
-
|
7
|
-
# Applications without a specified config.time_zone will parse
|
8
|
-
# this as a string instead of a Time
|
9
|
-
if hackathon['last_day_to_apply'].is_a?(String)
|
10
|
-
hackathon['last_day_to_apply'] = Time.parse(hackathon['last_day_to_apply'])
|
11
|
-
end
|
12
|
-
|
13
|
-
app.config.hackathon = hackathon
|
14
|
-
end
|
15
|
-
|
16
4
|
def self.field_enabled?(field)
|
17
|
-
disabled_fields =
|
5
|
+
disabled_fields = HackathonConfig.disabled_fields || ''
|
18
6
|
!disabled_fields.include?(field.to_s)
|
19
7
|
end
|
20
8
|
end
|