Files
old-holivud2/app/views/contract_templates/index.html.erb
2020-07-20 13:28:40 +00:00

38 lines
1.4 KiB
Plaintext

<%= product_wordmark :release_me, class: "small mb-3" %>
<p>
<% if policy(ContractTemplate).new? %>
<%= link_to fa_icon("plus", text: t(".actions.new")), [:new, @project, :contract_template], class: "btn btn-primary" %>
<%= link_to fa_icon("clone", text: t(".actions.import")), [:new, @project, :release_template_imports], class: "btn btn-secondary" %>
<% end %>
<%= link_to "Group QR Code", "javascript:void(0);", class: "btn btn-light border disabled", id: "group_qr_code", data: { project_id: @project.id, contract_template_ids: [] } %>
</p>
<div class="border bg-white rounded shadow-sm pb-3 table-responsive">
<table class="table table-striped tr-px-4 align-all-middle">
<thead class="thead-light">
<tr>
<th></th>
<th><%= ContractTemplate.human_attribute_name(:name) %></th>
<th><%= ContractTemplate.human_attribute_name(:fee) %></th>
<th><%= t(".table_headers.release_type") %></th>
<th><%= t(".table_headers.signed_release_count") %></th>
<th></th>
</tr>
</thead>
<tbody>
<% if @contract_templates.any? %>
<%= render @contract_templates %>
<% else %>
<tr>
<td colspan="5" class="py-4 text-center text-muted"><%= t(".empty") %></td>
</tr>
<% end %>
</tbody>
</table>
</div>
<div class="mt-3">
<%= will_paginate @contract_templates %>
</div>