Skip to content

Commit 229fed5

Browse files
committed
Minor changes
1 parent 47e98a0 commit 229fed5

File tree

5 files changed

+27
-24
lines changed

5 files changed

+27
-24
lines changed

app/assets/stylesheets/application.css

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

222-
#infoforcoaches {
222+
#info-for-coaches {
223223
background-color: #e7f6fd;
224224
text-align: center;
225225
border: thin solid #1e64b4;

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 %> <%= @event.installation_get_together_date.strftime("%d.%m.") %> & <%= l @event.scheduled_at %> </h1>
1+
<h1><%= @event.name %> <%= l @event.installation_get_together_date, format: :short %> & <%= l @event.scheduled_at %> </h1>
22

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

app/views/coach_applications/new.html.erb

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
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>
1+
<h1><%= @event.name %> <%= l @event.installation_get_together_date, format: :short %> & <%= l @event.scheduled_at %> </h1>
2+
<section id="info-for-coaches">
3+
<h3>Dear code curious (former Rails Girls Berlin) coaches,</h3>
44
<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") %>,
5+
<div>
6+
<p><b>When:</b></p>
7+
<p>Coach the coaches:
8+
<%= l @event.coach_the_coaches_date, format: :long %>,
9+
<%= l @event.coach_the_coaches_start_time, format: :short %> -
10+
<%= l @event.coach_the_coaches_end_time, format: :short %></p>
11+
<p>Installation get-together:
12+
<%= l @event.installation_get_together_date, format: :long %>,
13+
<%= l @event.installation_get_together_start_time, format: :short %> -
14+
<%= l @event.installation_get_together_end_time, format: :short %></p>
15+
<p>Workshop day:
16+
<%= l @event.scheduled_at, format: :long %>,
1717
<%= @event.start_time %> -
18-
<%= @event.end_time %>
19-
</p>
20-
<p>
21-
<b>Where for all events:</b><br>
18+
<%= @event.end_time %></p>
19+
</div>
20+
<div>
21+
<p><b>Where for all events:</b></p>
2222
<%= @event.place %>
23-
</p>
23+
</div>
2424
</section>
2525

2626
<%= form_for [@event, @coach_application] do |f| %>

config/locales/en.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,12 @@ en:
3434
date:
3535
formats:
3636
default: "%d.%m.%Y"
37+
short: "%d.%m."
38+
long: "%A, %d.%m.%Y"
3739
time:
3840
formats:
3941
date: "%d.%m.%Y"
42+
short: "%H:%M"
4043
activerecord:
4144
attributes:
4245
application/state:

test/controllers/applications_controller_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ class ApplicationsControllerTest < ActionDispatch::IntegrationTest
1111
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 #{13.days.from_now.strftime("%d.%m.")} & #{2.weeks.from_now.strftime("%d.%m.%Y")}"
14+
assert_select "h1", "Test Me #{i10n.l 13.days.from_now, format: :short} & #{i18n.l 2.weeks.from_now}"
1515
end
1616

1717
test "Get an event on the day the application period starts" do
1818
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 #{13.days.from_now.strftime("%d.%m.")} & #{2.weeks.from_now.strftime("%d.%m.%Y")}"
21+
assert_select "h1", "Test Me #{i10n.l 13.days.from_now, format: :short} & #{i18n.l 2.weeks.from_now}"
2222
end
2323

2424
test "Get an event before application starts" do

0 commit comments

Comments
 (0)