mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-27 02:04:33 +08:00
Open HELM files in bio eddie [SCI-5890] (#3442)
This commit is contained in:
parent
53456988ba
commit
4de35c983a
2 changed files with 8 additions and 3 deletions
|
@ -236,6 +236,10 @@ class Asset < ApplicationRecord
|
|||
file.metadata[:asset_type] == 'marvinjs'
|
||||
end
|
||||
|
||||
def bio_eddie?
|
||||
file.metadata[:asset_type] == 'bio_eddie' || File.extname(file_name) == '.helm'
|
||||
end
|
||||
|
||||
def pdf_preview_ready?
|
||||
return false if pdf_preview_processing
|
||||
|
||||
|
|
|
@ -21,13 +21,14 @@
|
|||
<span class="fas fa-pencil-alt"></span>
|
||||
<%= t('assets.file_preview.edit_in_marvinjs') %>
|
||||
</button>
|
||||
<% elsif asset.file.metadata[:asset_type] == 'bio_eddie' && BioEddieService.enabled?(current_user) %>
|
||||
|
||||
<% elsif asset.bio_eddie? && BioEddieService.enabled?(current_user) %>
|
||||
<button class="btn btn-light bio-eddie-edit-button"
|
||||
data-molecule-id="<%= asset.id %>"
|
||||
data-update-url="<%= bio_eddie_asset_path(asset) %>"
|
||||
data-edit-url="<%= start_editing_bio_eddie_asset_path(asset) %>"
|
||||
data-molecule-name="<%= asset.file.metadata[:name] %>"
|
||||
data-molecule-description="<%= asset.file.metadata[:description] %>"
|
||||
data-molecule-name="<%= asset.file.metadata[:name] || asset.file_name %>"
|
||||
data-molecule-description="<%= asset.file.metadata[:description] || asset.file.download %>"
|
||||
>
|
||||
<span class="fas fa-pencil-alt"></span>
|
||||
<%= t('assets.file_preview.edit_in_bio_eddie') %>
|
||||
|
|
Loading…
Reference in a new issue