scinote-web/app/views/shared/_file_wopi_controlls.html.erb
2018-12-31 18:10:12 +01:00

26 lines
865 B
Text

<%= link_to view_asset_url(id: asset),
class: 'btn btn-default btn-sm',
target: '_blank',
style: 'display: inline-block' do %>
<%= file_application_icon(asset) %>
<%= wopi_button_text(asset, 'view') %>
<% end %>
<% if can_edit && edit_supported %>
<%= link_to edit_asset_url(id: asset),
class: 'btn btn-default btn-sm',
target: '_blank',
style: 'display: inline-block' do %>
<%= file_application_icon(asset) %>
<%= wopi_button_text(asset, 'edit') %>
<% end %>
<% elsif can_edit %>
<%= link_to edit_asset_url(id: asset),
class: 'btn btn-default btn-sm',
target: '_blank',
title: title,
disabled: true,
style: 'display: inline-block' do %>
<%= file_application_icon(asset) %>
<%= wopi_button_text(asset, 'edit') %>
<% end %>
<% end %>