diff --git a/app/views/protocols/edit.html.erb b/app/views/protocols/edit.html.erb index f41fc020a..4a599f79f 100644 --- a/app/views/protocols/edit.html.erb +++ b/app/views/protocols/edit.html.erb @@ -9,6 +9,8 @@ <%= render partial: "protocols/steps.html.erb" %> +<%= render partial: "shared/image_preview_modal.html.erb" %> +
<%= javascript_include_tag "protocols/edit" %> diff --git a/app/views/protocols/index/_protocol_preview_modal_body.html.erb b/app/views/protocols/index/_protocol_preview_modal_body.html.erb index 887eac81d..41e57247e 100644 --- a/app/views/protocols/index/_protocol_preview_modal_body.html.erb +++ b/app/views/protocols/index/_protocol_preview_modal_body.html.erb @@ -131,7 +131,7 @@ length: Constants::FILENAME_TRUNCATION_LENGTH) %> <% end %> <% else %> - <%= render partial: 'steps/wopi_controlls.html.erb', locals: { asset: asset } %> + <%= render partial: 'steps/wopi_controlls.html.erb', locals: { asset: asset, view_only: true } %> <% end %> <% end %> <% else %> diff --git a/app/views/steps/_wopi_controlls.html.erb b/app/views/steps/_wopi_controlls.html.erb index a04780b98..73b330355 100644 --- a/app/views/steps/_wopi_controlls.html.erb +++ b/app/views/steps/_wopi_controlls.html.erb @@ -12,6 +12,7 @@ <% end %> <% end %> <%= wopi_asset_view_button(asset) %> -<% if can_edit_step_in_protocol(@protocol) %> +<% view_only ||= false %> +<% if !view_only && can_edit_step_in_protocol(@protocol) %> <%= wopi_asset_edit_button(asset) %> <% end %>