Skip to content

Commit

Permalink
change wording and make form more stylish
Browse files Browse the repository at this point in the history
  • Loading branch information
grosser committed Mar 12, 2011
1 parent 4646f9d commit d90ae0a
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 22 deletions.
2 changes: 1 addition & 1 deletion app/helpers/strikes_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module StrikesHelper
def strike_summary(strike)
"#{strike.organisation} Streik vom #{d strike.start_on} bis #{d strike.end_on}"
"#{strike.organisation}: bestreikt vom #{d strike.start_on} bis #{d strike.end_on}"
end
end
38 changes: 20 additions & 18 deletions app/views/strikes/_form.erb
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
<table>
<tr>
<td>Es streikt</td>
<td><%= f.text_field :organisation %></td>
</tr>
<tr>
<td>Erster Tag</td>
<td><%= date_text_field f, :start_on %></td>
</tr>
<tr>
<td>Letzter Tag</td>
<td><%= date_text_field f, :end_on %></td>
</tr>
<tr>
<td>Kommentar</td>
<td><%= f.text_area :comment, :size => '40x3' %></td>
</tr>
</table>
<label>Es wird bestreikt</label>
<%= f.text_field :organisation %><br/>

<div>
<div class="date_wrapper">
<label>Erster Tag</label>
<%= date_text_field f, :start_on %><br/>
</div>
<div class="date_wrapper">
<label>Letzter Tag</label>
<%= date_text_field f, :end_on %><br/>
</div>
<%= clearer %>
</div>

<label>Folgen </label>
<div class="label_details">
(z.B. Zugausfälle in Berlin von 9:00 bis 10:00)
</div>
<%= f.text_area :comment, :size => '60x5' %><br/>
2 changes: 1 addition & 1 deletion app/views/strikes/edit.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h1>Streik ändern</h1>

<% form_for @strike do |f| %>
<% form_for @strike, :html => {:class => "full_form"} do |f| %>
<%= render 'form', :f => f %>
<%= submit_tag 'Ändern' %>
<% end %>
2 changes: 1 addition & 1 deletion app/views/strikes/new.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h1>Neuen Streik eintragen</h1>

<% form_for @strike do |f| %>
<% form_for @strike, :html => {:class => "full_form"} do |f| %>
<%= render 'form', :f => f %>
<%= submit_tag 'Streik eintragen' %>
<% end %>
29 changes: 28 additions & 1 deletion public/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body {
}

h1{
font-size: 20px;
font-size: 25px;
margin: 5px 0;
padding: 2px 5px 5px 5px;
background: white;
Expand All @@ -34,6 +34,10 @@ table.top_aligned td{
vertical-align: top;
}

input{
font-size: 20px;
}

#title{
font-family: Verdana, sans-serif;
font-size: 100px;
Expand Down Expand Up @@ -116,3 +120,26 @@ table.top_aligned td{
/* For IE 5.5 - 7 */
filter: progid:DXImageTransform.Microsoft.Shadow(Strength=20, Direction=135, Color='#000000');
}

.full_form label{
margin-top: 12px;
display: block;
font-size: 20px;
}

.full_form input{
font-size: 20px;
}

.full_form input[type=submit]{
margin-top: 20px;
}

.full_form .datepicker{
width: 120px;
}

.full_form .date_wrapper{
width: 160px;
float: left;
}

0 comments on commit d90ae0a

Please sign in to comment.