X-Git-Url: https://irasnyder.com/gitweb/?a=blobdiff_plain;f=app%2Fviews%2Fpurchase%2Flist.rhtml;h=b702f7f69daa3db14ab2bd021eea1a828b8d791e;hb=e4597521e3a7365f86731f7d69643cb1067acb5e;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..b702f7f 100644 --- a/app/views/purchase/list.rhtml +++ b/app/views/purchase/list.rhtml @@ -1,20 +1,23 @@

Listing purchases

- +
- <% for column in Purchase.content_columns %> - - <% end %> + + + + + + <% for purchase in @purchases %> - <% for column in Purchase.content_columns %> - - <% end %> - - - + + + + + + <% end %>
<%= column.human_name %>DateQuantityTypeTitlePriceCustomer
<%=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 %><%=h purchase.quantity %><%=link_to purchase.class, :action => 'filterbytype', :id => purchase.type %><%=h purchase.title %><%=h purchase.price %><%=link_to purchase.customer.name, :action => 'filterbycust', :id => purchase.customer_id %>
@@ -22,6 +25,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' %>