Permalink
Browse files

rearrange bike table and add availability icon

  • Loading branch information...
1 parent ea607f5 commit 707ebc9f2f1af04a1f2020781a78b95bc1b57264 @zflat zflat committed Jul 13, 2012
Showing with 14 additions and 15 deletions.
  1. +12 −13 app/views/bikes/_bike_table.html.erb
  2. +2 −2 app/views/bikes/_bike_table_layout.html.erb
@@ -1,25 +1,24 @@
<% bikes.each do |b| %>
<tr>
<td><%= link_to b.number, bike_path(b) %></td>
- <td><%= b.color %></td>
- <td><%= b.mfg %></td>
- <td><%= b.model %></td>
+ <td>
+ <% if b.available? %>
+ <i class="icon-ok"></i> Available
+ <% elsif b.departed? %>
+ <i class="icon-ban-circle"></i> Departed
+ <% elsif b.project %>
+ <%= link_to project_path(b.project) do %><i class="icon-ban-circle"></i> <%= "#{b.project.project_category.name} Project" %><% end %>
+ <% end # elsif %>
+ </td>
<td>
<% if b.hook %>
<%= link_to b.hook.number, hook_path(b.hook) %>
<% else %>
n/a
<% end %>
</td>
- <td>
- <% if b.available? %>
- Available
- <% elsif b.departed? %>
- Departed
- <% elsif b.project %>
- <%= link_to "#{b.project.project_category.name} Project",
- project_path(b.project) %>
- <% end %>
- </td>
+ <td><%= b.color %></td>
+ <td><%= b.mfg %></td>
+ <td><%= b.model %></td>
</tr>
<% end %>
@@ -2,11 +2,11 @@
<thead>
<tr>
<th>Number</th>
+ <th>Status</th>
+ <th>Hook</th>
<th>Color</th>
<th>Brand</th>
<th>Model</th>
- <th>Hook</th>
- <th>Status</th>
</tr>
</thead>

0 comments on commit 707ebc9

Please sign in to comment.