view improvements
- A exercisetracker/trunk/app/views/exercises/_exercise.html.erb
- M exercisetracker/trunk/app/views/activities/_form.html.erb view
- M exercisetracker/trunk/app/views/activities/show.html.erb view
- M exercisetracker/trunk/app/views/exercises/_form.html.erb view
- M exercisetracker/trunk/app/views/exercises/show.html.erb view
- M exercisetracker/trunk/public/stylesheets/scaffold.css view
| 16 | 31 | |
|---|---|---|
| 13 | 13 | <label><%= form.check_box :use_duration %> use duration</label><br /> |
| 14 | 14 | <label><%= form.check_box :use_weight %> use weight</label><br /> |
| 15 | 15 | <label><%= form.check_box :use_distance %> use distance</label> |
| 16 | </p> | |
| 17 | ||
| 18 | <p> | |
| 19 | <label><%= form.check_box :double_weight %> two-handed; double weight stats</label> | |
| 16 | 20 | </p> |
| 22 | 31 | |
|---|---|---|
| 8 | 8 | |
| 9 | 9 | <table> |
| 10 | 10 | <% cur_date = nil %> |
| 11 | <% total_weight = 0 %> | |
| 11 | 12 | |
| 12 | 13 | <% @activity.exercises.each do |exercise| %> |
| 13 | 14 | |
| 14 | <% if cur_date != exercise.created_at.to_date %> | |
| 15 | <% if cur_date != exercise.created_at.to_date.to_s(:long) %> | |
| 16 | ||
| 17 | <% unless cur_date.nil? %> | |
| 18 | <tr><td><small>Total weight lifted: <%= total_weight %> lbs.</small></td></tr> | |
| 19 | <% end %> | |
| 20 | <% total_weight = 0 %> | |
| 21 | ||
| 15 | 22 | <tr><td colspan="4" style="padding-top: 1em"> |
| 16 | <strong><%= cur_date = exercise.created_at.to_date %></strong> | |
| 23 | <strong><%= cur_date = exercise.created_at.to_date.to_s(:long) %></strong> | |
| 17 | 24 | </td></tr> |
| 18 | 25 | <% end %> |
| 19 | ||
| 20 | <tr> | |
| 21 | <td><%= link_to "Set #{exercise.id}:", exercise_path(exercise.activity, exercise) %></td> | |
| 22 | 26 | |
| 23 | <td style="padding-right: 3em"> | |
| 24 | <% if @activity.use_reps? && @activity.use_weight? %> | |
| 25 | <%= exercise.reps.to_s + ' ' + @activity.noun %> @ <%= exercise.weight %> lbs | |
| 26 | <% end %> | |
| 27 | </td> | |
| 27 | <% total_weight += exercise.total_weight %> | |
| 28 | 28 | |
| 29 | <td><%= link_to 'edit', edit_exercise_path(@activity, exercise) %> <%= link_to 'dup', {:controller => 'exercises', :action => 'new', :activity_id => @activity, :id => exercise} %></td> | |
| 30 | <td><%= link_to 'remove', exercise_path(@activity, exercise), :confirm => 'Are you sure?', :method => :delete %></td> | |
| 31 | </tr> | |
| 29 | ||
| 30 | <%= render :partial => 'exercises/exercise', :object => exercise %> | |
| 31 | ||
| 32 | 32 | <% end %> |
| 33 | ||
| 34 | <tr><td><small>Total weight lifted: <%= total_weight %> lbs.</small></td></tr> | |
| 35 | ||
| 33 | 36 | </table> |
| 34 | 37 | |
| 20 | 31 | |
|---|---|---|
| 29 | 29 | |
| 30 | 30 | <p> |
| 31 | 31 | <label for="exercise_created_at">Date:</label> |
| 32 | <%= form.datetime_select :created_at %> UTC | |
| 32 | <%= form.text_field :created_at_string %> | |
| 33 | 33 | </p> |
| 20 | 31 | |
|---|---|---|
| 6 | 6 | |
| 7 | 7 | |
| 8 | 8 | <% if @exercise.activity.use_reps? %> |
| 9 | <p><%= @exercise.activity.noun %>: <%= @exercise.reps %></p> | |
| 9 | <p><%= @exercise.activity.noun.capitalize %>: <%= @exercise.reps %></p> | |
| 10 | 10 | <% end %> |
| 11 | 11 | |
| 12 | 12 | <% if @exercise.activity.use_weight? %> |
| --- | --- | |
| 21 | 21 | <p>Distance: <%= @exercise.reps %> km</p> |
| 22 | 22 | <% end %> |
| 23 | 23 | |
| 24 | <% if @exercise.activity.use_reps? && @exercise.activity.use_weight? %> | |
| 25 | <p>Total lifted: <%= @exercise.total_weight %> lbs.</p> | |
| 26 | <% end %> | |
| 27 | ||
| 24 | 28 | <p>Date: <%= @exercise.created_at.to_s(:long) %> UTC</p> |
| 25 | 29 | |
| 26 | 30 | |
| 16 | 31 | |
|---|---|---|
| 12 | 12 | font-size: 11px; |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | a { color: #000; } | |
| 16 | a:visited { color: #666; } | |
| 17 | a:hover { color: #fff; background-color:#000; } | |
| 15 | a { | |
| 16 | color: #994D00; | |
| 17 | text-decoration: none; | |
| 18 | } | |
| 19 | a:hover { | |
| 20 | color: #FF8100; | |
| 21 | background-color: #ff9; | |
| 22 | } | |
| 18 | 23 | |
| 19 | 24 | .fieldWithErrors { |
| 20 | 25 | padding: 2px; |
