X-Git-Url: https://irasnyder.com/gitweb/?a=blobdiff_plain;f=app%2Fviews%2Fpurchase%2Flist.rhtml;h=6887d135c81f78f5859de9a559541a5858d885d0;hb=1be494d5a7fe0f5b4a662babd00037c07ec5e484;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..6887d13 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.type %><%=h purchase.title %><%=h 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' %>