mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-20 22:03:03 +08:00
Verify sequence asset preview for non-editable role and add css class [SCI-8967] (#6012)
* Verify sequence asset preview for non-editable user role and add css class [SCI-8967] * Add safe navigation operator when checking gene sequence blob meta asset_type [SCI-9867]
This commit is contained in:
parent
196b6628ae
commit
71bcc78243
2 changed files with 7 additions and 2 deletions
|
@ -38,6 +38,11 @@
|
|||
background-color: var(--sn-white);
|
||||
}
|
||||
|
||||
.gene-sequence-asset {
|
||||
height: 500px;
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
&.processing {
|
||||
background-image: url("/images/medium/loading_white.svg");
|
||||
background-position: center;
|
||||
|
|
|
@ -62,8 +62,8 @@
|
|||
<%= render partial: 'shared/pdf_viewer', locals: { asset: asset, report_document: false } %>
|
||||
<% else %>
|
||||
<%= image_tag asset.large_preview,
|
||||
class: 'asset-image',
|
||||
style: 'opacity: 0' %>
|
||||
class: class_names('asset-image', 'gene-sequence-asset': asset.blob&.metadata["asset_type"] == 'gene_sequence'),
|
||||
style: 'opacity: 0' %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= render partial: 'shared/file_preview/file_icon', locals: { asset: asset } %>
|
||||
|
|
Loading…
Reference in a new issue