X-Git-Url: https://irasnyder.com/gitweb/?a=blobdiff_plain;f=app%2Fviews%2Fcoitem%2Flist.rhtml;h=ac1057544d5ce5d0a4395aeb4b02b99eb2796d11;hb=refs%2Ftags%2Fturned-in;hp=44b9c2d008afed8320a9913b1897295cefe77c51;hpb=4930bd87730032786d9cc7f3d5c1d7cd1f5091bc;p=cs356-p2-videostore.git diff --git a/app/views/coitem/list.rhtml b/app/views/coitem/list.rhtml index 44b9c2d..ac10575 100644 --- a/app/views/coitem/list.rhtml +++ b/app/views/coitem/list.rhtml @@ -1,24 +1,29 @@ -
Customer | -Rentable | - <% for column in Coitem.content_columns %> -<%= column.human_name %> | - <% end %> +Item ID | +Customer | +Type | +Rentable | +Overdue | +Date Checked Out | +Due Date | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
<%=h Customer.find(coitem.customer_id).name %> | -<%=h Rentable.find(coitem.rentable_id).title %> | - <% for column in Coitem.content_columns %> -<%=h coitem.send(column.name) %> | - <% end %> -<%= link_to 'Show', :action => 'show', :id => coitem %> | -<%= link_to 'Edit', :action => 'edit', :id => coitem %> | -<%= link_to 'Destroy', { :action => 'destroy', :id => coitem }, :confirm => 'Are you sure?', :method => :post %> | +<%=h coitem.rentable.id.to_s %> | +<%=h coitem.customer.name %> | +<%=h coitem.rentable.class %> | + <% if coitem.rentable.type == Game %> +<%=link_to coitem.rentable.title.to_s, :controller => 'game', :action => 'show', :id => coitem.rentable %> | + <% else %> +<%=link_to coitem.rentable.title.to_s, :controller => 'video', :action => 'show', :id => coitem.rentable %> | + <% end %> +<%=h tf_to_yesno(coitem.overdue?) %> | +<%=h coitem.out_date %> | +<%=link_to coitem.due_date.to_s, :action => 'edit', :id => coitem %> |