scinote-web/app/views/steps/_wopi_controlls.html.erb
mz3944 bb21f6543c
Merge pull request #1004 from mz3944/mz-SCI-2011
Wrapping up the permissions [SCI-2011]
2018-03-06 07:10:40 +01:00

25 lines
753 B
Plaintext

<%= 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? %>
<% if wopi_file?(asset) %>
<%= wopi_asset_file_name(asset) %>
<% else %>
<p>
<%= file_extension_icon(asset) %>
<%= truncate(asset.file_file_name,
length: Constants::FILENAME_TRUNCATION_LENGTH) %>
</p>
<% end %>
<% end %>
<%= wopi_asset_view_button(asset) %>
<% view_only ||= false %>
<% if !view_only %>
<% if can_manage_protocol_in_module?(@protocol) ||
can_manage_protocol_in_repository?(@protocol) %>
<%= wopi_asset_edit_button(asset) %>
<% end %>
<% end %>