Contract-Signer/app/views/contracts/index.html.erb
2011-09-28 03:37:39 -07:00

25 lines
650 B
Plaintext

<h1>Listing contracts</h1>
<table>
<tr>
<th>Date</th>
<th>Name</th>
<th>Signer</th>
</tr>
<% @contracts.each do |contract| %>
<tr>
<td><%=h contract.datesigned %></td>
<td><%=h contract.name %></td>
<td><% if(!contract.signer.blank?) then %><%=h contract.signer.first_name %> <%=h contract.signer.last_name %><% end %></td>
<td><%= link_to 'Show', contract %></td>
<td><%= link_to 'Edit', edit_contract_path(contract) %></td>
<td><%= link_to 'Destroy', contract, :confirm => 'Are you sure?', :method => :delete %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to 'New contract', new_contract_path %>