Hide office edit buttons in protocol preview and fix image preview in protocol edit [SCI-877]

This commit is contained in:
Oleksii Kriuchykhin 2017-04-14 16:05:35 +02:00
parent 181d981a51
commit 4fac6484b5
3 changed files with 5 additions and 2 deletions

View file

@ -9,6 +9,8 @@
<%= render partial: "protocols/steps.html.erb" %>
<%= render partial: "shared/image_preview_modal.html.erb" %>
<div class="hidden" data-role="updated-at-label-url" data-url="<%= updated_at_label_protocol_path(@protocol) %>"></div>
<%= javascript_include_tag "protocols/edit" %>

View file

@ -131,7 +131,7 @@
length: Constants::FILENAME_TRUNCATION_LENGTH) %></p>
<% 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 %>

View file

@ -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 %>