cours0708/P5B/ruby/mon_projet/app/views/admin/suppliers/index.rhtml

28 lines
718 B
Plaintext
Raw Permalink Normal View History

2008-11-25 21:11:16 +00:00
<h1>Listing suppliers</h1>
<table>
<tr>
<th>Name</th>
<th>Description</th>
<th>Code</th>
<th>Created at</th>
<th>Updated at</th>
</tr>
<% for supplier in @suppliers %>
<tr>
<td><%=h supplier.name %></td>
<td><%=h supplier.description %></td>
<td><%=h supplier.code %></td>
<td><%=h supplier.created_at %></td>
<td><%=h supplier.updated_at %></td>
<td><%= link_to 'Show', supplier_path(supplier) %></td>
<td><%= link_to 'Edit', edit_supplier_path(supplier) %></td>
<td><%= link_to 'Destroy', supplier_path(supplier), :confirm => 'Are you sure?', :method => :delete %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to 'New supplier', new_supplier_path %>