scinote-web/app/views/steps/_wopi_controlls.html.erb

19 lines
618 B
Text
Raw Normal View History

<%= link_to download_asset_path(asset),
data: { no_turbolink: true,
id: true,
status: 'asset-present' } do %>
<%= image_tag preview_asset_path(asset) if asset.is_image? %>
2017-03-13 20:20:49 +08:00
<% if wopi_file?(asset) %>
2017-03-13 20:20:49 +08:00
<%= wopi_asset_file_name(asset) %>
<% else %>
<p><%= truncate(asset.file_file_name,
length: Constants::FILENAME_TRUNCATION_LENGTH) %></p>
<% end %>
<% end %>
2017-03-13 20:20:49 +08:00
<%= wopi_asset_view_button(asset) %>
<% view_only ||= false %>
<% if !view_only && can_edit_step_in_protocol(@protocol) %>
2017-03-13 20:20:49 +08:00
<%= wopi_asset_edit_button(asset) %>
<% end %>