Open-Source-Access-Control-.../app/views/contracts/index.html.erb

42 lines
999 B
Plaintext
Raw Normal View History

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>
<table class="table">
<tr>
2014-03-03 02:41:57 +00:00
<th>Scan?</th>
<th>Name</th>
<th>User</th>
<th>Date</th>
<th></th>
</tr>
2014-02-27 11:13:53 +00:00
<% @contracts.sort_by{|r| [r.last_name] }.each do |contract| %>
<tr>
2014-03-03 02:41:57 +00:00
<td>
<% unless contract.document.blank? %>
<span class="glyphicon glyphicon-ok"></span>
<% end %>
</td>
<td>
<%= contract.last_name %>,
<%= contract.first_name %>
</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 %>
</table>
2014-02-27 11:13:53 +00:00
<br />