X-Git-Url: https://irasnyder.com/gitweb/?a=blobdiff_plain;f=app%2Fviews%2Fpurchase%2Flist.rhtml;h=4b2306d0a4f9bf7219caa980f15123279c95fb53;hb=da871e3e27c31759e0d017c89ccf16a14db1a227;hp=593b7a6ea4218ba0b57d7e94bad5bc3022cf423c;hpb=ebb2b4d40713d535c06970b2a17aace4458ecf25;p=cs356-p2-videostore.git diff --git a/app/views/purchase/list.rhtml b/app/views/purchase/list.rhtml index 593b7a6..4b2306d 100644 --- a/app/views/purchase/list.rhtml +++ b/app/views/purchase/list.rhtml @@ -1,20 +1,21 @@

Listing purchases

- +
- <% for column in Purchase.content_columns %> - - <% end %> + + + + + <% for purchase in @purchases %> - <% for column in Purchase.content_columns %> - - <% end %> - - - + + + + + <% end %>
<%= column.human_name %>DateTypeTitlePriceCustomer
<%=h purchase.send(column.name) %><%= link_to 'Show', :action => 'show', :id => purchase %><%= link_to 'Edit', :action => 'edit', :id => purchase %><%= link_to 'Destroy', { :action => 'destroy', :id => purchase }, :confirm => 'Are you sure?', :method => :post %><%=link_to purchase.date, :action => 'filterbydate', :id => purchase.date %><%=link_to purchase.class, :action => 'filterbytype', :id => purchase.class %><%=h purchase.title %><%=h number_to_currency(purchase.price) %><%=link_to purchase.customer.name, :action => 'filterbycust', :id => purchase.customer_id %>
@@ -22,6 +23,3 @@ <%= link_to 'Previous page', { :page => @purchase_pages.current.previous } if @purchase_pages.current.previous %> <%= link_to 'Next page', { :page => @purchase_pages.current.next } if @purchase_pages.current.next %> -
- -<%= link_to 'New purchase', :action => 'new' %>