<table border="1">
<tr>
+ <th>Item ID</th>
<th>Customer</th>
+ <th>Type</th>
<th>Rentable</th>
<th>Overdue</th>
<th>Date Checked Out</th>
<% for coitem in @coitems %>
<tr>
+ <td><%=h coitem.rentable.id.to_s %></td>
<td><%=h coitem.customer.name %></td>
- <td><%=h coitem.rentable.title %></td>
+ <td><%=h coitem.rentable.class %></td>
+ <% if coitem.rentable.type == Game %>
+ <td><%=link_to coitem.rentable.title.to_s, :controller => 'game', :action => 'show', :id => coitem.rentable %></td>
+ <% else %>
+ <td><%=link_to coitem.rentable.title.to_s, :controller => 'video', :action => 'show', :id => coitem.rentable %></td>
+ <% end %>
<td><%=h tf_to_yesno(coitem.overdue?) %></td>
<td><%=h coitem.out_date %></td>
- <td><%=h coitem.due_date %></td>
- <td><%= link_to 'View', :action => 'show', :id => coitem %></td>
+ <td><%=link_to coitem.due_date.to_s, :action => 'edit', :id => coitem %></td>
</tr>
<% end %>
</table>