2014-02-27 11:13:53 +00:00
|
|
|
<div class="row">
|
|
|
|
<h1 class="col-md-8">Contracts
|
|
|
|
<%= link_to 'Add Contract', new_contract_path, :class => "btn btn-success" if can? :create, Contract %>
|
|
|
|
</h1>
|
|
|
|
</div>
|
|
|
|
|
2014-03-03 02:06:39 +00:00
|
|
|
<table class="table">
|
|
|
|
<tr>
|
2014-03-03 02:41:57 +00:00
|
|
|
<th>Scan?</th>
|
2014-03-03 02:06:39 +00:00
|
|
|
<th>Name</th>
|
|
|
|
<th>User</th>
|
|
|
|
<th>Date</th>
|
|
|
|
<th></th>
|
|
|
|
</tr>
|
|
|
|
|
2014-03-03 02:39:04 +00:00
|
|
|
<% @contracts.sort_by{|r| (r.last_name) || "" }.each do |contract| %>
|
2014-03-03 02:06:39 +00:00
|
|
|
<tr>
|
2014-03-03 02:41:57 +00:00
|
|
|
<td>
|
|
|
|
<% unless contract.document.blank? %>
|
|
|
|
<span class="glyphicon glyphicon-ok"></span>
|
|
|
|
<% end %>
|
|
|
|
</td>
|
2014-03-03 02:06:39 +00:00
|
|
|
<td>
|
|
|
|
<%= contract.last_name %>,
|
|
|
|
<%= contract.first_name %>
|
2014-03-03 04:48:49 +00:00
|
|
|
<%= "and #{contract.cosigner}" unless contract.cosigner.blank? %>
|
2014-03-03 02:06:39 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<%= link_to contract.user.name, contract.user if contract.user %>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<%= contract.signed_at.to_date.to_s(:long) %>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<%= link_to "View", contract, class: "btn btn-primary" %>
|
|
|
|
<%= link_to "Edit", edit_contract_path(contract), class: "btn btn-default" %>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2014-02-27 11:13:53 +00:00
|
|
|
<% end %>
|
2014-03-03 02:06:39 +00:00
|
|
|
</table>
|
2014-02-27 11:13:53 +00:00
|
|
|
<br />
|
|
|
|
|