mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-11 15:13:25 +08:00
Merge pull request #2111 from aignatov-bio/ai-sci-3943-fix-marvinjs-in-search
Fix MarvinJS representation in global search [SCI-3943]
This commit is contained in:
commit
c2c8343c57
3 changed files with 18 additions and 5 deletions
|
@ -144,6 +144,16 @@
|
|||
|
||||
#search-container {
|
||||
padding-left: 45px;
|
||||
|
||||
.mce-i-marvinjs {
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
display: inline-block;
|
||||
left: 0;
|
||||
top: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Search */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<% @asset_results.each do |asset| %>
|
||||
<h5>
|
||||
<% if asset.image? %>
|
||||
<span class="fas fa-paperclip"></span>
|
||||
<% if asset.blob.metadata["asset_type"] == 'marvinjs' %>
|
||||
<span class="mce-i-marvinjs"></span>
|
||||
<% else %>
|
||||
<% if wopi_file?(asset) %>
|
||||
<%= file_extension_icon(asset) %>
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
<% query ||= nil %>
|
||||
<% asset_read_allowed = false %>
|
||||
<% text = query.present? ? highlight(asset.file_name, query.strip.split(/\s+/)) : asset.file_name %>
|
||||
<%
|
||||
query ||= nil
|
||||
asset_read_allowed = false
|
||||
file_name = asset.blob.metadata["asset_type"] ? asset.blob.metadata["name"] : asset.file_name
|
||||
text = query.present? ? highlight(file_name, query.strip.split(/\s+/)) : file_name
|
||||
%>
|
||||
|
||||
<% if asset.step %>
|
||||
<% protocol = asset.step.protocol %>
|
||||
|
|
Loading…
Reference in a new issue