mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-02 13:12:13 +08:00
Added image preview to Results [SCI-694]
This commit is contained in:
parent
0541253ffa
commit
8738b3e09d
2 changed files with 7 additions and 1 deletions
|
@ -39,6 +39,8 @@
|
|||
|
||||
<div style="height: 15px;"></div>
|
||||
|
||||
<%= render partial: "shared/image_preview_modal.html.erb" %>
|
||||
|
||||
<div id="results" data-module-id="<%= @my_module.id %>"
|
||||
data-module-protocols-step-text="<%=t 'tutorial.module_results_html' %>"
|
||||
data-module-protocols-click-samples-step-text="<%=t 'tutorial.module_results_click_samples_html' %>">
|
||||
|
@ -53,6 +55,7 @@
|
|||
<%= javascript_include_tag "results/result_texts" %>
|
||||
<%= javascript_include_tag "results/result_tables" %>
|
||||
<%= javascript_include_tag "results/result_assets" %>
|
||||
<%= javascript_include_tag("my_modules/image_preview") %>
|
||||
|
||||
<!-- Libraries for formulas -->
|
||||
<%= javascript_include_tag "lodash" %>
|
||||
|
|
|
@ -5,7 +5,10 @@
|
|||
<%= image_tag 'medium/processing.gif' %>
|
||||
</span>
|
||||
<% else %>
|
||||
<%= link_to download_asset_path(result.asset), data: {no_turbolink: true} do %>
|
||||
<%= link_to download_asset_path(result.asset),
|
||||
class: 'image-preview-link',
|
||||
id: "modal_link#{result.asset.id}",
|
||||
data: {no_turbolink: true, description: "#{result.name}"} do %>
|
||||
<%= image_tag(preview_asset_path result.asset) if result.asset.is_image? %>
|
||||
<p><%= truncate(result.asset.file_file_name,
|
||||
length: Constants::FILENAME_TRUNCATION_LENGTH) %></p>
|
||||
|
|
Loading…
Reference in a new issue