2020-10-22 19:41:17 +08:00
|
|
|
<% if 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',
|
2020-10-22 19:41:17 +08:00
|
|
|
class: 'btn btn-light',
|
|
|
|
target: '_blank' do %>
|
2023-08-09 08:19:57 +08:00
|
|
|
<i class="sn-icon sn-icon-<%= sn_icon_for(asset) %>"></i>
|
2018-03-30 17:50:28 +08:00
|
|
|
<%= wopi_button_text(asset, 'edit') %>
|
|
|
|
<% end %>
|
2020-10-22 19:41:17 +08:00
|
|
|
<% else %>
|
2024-01-30 21:33:50 +08:00
|
|
|
<%= content_tag :button, '',
|
2019-04-02 23:45:26 +08:00
|
|
|
id: 'wopi_file_edit_button',
|
2024-01-30 21:33:50 +08:00
|
|
|
class: 'btn btn-light cursor-not-allowed',
|
|
|
|
style: "pointer-events: all;",
|
2019-01-01 01:10:12 +08:00
|
|
|
target: '_blank',
|
|
|
|
title: title,
|
2020-10-22 19:41:17 +08:00
|
|
|
disabled: true do %>
|
2023-08-09 08:19:57 +08:00
|
|
|
<i class="sn-icon sn-icon-<%= sn_icon_for(asset) %>"></i>
|
2019-01-01 01:10:12 +08:00
|
|
|
<%= wopi_button_text(asset, 'edit') %>
|
|
|
|
<% end %>
|
2018-03-30 17:50:28 +08:00
|
|
|
<% end %>
|