Files
old-holivud2/app/views/contract_templates/_contract_template.html.erb
2020-09-16 05:39:08 +02:00

44 lines
2.3 KiB
Plaintext

<tr>
<td data-behavior="select_contract_template"><%= check_box_tag "contract_template_ids[]", contract_template.id, false %></td>
<td>
<%= contract_template.name %>
</td>
<td>
<% if contract_template.fee? %>
<%= 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" nowrap>
<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(contract_template).edit? %>
<%= link_to fa_icon("pencil fw", text: t(".actions.edit")), [:edit, contract_template], class: "dropdown-item" %>
<% end %>
<% if policy(ContractTemplate).duplicate? %>
<%= link_to fa_icon("clone fw", text: t(".actions.duplicate")), contract_template_duplicates_path(contract_template), method: :post, class: "dropdown-item" %>
<% end %>
<% 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("trash", text: "Delete"), 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>