mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-17 14:46:00 +08:00
29 lines
980 B
Text
29 lines
980 B
Text
<%= link_to view_asset_url(id: asset),
|
|
id: 'wopi_file_view_button',
|
|
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),
|
|
id: 'wopi_file_edit_button',
|
|
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),
|
|
id: 'wopi_file_edit_button',
|
|
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 %>
|