<tr>
  <td>
    <%= contract_template.name %>
  </td>
  <td>
    <% if contract_template.fee? %>
      <%= number_to_currency(contract_template.fee) %>
    <% else %>
      <%= t(".no_fee") %>
    <% end %>
  </td>
  <td>
    <%= release_type_title(contract_template.release_type) %>
  </td>
  <td>
    <%= contract_template.releases.size %>
  </td>
  <td class="text-right">
    <div class="btn-group">
      <%= button_tag t(".actions.manage"), class: "btn btn-light btn-sm dropdown-toggle border", data: { toggle: "dropdown", boundary: "window" }, aria: { haspopup: true, expanded: false } %>
      <div class="dropdown-menu dropdown-menu-right">
        <% if policy(QrCode).show? %>
          <%= link_to fa_icon("qrcode", text: t(".actions.qr_code")), [contract_template, :qr_codes], class: "dropdown-item", target: :_blank %>
        <% end %>
        <%= link_to fa_icon("clipboard", text: t(".actions.copy_url")), [:new, contract_template.project.account, contract_template.project, contract_template, "#{contract_template.release_type}_release", only_path: false], class: "dropdown-item", data: { behavior: "clipboard" } %>
        <% if policy(BlankContract).new? %>
          <%= link_to fa_icon("print", text: "Print"), [:new, contract_template, :blank_contracts], class: "dropdown-item", target: :_blank %>
        <% end %>
        <% if policy(contract_template).destroy? %>
          <%= link_to fa_icon("archive", text: "Archive"), contract_template, class: "dropdown-item", method: :delete, data: { confirm: "Are you sure?" } %>
        <% end %>
      </div>
    </div>
    <%= link_to t(".actions.sign"), [:new, contract_template.project.account, contract_template.project, contract_template, "#{contract_template.release_type}_release"], class: "btn btn-sm btn-primary", target: :_blank %>
  </td>
</tr>
