mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 13:13:22 +08:00
Fix asset link preview, fix inventory item modal window styling
This commit is contained in:
parent
dbceac7aa4
commit
eb29c50379
2 changed files with 18 additions and 9 deletions
|
@ -28,14 +28,14 @@
|
|||
</span>
|
||||
<% @repository_row.repository_cells.each do |repository_cell| %>
|
||||
<br>
|
||||
<% if repository_cell.value_type == 'RepositoryAssetValue' %>
|
||||
<%= render partial: "shared/asset_link", locals: { asset: repository_cell.value.asset, display_image_tag: false }, formats: :html %>
|
||||
<% else %>
|
||||
<span>
|
||||
<%= t "repository_row.modal_info.custom_field", cf: repository_cell.repository_column.name %>
|
||||
<%= custom_auto_link(repository_cell.value.formatted, simple_format: false, team: current_team) %>
|
||||
<% if repository_cell.value_type == 'RepositoryAssetValue' %>
|
||||
<%= render partial: "shared/asset_link", locals: { asset: repository_cell.value.asset, display_image_tag: false }, formats: :html %>
|
||||
<% else %>
|
||||
<%= custom_auto_link(repository_cell.value.formatted, simple_format: false, team: current_team) %>
|
||||
<% end %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</p>
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
class: 'file-preview-link',
|
||||
id: "modal_link#{asset.id}",
|
||||
data: { no_turbolink: true, id: true, status: 'asset-present', 'preview-url': asset_file_preview_path(asset) } do %>
|
||||
<p><%= truncate(asset.file_file_name,
|
||||
length: Constants::FILENAME_TRUNCATION_LENGTH) %></p>
|
||||
<span><%= truncate(asset.file_file_name,
|
||||
length: Constants::FILENAME_TRUNCATION_LENGTH) %></span>
|
||||
<% end %>
|
||||
</span>
|
||||
<% else %>
|
||||
|
@ -19,8 +19,17 @@
|
|||
<% if asset.is_image? && display_image_tag %>
|
||||
<%= image_tag asset.url(:medium) %>
|
||||
<% end %>
|
||||
<p><%= truncate(asset.file_file_name,
|
||||
length: Constants::FILENAME_TRUNCATION_LENGTH) %></p>
|
||||
<% if display_image_tag %>
|
||||
<p>
|
||||
<%= truncate(asset.file_file_name,
|
||||
length: Constants::FILENAME_TRUNCATION_LENGTH) %>
|
||||
</p>
|
||||
<% else %>
|
||||
<span>
|
||||
<%= truncate(asset.file_file_name,
|
||||
length: Constants::FILENAME_TRUNCATION_LENGTH) %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
|
|
Loading…
Reference in a new issue