From 86c4093bf266e6688af4d8b240e2b8888ac9e2b9 Mon Sep 17 00:00:00 2001 From: zmagod Date: Fri, 8 Jun 2018 09:41:04 +0200 Subject: [PATCH] adds data-hook to copy_to_protocol_repository button [fixes SCI-2439] --- app/views/my_modules/protocols/_protocol_buttons.html.erb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/my_modules/protocols/_protocol_buttons.html.erb b/app/views/my_modules/protocols/_protocol_buttons.html.erb index 7608a2106..09f128cdd 100644 --- a/app/views/my_modules/protocols/_protocol_buttons.html.erb +++ b/app/views/my_modules/protocols/_protocol_buttons.html.erb @@ -32,9 +32,11 @@  <%= t("my_modules.protocols.buttons.export") %> <% end %> <% if can_read_protocol_in_module?(@protocol) && can_create_protocols_in_repository?(@protocol.team) %> - <%= link_to copy_to_repository_modal_protocol_path(@protocol, format: :json), id: "protocol-copy-to-repository", class: "btn btn-default", remote: true, data: { action: "copy-to-repository" } do %> -  <%= t("my_modules.protocols.buttons.copy_to_repository") %> + + <%= link_to copy_to_repository_modal_protocol_path(@protocol, format: :json), id: "protocol-copy-to-repository", class: "btn btn-default", remote: true, data: { action: "copy-to-repository" } do %> +  <%= t("my_modules.protocols.buttons.copy_to_repository") %> <% end %> + <% else %>  <%= t("my_modules.protocols.buttons.copy_to_repository") %> <% end %>