Skip to content

Commit f6e40b1

Browse files
committed
Add coach application improvements closes #243
1 parent 0cc8118 commit f6e40b1

File tree

8 files changed

+71
-11
lines changed

8 files changed

+71
-11
lines changed

app/assets/stylesheets/application.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,13 @@ input[type=submit].button_link {
219219
margin-top: 100px;
220220
}
221221

222+
#infoforcoaches {
223+
background-color: #e7f6fd;
224+
text-align: center;
225+
border: thin solid #1e64b4;
226+
color: #1e64b4;
227+
}
228+
222229
/*Table*/
223230

224231
table {

app/views/applications/_info.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<h1><%= @event.name %> <%= l @event.scheduled_at %> </h1>
1+
<h1><%= @event.name %> <%= @event.installation_get_together_date.strftime("%d.%m.") %> & <%= l @event.scheduled_at %> </h1>
22

33
<article>
44
<% if @application.nil? || @application.errors.empty? %>

app/views/coach_applications/new.html.erb

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,64 @@
1+
<h1><%= @event.name %> <%= @event.installation_get_together_date.strftime("%d.%m.") %> & <%= l @event.scheduled_at %> </h1>
2+
<section id="infoforcoaches">
3+
<h4>Dear code curious (former Rails Girls Berlin) coaches,</h4>
4+
<p>We are looking for helping hands for our next <%= @event.name %>.</p>
5+
<p>
6+
<b>When:</b><br>
7+
Coach the coaches:
8+
<%= @event.coach_the_coaches_date.strftime("%A, %d.%m.%Y") %>,
9+
<%= @event.coach_the_coaches_start_time.strftime("%H:%M") %> -
10+
<%= @event.coach_the_coaches_end_time.strftime("%H:%M") %><br>
11+
Installation get-together:
12+
<%= @event.installation_get_together_date.strftime("%A, %d.%m.%Y") %>,
13+
<%= @event.installation_get_together_start_time.strftime("%H:%M") %> -
14+
<%= @event.installation_get_together_end_time.strftime("%H:%M") %><br>
15+
Workshop day:
16+
<%= @event.scheduled_at.strftime("%A, %d.%m.%Y") %>,
17+
<%= @event.start_time %> -
18+
<%= @event.end_time %>
19+
</p>
20+
<p>
21+
<b>Where for all events:</b><br>
22+
<%= @event.place %>
23+
</p>
24+
</section>
25+
126
<%= form_for [@event, @coach_application] do |f| %>
227
<h2>I can help on the</h2>
328
<p class="note">Please select one or both.</p>
429
<p>
530
<%= f.check_box :installationparty %>
6-
<%= f.label(:installationparty, "installation party") %>
31+
<%= f.label(:installationparty, "installation get-together") %>
732
</p>
833
<p>
934
<%= f.check_box :workshopday %>
1035
<%= f.label(:workshopday, "workshop day") %>
1136
</p>
1237
<h2>Are you coaching for the first time?</h2>
38+
<p class="note">First-time coach = someone who has never coached at a code curious or Rails Girls Berlin beginner workshop.</p>
1339
<p>
1440
<%= f.check_box :first_time_coaching %>
15-
<%= f.label(:first_time_coaching, "yes, coaching for the first time") %>
41+
<%= f.label(:first_time_coaching, "Yes, I'm coaching for the first time.") %>
1642
</p>
1743
<h2>Would you like to give a lightning talk? What topic do you have in mind?</h2>
18-
<p class="note">The talk should be understandable for beginners and no longer than 5 minutes.</p>
44+
<p class="note">
45+
The talk should be understandable for beginners and no longer than 5 minutes.
46+
We especially welcome more inspirational talks, from women/under-represented groups in tech.
47+
This could be about what got you into tech or what cool projects you've done or are interested in doing.
48+
</p>
1949
<p>
2050
<%= f.text_field :lightningtalk %>
2151
</p>
52+
<h2>Will you attend the coach the coaches?</h2>
53+
<p class="note">This is to help and familiarize you with the topics of the workshop. We suggest every coach be present, especially first-time coaches.</p>
54+
<p>
55+
<%= f.check_box :coach_the_coaches %>
56+
<%= f.label(:coach_the_coaches, "Yes, I will attend the coach-the-coaches workshop.") %>
57+
</p>
58+
<h2>Is your company interested in sponsoring code curious?</h2>
59+
<p>
60+
<%= f.text_field :sponsor %>
61+
</p>
2262
<h2>Notes</h2>
2363
<p class="note">including if you would like to help the organizers on the day or even become an organizer in the future</p>
2464
<p>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class AddCoachTheCoachesToCoachApplications < ActiveRecord::Migration[5.2]
2+
def change
3+
add_column :coach_applications, :coach_the_coaches, :boolean, default: false
4+
end
5+
end
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class AddSponsorToCoachApplications < ActiveRecord::Migration[5.2]
2+
def change
3+
add_column :coach_applications, :sponsor, :string
4+
end
5+
end

db/schema.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
# It's strongly recommended that you check this file into your version control system.
1212

13-
ActiveRecord::Schema.define(version: 2020_02_17_195541) do
13+
ActiveRecord::Schema.define(version: 2020_02_22_150918) do
1414

1515
# These are extensions that must be enabled in order to support this database
1616
enable_extension "plpgsql"
@@ -52,6 +52,8 @@
5252
t.boolean "lightningtalk_approved", default: false
5353
t.datetime "contacted_at"
5454
t.boolean "first_time_coaching", default: false
55+
t.boolean "coach_the_coaches", default: false
56+
t.string "sponsor"
5557
t.index ["coach_id"], name: "index_coach_applications_on_coach_id"
5658
t.index ["event_id"], name: "index_coach_applications_on_event_id"
5759
end

test/controllers/applications_controller_test.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,28 @@ class ApplicationsControllerTest < ActionDispatch::IntegrationTest
88
end
99

1010
test "Get an event on the day the application period ends" do
11-
event = create(:event, name: "Test Me", place: "Testing", scheduled_at: 2.weeks.from_now, application_start: Date.yesterday, application_end: Date.today, confirmation_date: 12.days.from_now)
11+
event = create(:event, name: "Test Me", place: "Testing", installation_get_together_date: 13.days.from_now, scheduled_at: 2.weeks.from_now, application_start: Date.yesterday, application_end: Date.today, confirmation_date: 12.days.from_now)
1212
get "/events/#{event.id}/applications/new"
1313
assert_response 200
14-
assert_select "h1", "Test Me #{2.weeks.from_now.strftime("%d.%m.%Y")}"
14+
assert_select "h1", "Test Me #{13.days.from_now.strftime("%d.%m.")} & #{2.weeks.from_now.strftime("%d.%m.%Y")}"
1515
end
1616

1717
test "Get an event on the day the application period starts" do
18-
event = create(:event, name: "Test Me", place: "Testing", scheduled_at: 2.weeks.from_now, application_start: Date.today, application_end: Date.tomorrow, confirmation_date: 12.days.from_now)
18+
event = create(:event, name: "Test Me", place: "Testing", installation_get_together_date: 13.days.from_now, scheduled_at: 2.weeks.from_now, application_start: Date.today, application_end: Date.tomorrow, confirmation_date: 12.days.from_now)
1919
get "/events/#{event.id}/applications/new"
2020
assert_response 200
21-
assert_select "h1", "Test Me #{2.weeks.from_now.strftime("%d.%m.%Y")}"
21+
assert_select "h1", "Test Me #{13.days.from_now.strftime("%d.%m.")} & #{2.weeks.from_now.strftime("%d.%m.%Y")}"
2222
end
2323

2424
test "Get an event before application starts" do
25-
event = create(:event, name: "Test Me", place: "Testing", scheduled_at: 2.weeks.from_now, application_start: 2.days.from_now, application_end: 10.days.from_now, confirmation_date: 12.days.from_now)
25+
event = create(:event, name: "Test Me", place: "Testing", installation_get_together_date: 13.days.from_now, scheduled_at: 2.weeks.from_now, application_start: 2.days.from_now, application_end: 10.days.from_now, confirmation_date: 12.days.from_now)
2626
get "/events/#{event.id}/applications/new"
2727
assert_response 200
2828
assert_select "h3", /Hi, early bird!/
2929
end
3030

3131
test "Get an event after application ends" do
32-
event = create(:event, name: "Test Me", place: "Testing", scheduled_at: 2.weeks.from_now, application_start: 10.days.ago, application_end: 1.day.ago, confirmation_date: 5.days.from_now)
32+
event = create(:event, name: "Test Me", place: "Testing", installation_get_together_date: 13.days.from_now, scheduled_at: 2.weeks.from_now, application_start: 10.days.ago, application_end: 1.day.ago, confirmation_date: 5.days.from_now)
3333
get "/events/#{event.id}/applications/new"
3434
assert_response 200
3535
assert_select "p", /The application period for this workshop has already ended./

test/factories.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
application_start { Time.now }
1818
application_end { Time.now }
1919
confirmation_date { Time.now }
20+
installation_get_together_date { Time.now }
2021
scheduled_at { Time.now }
2122
start_time { "10:00" }
2223
end_time { "18:00" }

0 commit comments

Comments
 (0)