scinote-web/app/views/assets/wopi/_file_wopi_controls.html.erb

21 lines
674 B
Text
Raw Normal View History

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),
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 %>
<%= content_tag :button, '',
id: 'wopi_file_edit_button',
class: 'btn btn-light cursor-not-allowed',
style: "pointer-events: all;",
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>
<%= wopi_button_text(asset, 'edit') %>
<% end %>
2018-03-30 17:50:28 +08:00
<% end %>