<%= 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 %>
</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><%= 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>
