hackathon_manager 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (205) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +90 -0
  4. data/Rakefile +36 -0
  5. data/app/assets/config/hackathon_manager_manifest.js +0 -0
  6. data/app/assets/javascripts/hackathon_manager/application.js +16 -0
  7. data/app/assets/javascripts/hackathon_manager/jquery.transit.min.js +1 -0
  8. data/app/assets/javascripts/hackathon_manager/main.js +237 -0
  9. data/app/assets/javascripts/hackathon_manager/manage/application.js +20 -0
  10. data/app/assets/javascripts/hackathon_manager/manage/lib/emailEvents.js +25 -0
  11. data/app/assets/javascripts/hackathon_manager/manage/lib/jquery.bulkRowSelect.js +13 -0
  12. data/app/assets/javascripts/hackathon_manager/manage/lib/jquery.bulkRowedit.js +42 -0
  13. data/app/assets/javascripts/hackathon_manager/manage/lib/jquery.chartkickAutoReload.js +8 -0
  14. data/app/assets/javascripts/hackathon_manager/manage/lib/setupDataTables.js +98 -0
  15. data/app/assets/javascripts/hackathon_manager/manage/lib/setupHighcharts.js +34 -0
  16. data/app/assets/javascripts/hackathon_manager/manage/map.js +58 -0
  17. data/app/assets/javascripts/hackathon_manager/registrations.js +26 -0
  18. data/app/assets/javascripts/hackathon_manager/us.json +1 -0
  19. data/app/assets/javascripts/hackathon_manager/vendor/buttons.html5.min.js +22 -0
  20. data/app/assets/javascripts/hackathon_manager/vendor/d3.v3.min.js +5 -0
  21. data/app/assets/javascripts/hackathon_manager/vendor/dataTables.buttons.min.js +35 -0
  22. data/app/assets/javascripts/hackathon_manager/vendor/jquery.dataTables.min.js +164 -0
  23. data/app/assets/javascripts/hackathon_manager/vendor/pdfmake.min.js +22 -0
  24. data/app/assets/javascripts/hackathon_manager/vendor/queue.v1.min.js +1 -0
  25. data/app/assets/javascripts/hackathon_manager/vendor/topojson.v1.min.js +1 -0
  26. data/app/assets/javascripts/hackathon_manager/vendor/vfs_fonts.js +1 -0
  27. data/app/assets/stylesheets/hackathon_manager/core.sass +20 -0
  28. data/app/assets/stylesheets/hackathon_manager/datatables/buttons.dataTables.min.css +1 -0
  29. data/app/assets/stylesheets/hackathon_manager/datatables/jquery.dataTables.min.css +1 -0
  30. data/app/assets/stylesheets/hackathon_manager/forms/_confirmation.sass +21 -0
  31. data/app/assets/stylesheets/hackathon_manager/forms/_forms.sass +243 -0
  32. data/app/assets/stylesheets/hackathon_manager/general/_base.sass +105 -0
  33. data/app/assets/stylesheets/hackathon_manager/general/_button.sass +49 -0
  34. data/app/assets/stylesheets/hackathon_manager/general/_footer.sass +21 -0
  35. data/app/assets/stylesheets/hackathon_manager/general/_main.sass +4 -0
  36. data/app/assets/stylesheets/hackathon_manager/general/_media-queries.sass +52 -0
  37. data/app/assets/stylesheets/hackathon_manager/general/_mixins.sass +58 -0
  38. data/app/assets/stylesheets/hackathon_manager/general/_mlh.sass +13 -0
  39. data/app/assets/stylesheets/hackathon_manager/general/_sidebar.sass +70 -0
  40. data/app/assets/stylesheets/hackathon_manager/general/_status-colors.sass +14 -0
  41. data/app/assets/stylesheets/hackathon_manager/general/_table.sass +26 -0
  42. data/app/assets/stylesheets/hackathon_manager/mailer.sass +108 -0
  43. data/app/assets/stylesheets/hackathon_manager/manage.sass +119 -0
  44. data/app/assets/stylesheets/hackathon_manager/scaffolds.scss +50 -0
  45. data/app/assets/stylesheets/variables.sass +41 -0
  46. data/app/controllers/bus_lists_controller.rb +37 -0
  47. data/app/controllers/concerns/questionnaires_controllable.rb +15 -0
  48. data/app/controllers/manage/admins_controller.rb +55 -0
  49. data/app/controllers/manage/application_controller.rb +13 -0
  50. data/app/controllers/manage/bus_lists_controller.rb +71 -0
  51. data/app/controllers/manage/dashboard_controller.rb +112 -0
  52. data/app/controllers/manage/messages_controller.rb +88 -0
  53. data/app/controllers/manage/questionnaires_controller.rb +172 -0
  54. data/app/controllers/manage/schools_controller.rb +87 -0
  55. data/app/controllers/manage/stats_controller.rb +77 -0
  56. data/app/controllers/questionnaires_controller.rb +145 -0
  57. data/app/controllers/rsvps_controller.rb +97 -0
  58. data/app/controllers/users/omniauth_callbacks_controller.rb +18 -0
  59. data/app/controllers/users/registrations_controller.rb +63 -0
  60. data/app/datatables/admin_datatable.rb +29 -0
  61. data/app/datatables/message_datatable.rb +30 -0
  62. data/app/datatables/questionnaire_datatable.rb +39 -0
  63. data/app/datatables/school_datatable.rb +34 -0
  64. data/app/helpers/hackathon_manager_helper.rb +36 -0
  65. data/app/helpers/manage/dashboard_helper.rb +9 -0
  66. data/app/inputs/deletable_attachment_input.rb +11 -0
  67. data/app/inputs/formatted_boolean_input.rb +26 -0
  68. data/app/inputs/school_selection_input.rb +9 -0
  69. data/app/mailers/application_mailer.rb +4 -0
  70. data/app/mailers/mail_preview.rb +42 -0
  71. data/app/mailers/mailer.rb +84 -0
  72. data/app/models/bus_list.rb +24 -0
  73. data/app/models/deletable_attachment.rb +17 -0
  74. data/app/models/fips.rb +3 -0
  75. data/app/models/message.rb +76 -0
  76. data/app/models/questionnaire.rb +166 -0
  77. data/app/models/schedule.rb +53 -0
  78. data/app/models/school.rb +31 -0
  79. data/app/models/school_name_duplicate.rb +7 -0
  80. data/app/models/user.rb +52 -0
  81. data/app/views/application/_bus_list_info.html.haml +20 -0
  82. data/app/views/application/_bus_list_stats.html.haml +9 -0
  83. data/app/views/application/_questionnaire_summary.html.haml +54 -0
  84. data/app/views/bus_lists/show.html.haml +45 -0
  85. data/app/views/devise/passwords/_form.html.haml +9 -0
  86. data/app/views/devise/passwords/edit.html.haml +14 -0
  87. data/app/views/devise/passwords/new.html.haml +5 -0
  88. data/app/views/devise/registrations/_form.html.haml +8 -0
  89. data/app/views/devise/registrations/edit.html.haml +20 -0
  90. data/app/views/devise/registrations/new.html.haml +18 -0
  91. data/app/views/devise/sessions/_form.html.haml +8 -0
  92. data/app/views/devise/sessions/new.html.haml +9 -0
  93. data/app/views/layouts/_shared_footer.html.haml +1 -0
  94. data/app/views/layouts/_sidebar.html.haml +22 -0
  95. data/app/views/layouts/blank.html.haml +12 -0
  96. data/app/views/layouts/dayof.html.haml +12 -0
  97. data/app/views/layouts/hackathon_manager.html.haml +12 -0
  98. data/app/views/layouts/mailer.html.erb +51 -0
  99. data/app/views/layouts/manage/application.html.haml +26 -0
  100. data/app/views/mailer/_getting_there.html.erb +14 -0
  101. data/app/views/mailer/_questions.html.erb +2 -0
  102. data/app/views/mailer/accepted_email.html.erb +13 -0
  103. data/app/views/mailer/application_confirmation_email.html.erb +13 -0
  104. data/app/views/mailer/bulk_message_email.html.erb +1 -0
  105. data/app/views/mailer/bulk_templates/_default.html.erb +1 -0
  106. data/app/views/mailer/bus_captain_confirmation_email.html.erb +12 -0
  107. data/app/views/mailer/bus_list_update_email.html.erb +7 -0
  108. data/app/views/mailer/denied_email.html.erb +5 -0
  109. data/app/views/mailer/incomplete_reminder_email.html.erb +6 -0
  110. data/app/views/mailer/rsvp_confirmation_email.html.erb +8 -0
  111. data/app/views/mailer/slack_invite_email.html.erb +10 -0
  112. data/app/views/manage/admins/_form.html.haml +18 -0
  113. data/app/views/manage/admins/edit.html.haml +12 -0
  114. data/app/views/manage/admins/index.html.haml +15 -0
  115. data/app/views/manage/admins/new.html.haml +8 -0
  116. data/app/views/manage/admins/show.html.haml +17 -0
  117. data/app/views/manage/bus_lists/_form.html.haml +14 -0
  118. data/app/views/manage/bus_lists/edit.html.haml +8 -0
  119. data/app/views/manage/bus_lists/index.html.haml +26 -0
  120. data/app/views/manage/bus_lists/new.html.haml +6 -0
  121. data/app/views/manage/bus_lists/show.html.haml +92 -0
  122. data/app/views/manage/dashboard/index.html.haml +64 -0
  123. data/app/views/manage/dashboard/map_data.tsv.erb +48 -0
  124. data/app/views/manage/messages/_form.html.haml +15 -0
  125. data/app/views/manage/messages/edit.html.haml +10 -0
  126. data/app/views/manage/messages/index.html.haml +17 -0
  127. data/app/views/manage/messages/new.html.haml +8 -0
  128. data/app/views/manage/messages/show.html.haml +50 -0
  129. data/app/views/manage/questionnaires/_form.html.haml +54 -0
  130. data/app/views/manage/questionnaires/edit.html.haml +12 -0
  131. data/app/views/manage/questionnaires/index.html.haml +36 -0
  132. data/app/views/manage/questionnaires/new.html.haml +8 -0
  133. data/app/views/manage/questionnaires/show.html.haml +63 -0
  134. data/app/views/manage/schools/_form.html.haml +16 -0
  135. data/app/views/manage/schools/edit.html.haml +12 -0
  136. data/app/views/manage/schools/index.html.haml +18 -0
  137. data/app/views/manage/schools/merge.html.haml +35 -0
  138. data/app/views/manage/schools/new.html.haml +8 -0
  139. data/app/views/manage/schools/show.html.haml +52 -0
  140. data/app/views/manage/stats/index.html.haml +55 -0
  141. data/app/views/questionnaires/_form.html.haml +70 -0
  142. data/app/views/questionnaires/edit.html.haml +10 -0
  143. data/app/views/questionnaires/new.html.haml +7 -0
  144. data/app/views/questionnaires/show.html.haml +30 -0
  145. data/app/views/rsvps/show.html.haml +61 -0
  146. data/app/workers/bulk_message_worker.rb +86 -0
  147. data/app/workers/slack_invite_worker.rb +49 -0
  148. data/config/blazer.yml +56 -0
  149. data/config/initializers/ajax_datatables_rails.rb +7 -0
  150. data/config/initializers/chartkick.rb +4 -0
  151. data/config/initializers/devise.rb +265 -0
  152. data/config/initializers/hackathon.rb +9 -0
  153. data/config/initializers/mime_types.rb +5 -0
  154. data/config/initializers/new_framework_defaults.rb +20 -0
  155. data/config/initializers/sidekiq.rb +11 -0
  156. data/config/initializers/simple_form.rb +164 -0
  157. data/config/initializers/static_data.rb +7 -0
  158. data/config/initializers/wrap_parameters.rb +14 -0
  159. data/config/routes.rb +74 -0
  160. data/db/migrate/20141011210642_create_participants.rb +18 -0
  161. data/db/migrate/20141029055313_create_schools.rb +12 -0
  162. data/db/migrate/20150104071608_add_shirt_and_dietary_medical_to_participants.rb +6 -0
  163. data/db/migrate/20150104190233_add_attachment_resume_to_participants.rb +13 -0
  164. data/db/migrate/20150110020958_add_international_to_participants.rb +5 -0
  165. data/db/migrate/20150110215933_change_participants_to_registration.rb +5 -0
  166. data/db/migrate/20150110222214_create_users.rb +5 -0
  167. data/db/migrate/20150110222455_add_portfolio_and_vcs_urls_to_registrations.rb +6 -0
  168. data/db/migrate/20150110222655_add_devise_to_users.rb +48 -0
  169. data/db/migrate/20150111000224_change_resgistrations_to_questionnaire.rb +5 -0
  170. data/db/migrate/20150111012709_add_questionnaire_ref_to_users.rb +8 -0
  171. data/db/migrate/20150113205638_add_amin_to_users.rb +5 -0
  172. data/db/migrate/20150113233730_add_questionnaire_count_to_schools.rb +12 -0
  173. data/db/migrate/20150125213100_set_default_admin_value.rb +17 -0
  174. data/db/migrate/20150216232155_add_agreement_accepted_to_questionnaires.rb +5 -0
  175. data/db/migrate/20150218051450_add_admin_read_only_to_users.rb +5 -0
  176. data/db/migrate/20150221165513_create_messages.rb +15 -0
  177. data/db/migrate/20150225235817_add_status_to_user.rb +7 -0
  178. data/db/migrate/20150302011457_create_fips.rb +11 -0
  179. data/db/migrate/20150326031423_add_template_to_message.rb +5 -0
  180. data/db/migrate/20150410175056_create_bus_lists.rb +12 -0
  181. data/db/migrate/20150411161432_add_capacity_notes_captain_to_bus_lists.rb +8 -0
  182. data/db/migrate/20150415165844_add_is_bus_captain_to_questionnaire.rb +5 -0
  183. data/db/migrate/20150415181114_add_check_in_data_to_questionnaire.rb +8 -0
  184. data/db/migrate/20151224015223_change_read_only_user_to_limited.rb +5 -0
  185. data/db/migrate/20160110012217_add_code_of_conduct_accepted_to_questionnaire.rb +5 -0
  186. data/db/migrate/20160110222639_add_omniauth_to_users.rb +8 -0
  187. data/db/migrate/20160111020817_update_questionnaire_for_my_mlh.rb +14 -0
  188. data/db/migrate/20160112222137_add_option_for_alt_travel_to_questionnaire.rb +6 -0
  189. data/db/migrate/20160208061253_rename_can_share_resume_to_info.rb +5 -0
  190. data/db/migrate/20161020032736_remove_resume_from_questionnaires.rb +14 -0
  191. data/db/migrate/20161024145452_add_data_sharing_to_questionnaire.rb +5 -0
  192. data/db/migrate/20161206073921_rename_graduation_to_level_of_study.rb +6 -0
  193. data/db/migrate/20161206084722_add_reminder_sent_at_to_users.rb +5 -0
  194. data/db/migrate/20161208055809_add_attachment_resume_to_questionnaires.rb +11 -0
  195. data/db/migrate/20161212030010_add_interest_to_questionnaire.rb +5 -0
  196. data/db/migrate/20170107210122_create_school_name_duplicates.rb +10 -0
  197. data/db/migrate/20170128063020_install_blazer.rb +45 -0
  198. data/db/schools.csv +1 -0
  199. data/db/seeds.rb +17 -0
  200. data/lib/hackathon_manager/engine.rb +35 -0
  201. data/lib/hackathon_manager/version.rb +3 -0
  202. data/lib/hackathon_manager.rb +5 -0
  203. data/lib/tasks/coverage.rake +14 -0
  204. data/lib/tasks/hackathon_manager_tasks.rake +4 -0
  205. metadata +667 -0
@@ -0,0 +1,26 @@
1
+ !!! 5
2
+ %html
3
+ %head
4
+ %title= yield(:title) || "Manage - BrickHack"
5
+ = stylesheet_link_tag "hackathon_manager/manage", :media => "all"
6
+ = csrf_meta_tags
7
+
8
+ %body
9
+ = render "layouts/sidebar"
10
+ = javascript_include_tag "hackathon_manager/manage/application"
11
+ = render "layouts/shared_footer"
12
+ #main
13
+ #manageNav
14
+ %p BrickHack Manager
15
+ = link_to "Dashboard", manage_root_path
16
+ = link_to "Questionnaires", manage_questionnaires_path
17
+ = link_to "Admins", manage_admins_path
18
+ = link_to "Messages", manage_messages_path
19
+ = link_to "Bus Lists", manage_bus_lists_path
20
+ = link_to "Schools", manage_schools_path
21
+ = link_to "Stats", manage_stats_path
22
+ - unless current_user.admin_limited_access?
23
+ \|
24
+ = link_to "Sidekiq", sidekiq_web_path
25
+ = link_to "Blazer", blazer_path
26
+ = yield
@@ -0,0 +1,14 @@
1
+ <h3>Getting There - Busses</h3>
2
+ <p>Buses are being provided to Buffalo, Binghamton, Cornell, and Albany. If you are eligible, you will be given an option to sign up on the <a href="https://brickhack.io/rsvp">RSVP form</a>. <strong>You must RSVP and sign up for the bus to guarantee a seat!</strong></p>
3
+ <p>If you live near these areas but don't see the bus sign-up option, please email <a href="mailto:travel@codeRIT.org">travel@codeRIT.org</a>.</p>
4
+ <h3>Getting There - Driving</h3>
5
+ <p>If there isn't a bus available for your school, don't fret! We encourage you to carpool with others from your school.</p>
6
+ <p><strong>A car pool list</strong> is available at the below link. If you're driving and would be open to taking a few more attendees with you, please list yourself!</p>
7
+ <% raise 'Carpool link missing' if ENV['CARPOOL_LINK'].blank? %>
8
+ <p><%= link_to ENV['CARPOOL_LINK'], ENV['CARPOOL_LINK'] %></p>
9
+ <p>For those driving, you can put <em>1 Lomb Memorial Drive, Rochester, NY 14623</em> into your GPS. This will take you to the main RIT entrance, which will include a roundabout. Take the third exit off the roundabout and park in either lot to your left or right.</p>
10
+ <p><em>Unfortunately we are unable to provide travel reimbursements due to university policy.</em></p>
11
+ <% if asset_available? 'brickhack-parking.png' %>
12
+ <p><%= link_to image_tag('brickhack-parking.png', width: '400px').html_safe, image_url('brickhack-parking.png') %></p>
13
+ <p><%= link_to 'Full-size Image &raquo;'.html_safe, image_url('brickhack-parking.png') %></p>
14
+ <% end %>
@@ -0,0 +1,2 @@
1
+ <h3>Questions?</h3>
2
+ <p>If you have any questions, please check out our <a href="https://brickhack.io/#faq" target="_blank">FAQ</a>. You can also email <a href="mailto:travel@codeRIT.org">travel@codeRIT.org</a> with travel-related questions, or <a href="mailto:hello@codeRIT.org">hello@codeRIT.org</a> with general questions.</p>
@@ -0,0 +1,13 @@
1
+ <h2>Congratulations <%= @questionnaire.first_name %>, you're in!</h2>
2
+ <p>You have been accepted to attend BrickHack! Please RSVP:</p>
3
+ <p>
4
+ <a href="https://brickhack.io/rsvp/accept" class="button" target="_blank">Yes, I will Attend &raquo;</a>
5
+ <a href="https://brickhack.io/rsvp/deny" class="button" target="_blank">No, I Can't Attend &raquo;</a>
6
+ <br>
7
+ <small><i>Link not working? Go to <a href="https://brickhack.io/rsvp">brickhack.io/rsvp</a></i></small>
8
+ </p>
9
+ <p>Make sure to tell your family because they will be super proud of your accomplishment. It is time to get excited for a weekend long journey. Learn new things, meet new people from across North America, and create cool stuff. BrickHack will be taking place <strong>February 11th and 12th</strong> of this year at<br><br/><strong>Rochester Institute of Technology<br>Clark Gym<br>1 Lomb Memorial Dr<br>Rochester, NY 14623</strong></p>
10
+ <%= render 'getting_there' %>
11
+ <h3>More info to come!</h3>
12
+ <p>We will be sending out more logistics information closer to BrickHack. Please RSVP to guarantee you get this information, and keep an eye out the week of February 6th!</p>
13
+ <%= render 'questions' %>
@@ -0,0 +1,13 @@
1
+ <h2 class="center">
2
+ Thanks for Applying!
3
+ </h2>
4
+
5
+ <p>Hey <%= @questionnaire.first_name %>,</p>
6
+ <p>We've received your application to BrickHack 3! You'll be notified of your acceptance status in January.</p>
7
+ <p>If needed, you can edit your information by clicking the button below.</p>
8
+ <%= link_to questionnaires_url, class: 'button' do %>
9
+ My Profile
10
+ <% end %>
11
+ <% count = @questionnaire.school.questionnaires.count %>
12
+ <p>In the meantime, <strong>invite your friends!</strong> Hacking is always fun as a team.</p>
13
+ <p>Only <%= count == 1 ? '1 person has' : "#{count} people have" %> applied from <%= @questionnaire.school.name %> - spread the word!</p>
@@ -0,0 +1 @@
1
+ <%= render partial: "mailer/bulk_templates/#{@message.template}" %>
@@ -0,0 +1 @@
1
+ <%= markdown(@message.body) %>
@@ -0,0 +1,12 @@
1
+ <h2>You're a bus captain!</h2>
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 &amp; off the bus, but coordinating busses isn't that easy. Thanks to you, this bus to BrickHack can be a success!</p>
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
+ <p>
6
+ <a href="https://brickhack.io/bus_list" class="button" target="_blank">Bus List &raquo;</a>
7
+ <br>
8
+ <small><i>Link not working? Go to <a href="https://brickhack.io/bus_list">brickhack.io/bus_list</a></i></small>
9
+ </p>
10
+ <p>This will be the central source of truth for passengers &amp; 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 BrickHack 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 to <a href="mailto:travel@codeRIT.org">travel@codeRIT.org</a>. We can't wait to see you at BrickHack!</p>
@@ -0,0 +1,7 @@
1
+ <h1>Bus Update</h1>
2
+ <p>Hey <%= @questionnaire.first_name %>,</p>
3
+ <p>There's been an update to your bus - see below!</p>
4
+ <p>As always, up-to-date bus info &amp; captains are available at <a href="https://brickhack.io/rsvp">brickhack.io/rsvp</a>.</p>
5
+ <hr />
6
+ <%= markdown(@bus_list.notes) %>
7
+
@@ -0,0 +1,5 @@
1
+ <h3>Dear <%= @questionnaire.first_name %>,</h3>
2
+ <p>It is with our sincerest regret to inform you that our admissions committee has chosen to not accept your application to BrickHack at this time. We were overjoyed with the number of applicants we received (over 1,200!), but unfortunately we can not accept everyone due to capacity for only 400.<p>
3
+ <p>We invite you to apply again next year. There are plenty of other hackathons this season, and it may not be too late to apply for those. Checkout <a href="https://mlh.io" target="_blank">https://mlh.io</a> to find out more information.</p>
4
+ <p>Thank you for applying,<br>
5
+ - The BrickHack Team</p>
@@ -0,0 +1,6 @@
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 BrickHack-specific questions.</p>
3
+ <p><strong>Your application will not be considered until it is completed.</strong></p>
4
+ <p>Not to worry! Just head on back to the website, <a href="https://brickhack.io/apply">brickhack.io/apply</a>, sign in with your existing My MLH account (if necessary), and complete the application.</p>
5
+ <p><a href="https://brickhack.io/apply" class="button">Finish Application »</a></p>
6
+ <p>Happy hacking!<br> - The BrickHack Team</p>
@@ -0,0 +1,8 @@
1
+ <h2>You are confirmed!</h2>
2
+ <p>This is your confirmation for BrickHack! Can't wait to see you there. In the meantime, follow us on <a href="https://www.facebook.com/brickhackrit">Facebook</a> and <a href="https://twitter.com/brickhackrit">Twitter</a> to get news and updates.</p>
3
+ <p><strong>If you can no longer attend, let us know! <a href="https://brickhack.io/rsvp/deny" target="_blank">I Can No Longer Attend &raquo;</a></strong></p>
4
+ <h3>Meet Other Hackers</h3>
5
+ <p>Join our <a href="https://www.facebook.com/groups/brickhack3attendees/" target="_blank">Facebook Group</a> to get in touch with other attendees. This will be the best way to find teammates if you don't have a team already!</p>
6
+ <%= render 'getting_there' %>
7
+ <%= render 'questions' %>
8
+ <p><strong>If you can no longer attend, let us know! <a href="https://brickhack.io/rsvp/deny" target="_blank">I Can No Longer Attend &raquo;</a></strong></p>
@@ -0,0 +1,10 @@
1
+ <% raise 'Slack invite URL missing' if ENV['SLACK_SIGNUP_URL'].blank? %>
2
+ <h1>Join Slack!</h1>
3
+ <p>Hey <%= @questionnaire.first_name %>,
4
+ <p><a href="https://slack.com/is">Slack</a> is being used as a central communication platform for BrickHack.</p>
5
+ <p>You can create private <strong>team chats</strong>, reach out to <strong>mentors</strong>, and more. Don't like notifications? Don't worry - you can <a href="https://get.slack.help/hc/en-us/articles/218074567-Customizing-notifications">customize them</a> or <a href="https://get.slack.help/hc/en-us/articles/214908388-Do-Not-Disturb-and-snooze-settings">turn them off entirely</a>.
6
+ <p style="text-align: center;">
7
+ <a href="<%= ENV['SLACK_SIGNUP_URL'] %>" class="button">Join our Slack &raquo;</a><br>
8
+ <small><i>Link not working? Go to:</i></small><br />
9
+ <small><i><%= ENV['SLACK_SIGNUP_URL'] %></i></small>
10
+ </p>
@@ -0,0 +1,18 @@
1
+ .form-container
2
+ = simple_form_for @user, url: url_for(action: @user.new_record? ? "create" : "update", controller: "admins"), html: { "data-validate" => "form" } do |f|
3
+
4
+ - if @user.new_record?
5
+ %p
6
+ If a user already exists, first delete the questionnaire in the
7
+ = link_to "questionnaires manager.", manage_questionnaires_path
8
+ - if f.error_notification.present?
9
+ #disclaimer
10
+ = f.error_notification
11
+
12
+ .form-inputs
13
+ = f.input :email, placeholder: "joe@example.com", input_html: { "data-validate" => "presence" }, required: true
14
+ = f.input :admin_limited_access, as: :formatted_boolean, label: "Limited Access"
15
+ %p Limited access prevents the admin from adding, modifying, or deleting any records. Modifications through the check-in process are allowed.
16
+
17
+ .center
18
+ = f.button :submit, value: ( @user.new_record? ? 'Create' : 'Save' )
@@ -0,0 +1,12 @@
1
+ %section.section.manage
2
+ %h1.section-title= title "Editing Admin"
3
+
4
+ = render 'form'
5
+
6
+ .form-container
7
+ .center
8
+ = link_to 'Back', manage_admins_path
9
+ \|
10
+ = link_to 'Delete', manage_admin_path(@user), method: :delete, data: { confirm: 'Are you sure? This action is irreversible.' }
11
+ \|
12
+ = link_to 'Show', manage_admin_path(@user)
@@ -0,0 +1,15 @@
1
+ %section.section.manage
2
+ %h1.section-title= title "Listing Admins"
3
+
4
+ %table.users.datatable.row-border.stripe.hover.order-column{ "data-source" => datatable_manage_admins_path(format: :json) }
5
+ %thead
6
+ %tr
7
+ %th
8
+ %th ID
9
+ %th Email
10
+ %th Access Level
11
+ %tbody
12
+
13
+ - unless current_user.admin_limited_access
14
+ %br
15
+ = btn_link_to 'New Admin', new_manage_admin_path
@@ -0,0 +1,8 @@
1
+ %section.section.manage
2
+ %h1.section-title= title "New Admin"
3
+
4
+ = render 'form'
5
+
6
+ .form-container
7
+ .center
8
+ = link_to 'Back', manage_admins_path
@@ -0,0 +1,17 @@
1
+ %section.section.manage
2
+ %h1.section-title= title "Edit Admin"
3
+
4
+ .form-container
5
+ %p#notice= notice
6
+
7
+ %p
8
+ %b Email Address:
9
+ = @user.email
10
+ %p
11
+ %b Access Level:
12
+ = @user.admin_limited_access ? "Limited Access" : "Full Access"
13
+
14
+ - unless current_user.admin_limited_access
15
+ = link_to 'Edit', edit_manage_admin_path(@user)
16
+ \|
17
+ = link_to 'Back', manage_admins_path
@@ -0,0 +1,14 @@
1
+ = simple_form_for(@bus_list, url: url_for(action: @bus_list.new_record? ? "create" : "update", controller: "bus_lists")) do |f|
2
+ = f.error_notification
3
+
4
+ .form-inputs
5
+ = f.input :name
6
+ = f.input :capacity
7
+ = f.input :needs_bus_captain
8
+ = f.input :notes, input_html: { rows: 10 }
9
+ %p
10
+ %small
11
+ %em Notes support Markdown and HTML.
12
+
13
+ .form-actions
14
+ = f.button :submit
@@ -0,0 +1,8 @@
1
+ %section.section.manage
2
+ %h1.section-title= title "Edit Bus List"
3
+
4
+ = render 'form'
5
+
6
+ = link_to 'Show', manage_bus_list_path(@bus_list)
7
+ \|
8
+ = link_to 'Back', manage_bus_list_path
@@ -0,0 +1,26 @@
1
+ %section.section.manage
2
+ %h1.section-title= title "Listing Bus Lists"
3
+
4
+ %table.table
5
+ %tr
6
+ %th Name
7
+ %th Capacity
8
+ %th Needs Captain?
9
+ %th Schools
10
+ %th Actions
11
+ %th
12
+ %th
13
+
14
+ - @bus_lists.each do |bus_list|
15
+ %tr
16
+ %td= bus_list.name
17
+ %td= "#{bus_list.passengers.count} / #{bus_list.capacity}"
18
+ %td= bus_list.needs_bus_captain ? "Yes" : "No"
19
+ %td= bus_list.schools.count
20
+ %td= link_to 'Show', manage_bus_list_path(bus_list)
21
+ %td= link_to 'Edit', edit_manage_bus_list_path(bus_list)
22
+ %td= link_to 'Destroy', manage_bus_list_path(bus_list), :method => :delete, :data => { :confirm => 'Are you sure?' }
23
+
24
+ %br
25
+
26
+ = btn_link_to 'New Bus List', new_manage_bus_list_path
@@ -0,0 +1,6 @@
1
+ %section.section.manage
2
+ %h1.section-title= title "New Bus List"
3
+
4
+ = render 'form'
5
+
6
+ = link_to 'Back', manage_bus_lists_path
@@ -0,0 +1,92 @@
1
+ %section.section.manage
2
+ %h1.section-title= title "Bus List"
3
+ %p#notice= notice
4
+
5
+ %p
6
+ %b Name:
7
+ = @bus_list.name
8
+ %p
9
+ %b Capacity:
10
+ = @bus_list.capacity
11
+ %p
12
+ %b Needs bus captain:
13
+ = @bus_list.needs_bus_captain ? "Yes" : "No"
14
+ %p
15
+ %b Schools:
16
+ %ul
17
+ - @bus_list.schools.each do |school|
18
+ %li= link_to(school.name, manage_school_path(school))
19
+
20
+ = render partial: 'bus_list_info', locals: { bus_list: @bus_list }
21
+
22
+ %p
23
+ %strong Passengers:
24
+ = "(#{@bus_list.passengers.count} total, #{@bus_list.checked_in_passengers.count} checked in)"
25
+ %table.table
26
+ %thead
27
+ %tr
28
+ %th
29
+ %th First Name
30
+ %th Last Name
31
+ %th Email
32
+ %th Phone Number
33
+ %th School
34
+ %th Checked in?
35
+ - unless current_user.admin_limited_access
36
+ %th Actions
37
+ %tbody
38
+ - @bus_list.passengers.each do |p|
39
+ %tr
40
+ %td= link_to '<i class="fa fa-search"></i>'.html_safe, manage_questionnaire_path(p)
41
+ %td= p.first_name
42
+ %td= p.last_name
43
+ %td= p.email
44
+ %td= phone_link_to p.phone
45
+ %td= link_to p.school.name, manage_school_path(p.school)
46
+ %td= p.checked_in? ? '<span class="acc-status-accepted">Yes</span>'.html_safe : 'No'
47
+ - unless current_user.admin_limited_access
48
+ %td
49
+ - if p.is_bus_captain?
50
+ = link_to "Remove Bus Captain", toggle_bus_captain_manage_bus_list_path(@bus_list, questionnaire_id: p.id, bus_captain: '0'), method: 'post'
51
+ - else
52
+ = link_to "Make Bus Captain", toggle_bus_captain_manage_bus_list_path(@bus_list, questionnaire_id: p.id, bus_captain: '1'), method: 'post', data: { confirm: 'Are you sure? This will send a confirmation email to the bus captain.' }
53
+ - if @bus_list.needs_bus_captain
54
+ %p
55
+ %strong Possible Bus Captains:
56
+ %table.table
57
+ %thead
58
+ %tr
59
+ %th
60
+ %th First Name
61
+ %th Last Name
62
+ %th Email
63
+ %th Phone Number
64
+ %th School
65
+ - unless current_user.admin_limited_access
66
+ %th Actions
67
+ %tbody
68
+ - @bus_list.passengers.select { |q| q.bus_captain_interest }.each do |p|
69
+ %tr
70
+ %td= link_to '<i class="fa fa-search"></i>'.html_safe, manage_questionnaire_path(p)
71
+ %td= p.first_name
72
+ %td= p.last_name
73
+ %td= p.email
74
+ %td= phone_link_to p.phone
75
+ %td= link_to p.school.name, manage_school_path(p.school)
76
+ - unless current_user.admin_limited_access
77
+ %td
78
+ - if p.is_bus_captain?
79
+ = link_to "Remove Bus Captain", toggle_bus_captain_manage_bus_list_path(@bus_list, questionnaire_id: p.id, bus_captain: '0'), method: 'post'
80
+ - else
81
+ = link_to "Make Bus Captain", toggle_bus_captain_manage_bus_list_path(@bus_list, questionnaire_id: p.id, bus_captain: '1'), method: 'post', data: { confirm: 'Are you sure? This will send a confirmation email to the bus captain.' }
82
+
83
+ = render partial: 'bus_list_stats', locals: { bus_list: @bus_list }
84
+
85
+ %hr
86
+
87
+ - unless current_user.admin_limited_access?
88
+ = link_to 'Edit', edit_manage_bus_list_path(@bus_list)
89
+ \|
90
+ = link_to 'Send Email Update', send_update_email_manage_bus_list_path(@bus_list), method: :patch, data: { confirm: "Are you sure? All passengers for \"#{@bus_list.name}\" will be emailed the current bus notes." }
91
+ \|
92
+ = link_to 'Back', manage_bus_lists_path
@@ -0,0 +1,64 @@
1
+ - blue = "#4886C2"
2
+ - green = "#7FEC8D"
3
+ - red = "#E44646"
4
+ - orange = "#F49C54"
5
+ - grey = "#A6A6A6"
6
+ - colors = { accepted: blue, rsvp_confirmed: green, rsvp_denied: red, pending: "#F98728", denied: "#666", waitlist: "#059", late_waitlist: "#057" }
7
+
8
+ = javascript_include_tag "hackathon_manager/vendor/d3.v3.min.js"
9
+ = javascript_include_tag "hackathon_manager/vendor/queue.v1.min.js"
10
+ = javascript_include_tag "hackathon_manager/vendor/topojson.v1.min.js"
11
+
12
+ %section.section.manage
13
+ %h1.section-title= title "Dashboard"
14
+
15
+ - if flash[:notice]
16
+ #disclaimer= flash[:notice]
17
+
18
+ .container.container-full
19
+ #map
20
+ :javascript
21
+ $('#map').initMap();
22
+
23
+ .container.container-half{ style: "width: 59%" }
24
+ %h4.dashboard-container-title Today's Activity
25
+ = area_chart todays_activity_data_manage_dashboard_index_path, colors: [blue, green, red, grey]
26
+ .container.container-half{ style: "width: 39%" }
27
+ %h4.dashboard-container-title Today's Stats
28
+ = pie_chart todays_stats_data_manage_dashboard_index_path, colors: [blue, green, red, grey]
29
+
30
+ .container.container-full
31
+ %h4.dashboard-container-title Confirmation Activity
32
+ .graph-overlay.double-metrics
33
+ %h3= Questionnaire.where("checked_in_at != 0").count
34
+ %p total checked in
35
+ %h3= Questionnaire.where(acc_status: "rsvp_confirmed").count
36
+ %p total confirmed
37
+ = area_chart confirmation_activity_data_manage_dashboard_index_path, colors: [green, red], library: { legend: { enabled: false } }
38
+
39
+ .container.container-full
40
+ %h4.dashboard-container-title Application Activity
41
+ .graph-overlay
42
+ %h3= Questionnaire.count
43
+ %p total applications
44
+ = area_chart application_activity_data_manage_dashboard_index_path, colors: [blue, orange, grey], library: { legend: { enabled: false } }
45
+
46
+ .container.container-half
47
+ %h4.dashboard-container-title User Distribution
48
+ = pie_chart user_distribution_data_manage_dashboard_index_path, colors: [grey, blue, orange]
49
+ .container.container-half
50
+ %h4.dashboard-container-title Application Distribution
51
+ = pie_chart application_distribution_data_manage_dashboard_index_path, colors: [colors[:pending], colors[:accepted], colors[:waitlisted], colors[:denied], colors[:late_waitlist], colors[:rsvp_confirmed], colors[:rsvp_denied]]
52
+
53
+ .container.container-full
54
+ %h4.dashboard-container-title Schools (Confirmed)
55
+ %ul
56
+ = bar_chart schools_confirmed_data_manage_dashboard_index_path, height: "600px", stacked: true, colors: [blue, orange]
57
+ %h4.dashboard-container-title Schools (Applied)
58
+ %ul
59
+ = bar_chart schools_applied_data_manage_dashboard_index_path, height: "600px", stacked: true, colors: [colors[:rsvp_confirmed], colors[:accepted], colors[:waitlist], colors[:late_waitlist], colors[:rsvp_denied], colors[:denied], colors[:pending]], library: { legend: { enabled: false } }
60
+ - if School.where("questionnaire_count >= 1 AND questionnaire_count < 5").count > 0
61
+ %button{ onclick: "$('#least-applied-schools').toggle()" }= "List schools with < 5 applicants"
62
+ %ul#least-applied-schools{ style: "display: none" }
63
+ - School.where("questionnaire_count >= 1 AND questionnaire_count < 5").select([:name, :questionnaire_count]).order("questionnaire_count DESC").each do |school|
64
+ %li= "#{school.questionnaire_count} - #{school.name}"
@@ -0,0 +1,48 @@
1
+ <% cache(cache_key_for_questionnaires) do %>
2
+ <%= "id\tapps" %>
3
+ <%
4
+ counties = {}
5
+ amount = 1
6
+ @schools.each do |school|
7
+
8
+ require 'net/http'
9
+
10
+ if school.fips_code.blank?
11
+
12
+ next if school.city.blank? || school.state.blank?
13
+
14
+ url = "http://maps.googleapis.com/maps/api/geocode/json?address=#{CGI.escape(school.city)}+#{CGI.escape(school.state)}&sensor=true"
15
+ resp = Net::HTTP.get_response(URI.parse(url)) # get_response takes an URI object
16
+ results = JSON.parse(resp.body)["results"][0]
17
+
18
+ if results.blank?
19
+ redo
20
+ end
21
+
22
+ lat = results["geometry"]["location"]["lat"]
23
+ lng = results["geometry"]["location"]["lng"]
24
+
25
+ next if lat.blank? || lng.blank?
26
+
27
+ url = "http://data.fcc.gov/api/block/find?format=json&latitude=#{lat}&longitude=#{lng}&showall=true"
28
+ resp = Net::HTTP.get_response(URI.parse(url)) # get_response takes an URI object
29
+ fips = JSON.parse(resp.body)["County"]["FIPS"]
30
+
31
+ next if fips.blank?
32
+
33
+ Fips.create(fips_code: fips, city: school.city, state: school.state)
34
+
35
+ else
36
+ fips = school.fips_code.fips_code
37
+ end
38
+
39
+ counties[fips] ||= 0
40
+ counties[fips] += amount * school.questionnaire_count
41
+ end
42
+
43
+ output = ""
44
+ counties.each do |county, value|
45
+ output += "#{county}\t#{value}\n"
46
+ end %>
47
+ <%= output %>
48
+ <% end %>
@@ -0,0 +1,15 @@
1
+ = simple_form_for @message, url: url_for(action: @message.new_record? ? "create" : "update", controller: "messages") do |f|
2
+ = f.error_notification
3
+
4
+ .form-inputs
5
+ = f.input :name
6
+ = f.input :subject, hint: "All emails are from \"BrickHack\""
7
+ = f.input :template, as: :select, collection: Message::POSSIBLE_TEMPLATES.map { |x| [x.titleize, x] }, include_blank: false
8
+ = f.input :recipients, as: :select, collection: Message::POSSIBLE_RECIPIENTS.invert, input_html: { class: "selectize", multiple: true }
9
+ = f.input :body, input_html: { rows: 10 }
10
+ %p
11
+ %small
12
+ %em Markdown and HTML supported. codeRIT & BrickHack info will be appended to the email body.
13
+
14
+ .form-actions
15
+ = f.button :submit
@@ -0,0 +1,10 @@
1
+ %section.section.manage
2
+ %h1.section-title= title "Editing Message"
3
+
4
+ = render 'form'
5
+
6
+ .form-container
7
+ .center
8
+ = link_to 'Show', manage_message_path(@message)
9
+ \|
10
+ = link_to 'Back', manage_messages_path
@@ -0,0 +1,17 @@
1
+ %section.section.manage
2
+ %h1.section-title= title "Listing Messages"
3
+
4
+ %table.messages.datatable.row-border.stripe.hover.order-column{ "data-source" => datatable_manage_messages_path(format: :json) }
5
+ %thead
6
+ %tr
7
+ %th
8
+ %th ID
9
+ %th Name
10
+ %th Subject
11
+ %th Status
12
+ %tbody
13
+
14
+ %br
15
+
16
+ - unless current_user.admin_limited_access
17
+ = btn_link_to 'New Message', new_manage_message_path
@@ -0,0 +1,8 @@
1
+ %section.section.manage
2
+ %h1.section-title= title "New Message"
3
+
4
+ = render 'form'
5
+
6
+ .form-container
7
+ .center
8
+ = link_to 'Back', manage_messages_path
@@ -0,0 +1,50 @@
1
+ %section.section.manage
2
+ %h1.section-title= title "Message"
3
+ %p#notice= notice
4
+
5
+ %p
6
+ %b Name:
7
+ = @message.name
8
+ %p
9
+ %b Subject:
10
+ = @message.subject
11
+ %p
12
+ %b Template:
13
+ = @message.template.titleize
14
+ %p
15
+ %b Recipients:
16
+ = @message.recipients_list
17
+ %p
18
+ %b Preview:
19
+ = link_to "Open full preview &raquo;".html_safe, preview_manage_message_path
20
+
21
+ %iframe.email-preview{src: preview_manage_message_path(@message)}
22
+
23
+ %p
24
+ %b
25
+ Status:
26
+ = @message.status.titleize
27
+ %p
28
+ %b Queued At:
29
+ = @message.queued_at || "(n/a)"
30
+ %p
31
+ %b Started At:
32
+ = @message.started_at || "(n/a)"
33
+ %p
34
+ %b Delivered At:
35
+ = @message.delivered_at || "(n/a)"
36
+
37
+ %hr
38
+
39
+ - unless current_user.admin_limited_access
40
+ - if @message.status == "drafted"
41
+ = btn_link_to 'Deliver', deliver_manage_message_path(@message), method: :patch, data: { confirm: "Are you sure? The message \"#{@message.name}\" will be sent out to all recipients." }
42
+ \|
43
+ - if @message.can_edit?
44
+ = link_to 'Edit', edit_manage_message_path(@message)
45
+ \|
46
+ = 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." }
47
+ \|
48
+ = link_to 'Duplicate', duplicate_manage_message_path(@message), method: :patch
49
+ \|
50
+ = link_to 'Back', manage_messages_path