mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 01:44:34 +08:00
Add truncation of image description in the preview [SCI-873]
This commit is contained in:
parent
cf72da5635
commit
a490a12fb1
3 changed files with 6 additions and 3 deletions
|
@ -9,7 +9,8 @@
|
|||
<%= 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 %>
|
||||
data: {no_turbolink: true,
|
||||
description: "#{truncate(result.name, length: Constants::FILENAME_TRUNCATION_LENGTH)}"} do %>
|
||||
<%= image_tag result.asset.url(:medium), data: {'preview-url': large_image_url_asset_path(result.asset)} %>
|
||||
<p><%= truncate(result.asset.file_file_name,
|
||||
length: Constants::FILENAME_TRUNCATION_LENGTH) %></p>
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
<%= link_to download_asset_path(ff.object),
|
||||
class: 'image-preview-link',
|
||||
id: "modal_link#{ff.object.id}",
|
||||
data: {no_turbolink: true, id: true, status: "asset-present", description: "#{step.position + 1}. #{step.name}"} do %>
|
||||
data: {no_turbolink: true, id: true, status: "asset-present",
|
||||
description: "#{step.position + 1}. #{truncate(step.name, length: Constants::FILENAME_TRUNCATION_LENGTH)}"} do %>
|
||||
<%= image_tag ff.object.url(:medium), data: {'preview-url': large_image_url_asset_path(ff.object)} %>
|
||||
<p><%= truncate(ff.object.file_file_name,
|
||||
length: Constants::FILENAME_TRUNCATION_LENGTH) %></p>
|
||||
|
|
|
@ -76,7 +76,8 @@
|
|||
<%= link_to download_asset_path(asset),
|
||||
class: 'image-preview-link',
|
||||
id: "modal_link#{asset.id}",
|
||||
data: {no_turbolink: true, id: true, status: "asset-present", description: "#{step.position + 1}. #{step.name}"} do %>
|
||||
data: {no_turbolink: true, id: true, status: "asset-present",
|
||||
description: "#{step.position + 1}. #{truncate(step.name, length: Constants::FILENAME_TRUNCATION_LENGTH)}"} do %>
|
||||
<%= image_tag asset.url(:medium), data: {'preview-url': large_image_url_asset_path(asset)} %>
|
||||
<p><%= truncate(asset.file_file_name,
|
||||
length: Constants::FILENAME_TRUNCATION_LENGTH) %></p>
|
||||
|
|
Loading…
Reference in a new issue