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

20 lines
610 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 %>
2020-11-25 23:25:17 +08:00
<%= content_tag :div, '',
id: 'wopi_file_edit_button',
2020-10-22 19:41:17 +08:00
class: 'btn btn-light',
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 %>