2018-03-30 17:50:28 +08:00
|
|
|
<%= link_to view_asset_url(id: asset),
|
2019-04-02 23:45:26 +08:00
|
|
|
id: 'wopi_file_view_button',
|
2018-03-30 17:50:28 +08:00
|
|
|
class: 'btn btn-default btn-sm',
|
|
|
|
target: '_blank',
|
|
|
|
style: 'display: inline-block' do %>
|
|
|
|
<%= file_application_icon(asset) %>
|
|
|
|
<%= wopi_button_text(asset, 'view') %>
|
|
|
|
<% end %>
|
2019-01-01 01:10:12 +08:00
|
|
|
<% if can_edit && edit_supported %>
|
2018-03-30 17:50:28 +08:00
|
|
|
<%= link_to edit_asset_url(id: asset),
|
2019-04-02 23:45:26 +08:00
|
|
|
id: 'wopi_file_edit_button',
|
2018-03-30 17:50:28 +08:00
|
|
|
class: 'btn btn-default btn-sm',
|
|
|
|
target: '_blank',
|
|
|
|
style: 'display: inline-block' do %>
|
|
|
|
<%= file_application_icon(asset) %>
|
|
|
|
<%= wopi_button_text(asset, 'edit') %>
|
|
|
|
<% end %>
|
2019-01-01 01:10:12 +08:00
|
|
|
<% elsif can_edit %>
|
|
|
|
<%= link_to edit_asset_url(id: asset),
|
2019-04-02 23:45:26 +08:00
|
|
|
id: 'wopi_file_edit_button',
|
2019-01-01 01:10:12 +08:00
|
|
|
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 %>
|
2018-03-30 17:50:28 +08:00
|
|
|
<% end %>
|