mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 23:21:30 +08:00
19 lines
610 B
Text
19 lines
610 B
Text
<% if edit_supported %>
|
|
<%= link_to edit_asset_url(id: asset),
|
|
id: 'wopi_file_edit_button',
|
|
class: 'btn btn-light',
|
|
target: '_blank' do %>
|
|
<i class="sn-icon sn-icon-<%= sn_icon_for(asset) %>"></i>
|
|
<%= wopi_button_text(asset, 'edit') %>
|
|
<% end %>
|
|
<% else %>
|
|
<%= content_tag :div, '',
|
|
id: 'wopi_file_edit_button',
|
|
class: 'btn btn-light',
|
|
target: '_blank',
|
|
title: title,
|
|
disabled: true do %>
|
|
<i class="sn-icon sn-icon-<%= sn_icon_for(asset) %>"></i>
|
|
<%= wopi_button_text(asset, 'edit') %>
|
|
<% end %>
|
|
<% end %>
|