prevent update if template is in use

This commit is contained in:
Bilal
2020-07-13 20:01:06 +02:00
parent cefa30b331
commit f44eca5328
7 changed files with 39 additions and 6 deletions

View File

@@ -19,7 +19,7 @@
<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(ContractTemplate).edit? %>
<% if policy(ContractTemplate).edit? && contract_template.editable? %>
<%= link_to fa_icon("pencil fw", text: t(".actions.edit")), [:edit, contract_template], class: "dropdown-item" %>
<% end %>
<% if policy(QrCode).show? %>