forked from janicejl/poodle
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated event view page to include description and list riders under …
…their driver #16
- Loading branch information
Ruyan Chen
committed
Feb 16, 2013
1 parent
7bfcc0e
commit e6aac1f
Showing
2 changed files
with
30 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,38 @@ | ||
<p id="notice"><%= notice %></p> | ||
<% if notice %> | ||
<div id="notice" class="alert alert-success"><%= notice %></div> | ||
This comment has been minimized.
Sorry, something went wrong. |
||
<% end %> | ||
|
||
<p> | ||
<b>Event Name:</b> | ||
<%= @event.name %> | ||
</p> | ||
<h1 id="eventName"><%= @event.name %></h1> | ||
<dd><em><%= @event.description %></em></dd> | ||
<br/><br/> | ||
|
||
<p><u>Drivers </u></p> | ||
<% @drivers.each do |driver| %> | ||
<em><%= driver.name %></em><br/> | ||
<% @riders.each do |rider| | ||
# | ||
# Temporary solution, want to optimize later | ||
# | ||
if rider.driver_id == driver.id %> | ||
<em><%= rider.name %></em><br/> | ||
<% end | ||
end %> | ||
<% end %> | ||
<% if @drivers.empty? %> | ||
<em>Currently no drivers...</em><br/> | ||
<% end %> | ||
<br /> | ||
<p><u>Rider </u></p> | ||
<% @riders.each do |rider| %> | ||
<em><%= rider.name %></em><br/> | ||
<% end %> | ||
<% if @riders.empty? %> | ||
<em>Currently no riders...</em><br/> | ||
<% end %> | ||
|
||
|
||
<br/> | ||
<br /> | ||
<%= link_to 'Edit', edit_event_path(@event) %> | | ||
<%= link_to 'Back', events_path %> | ||
<% if notice %> | ||
<script type="text/javascript"> | ||
$(document).ready(function () { | ||
$('#notice').delay(2000).fadeOut('slow'); | ||
}) | ||
</script> | ||
<% end %> |
I'm wondering if there will be any other type of notice but a success one? If so, we need to add the handling for different alert types (alert-warning, etc.) so it's not always green.