mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-25 09:13:05 +08:00
Merge pull request #6033 from artoscinote/ma_SCI_8994
Fix issues with repository columns [SCI-8994][SCI-8846]
This commit is contained in:
commit
2e55181510
3 changed files with 7 additions and 4 deletions
|
@ -28,11 +28,11 @@ module ApplicationHelper
|
|||
|
||||
if message.strip.length > len
|
||||
sanitize_input("<div class='modal-tooltip'> \
|
||||
#{message.strip} \
|
||||
#{truncate(message.strip, length: len)} \
|
||||
<span class='modal-tooltiptext'> \
|
||||
#{message.strip}</span></div>")
|
||||
else
|
||||
message.strip
|
||||
truncate(message.strip, length: len)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ module RepositoryDatatable
|
|||
class RepositoryAssetValueSerializer < RepositoryBaseValueSerializer
|
||||
include Rails.application.routes.url_helpers
|
||||
include InputSanitizeHelper
|
||||
include FileIconsHelper
|
||||
|
||||
def value
|
||||
asset = value_object.asset
|
||||
|
@ -12,7 +13,7 @@ module RepositoryDatatable
|
|||
url: rails_blob_path(asset.file, disposition: 'attachment'),
|
||||
preview_url: asset_file_preview_path(asset),
|
||||
file_name: escape_input(asset.file_name),
|
||||
icon_html: FileIconsHelper.sn_icon_for(asset)
|
||||
icon_html: sn_icon_for(asset)
|
||||
}
|
||||
rescue StandardError => e
|
||||
Rails.logger.error e.message
|
||||
|
|
|
@ -59,7 +59,9 @@
|
|||
<%= "data-items-url=#{items_repository_repository_columns_list_column_path(repository, column)}" if column.repository_list_value? %>
|
||||
<%= "data-items-url=#{items_repository_repository_columns_status_column_path(repository, column)}" if column.repository_status_value? %>
|
||||
>
|
||||
<div class="truncate"><%= display_tooltip(column.name) %></div>
|
||||
<span class="truncate" title="<%= column.name %>">
|
||||
<%= column.name %>
|
||||
</span>
|
||||
</th>
|
||||
<% end %>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in a new issue