Change 'Debt' to 'Balance'
[cs356-p2-videostore.git] / app / views / customer / list.rhtml
1 <h1>Listing Customers</h1>
2
3 <table border="1">
4   <tr>
5     <th>Customer ID</th>
6     <th>Name</th>
7     <th>Phone</th>
8     <th>Balance</th>
9   </tr>
10   
11 <% for customer in @customers %>
12   <tr>
13     <td><%=h customer.id %></td>
14     <td><%=link_to customer.name.to_s, :action => 'show', :id => customer %></td>
15     <td><%=h customer.phone %></td>
16     <td><%=h number_to_currency(customer.debt) %></td>
17     <td><%= link_to "Checked Out Items", :controller => :coitem, :action => 'filterbycustomerid', :id => customer %></td>
18     <td><%= link_to 'Edit', :action => 'edit', :id => customer %></td>
19     <td><%= link_to 'Remove', { :action => 'destroy', :id => customer }, :confirm => 'Are you sure?', :method => :post %></td>
20   </tr>
21 <% end %>
22 </table>
23
24 <%= link_to 'Previous page', { :page => @customer_pages.current.previous } if @customer_pages.current.previous %>
25 <%= link_to 'Next page', { :page => @customer_pages.current.next } if @customer_pages.current.next %> 
26
27 <br />
28
29 <%= link_to 'New customer', :action => 'new' %>