Skip to content

Commit

Permalink
[Invalidate Lap] Basic UI to mark laps as invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
AlessioMorale committed Mar 18, 2016
1 parent 3fb1626 commit cd11fc1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions web/app/assets/stylesheets/application.css.scss
Expand Up @@ -233,3 +233,8 @@ footer {
margin-bottom: 0;
}
}

.invalidatedlap {
color:red;
text-decoration:line-through;
}
7 changes: 6 additions & 1 deletion web/app/views/pilots/laps.html.haml
Expand Up @@ -22,10 +22,11 @@
%th Race
%th Lap Number
%th Lap Time
%th

%tbody
- @pilot.pilot_race_laps.order("id DESC").each do |lap_entry|
%tr
%tr{:class => ("invalidatedlap" if lap_entry.invalidated?)}
%td
%strong
= lap_entry.created_at.to_s(:long)
Expand All @@ -38,3 +39,7 @@
%td
%strong
= formated_lap_time(lap_entry.lap_time)
%td
%strong
= link_to_if(lap_entry.invalidated?, t('actions.undo_invalidate_lap'),{action: 'undo_invalidate_lap', controller: '/race_director', lapid:lap_entry.id},{class: 'btn btn-danger btn-large'}) do
= link_to(t('actions.invalidate_lap'),{action: 'invalidate_lap', controller: '/race_director', lapid:lap_entry.id},{class: 'btn btn-danger btn-large'})
2 changes: 2 additions & 0 deletions web/config/locales/en.yml
Expand Up @@ -24,6 +24,8 @@ en:
delete: "delete"
edit: "edit"
deactivate_token: "remove token"
undo_invalidate_lap: "undo invalidation"
invalidate_lap: "invalidate"
race_session:
idle_time_in_seconds: Idle time (s)
title: Title
Expand Down

0 comments on commit cd11fc1

Please sign in to comment.