Merge pull request #5028 from G-Chubinidze/gc_SCI_7997

Show delete button only for drafts [SCI-7997]
This commit is contained in:
G-Chubinidze 2023-02-27 16:16:27 +04:00 committed by GitHub
commit 33bb7294f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,9 +31,11 @@
<%= image_tag 'icon_small/publish.svg' %>
<%= t('protocols.index.versions.publish') %>
<% end %>
<div data-url="<%= destroy_draft_protocol_path(draft) %>" class="btn btn-light delete-draft">
<i class="fas fa-trash"></i>
</div>
<% if can_delete_protocol_draft_in_repository?(draft) %>
<div data-url="<%= destroy_draft_protocol_path(draft) %>" class="btn btn-light delete-draft">
<i class="fas fa-trash"></i>
</div>
<% end %>
<% end %>
</div>
<div class="protocol-version-comment">