From 59078e923b9486de61f17a895f3bddeb2894fc2a Mon Sep 17 00:00:00 2001 From: Giga Chubinidze Date: Mon, 27 Feb 2023 16:00:35 +0400 Subject: [PATCH] Show delete button only for drafts [SCI-7997] --- .../protocols/index/_protocol_versions_modal.html.erb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/views/protocols/index/_protocol_versions_modal.html.erb b/app/views/protocols/index/_protocol_versions_modal.html.erb index 0bfda0191..fe90b1138 100644 --- a/app/views/protocols/index/_protocol_versions_modal.html.erb +++ b/app/views/protocols/index/_protocol_versions_modal.html.erb @@ -31,9 +31,11 @@ <%= image_tag 'icon_small/publish.svg' %> <%= t('protocols.index.versions.publish') %> <% end %> -
- -
+ <% if can_delete_protocol_draft_in_repository?(draft) %> +
+ +
+ <% end %> <% end %>