mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-21 23:46:21 +08:00
Merge pull request #2097 from aignatov-bio/ai-sci-3930-fix-preview-for-result
Fix preview for result [SCI-3930]
This commit is contained in:
commit
db36f379bb
|
@ -160,6 +160,19 @@ class AssetsController < ApplicationController
|
|||
},
|
||||
formats: :html
|
||||
)
|
||||
elsif @asset.result
|
||||
render_to_string(
|
||||
partial: 'steps/attachments/item.html.erb',
|
||||
locals: {
|
||||
asset: @asset,
|
||||
i: 0,
|
||||
assets_count: 0,
|
||||
step: nil,
|
||||
order_atoz: 0,
|
||||
order_ztoa: 0
|
||||
},
|
||||
formats: :html
|
||||
)
|
||||
else
|
||||
render_to_string(
|
||||
partial: 'shared/asset_link',
|
||||
|
|
|
@ -3,5 +3,6 @@
|
|||
<% elsif result.is_table %>
|
||||
<%= render partial: "results/result_table.html.erb", locals: {result: result} %>
|
||||
<% elsif result.is_asset %>
|
||||
<%= render partial: "shared/asset_link", locals: { asset: result.asset, display_image_tag: true }, formats: :html %>
|
||||
<%= render partial: 'steps/attachments/item.html.erb',
|
||||
locals: { asset: result.asset, i: 0, assets_count: 0, step: nil, order_atoz: 0, order_ztoa: 0 } %>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in a new issue