mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 09:42:46 +08:00
Fix missing icon files in exported projects [SCI-9133]
This commit is contained in:
parent
2ad0d3a65f
commit
aa769f92f7
7 changed files with 13 additions and 35 deletions
|
@ -1,17 +0,0 @@
|
|||
/* global Handsontable */
|
||||
window.onload = function() {
|
||||
var tables = document.getElementsByClassName('hot-table-container');
|
||||
var tableVals = document.getElementsByClassName('hot-table-contents');
|
||||
|
||||
for (let i = 0; i < tables.length; i += 1) {
|
||||
tables[i].innerHTML = '';
|
||||
new Handsontable(tables[i], {
|
||||
data: JSON.parse(tableVals[i].value).data,
|
||||
rowHeaders: true,
|
||||
colHeaders: true,
|
||||
filters: true,
|
||||
dropdownMenu: true,
|
||||
formulas: true
|
||||
});
|
||||
}
|
||||
};
|
|
@ -48,11 +48,9 @@ module FileIconsHelper
|
|||
image_link = Extends::FILE_ICON_MAPPINGS[file_ext] if Extends::FILE_ICON_MAPPINGS[file_ext]
|
||||
|
||||
if image_link
|
||||
if report
|
||||
wicked_pdf_image_tag(image_link, class: 'image-icon')
|
||||
else
|
||||
ActionController::Base.helpers.image_tag(image_link, class: 'image-icon')
|
||||
end
|
||||
image_link = wicked_pdf_asset_base64(image_link) if report
|
||||
|
||||
ActionController::Base.helpers.image_tag(image_link, class: 'image-icon')
|
||||
else
|
||||
''
|
||||
end
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
require 'fileutils'
|
||||
require 'csv'
|
||||
require 'vips'
|
||||
|
||||
class TeamZipExportJob < ZipExportJob
|
||||
include StringUtility
|
||||
|
|
|
@ -3,15 +3,15 @@
|
|||
<% timestamp = asset.created_at %>
|
||||
<div class="report-element report-result-element report-result-asset-element">
|
||||
<div class="report-element-header">
|
||||
<div class="result-icon">
|
||||
<span class="result-icon">
|
||||
<%= file_extension_icon_html(asset, true) %>
|
||||
</div>
|
||||
<div class="result-name">
|
||||
</span>
|
||||
<span class="result-name">
|
||||
<%= result.name %>
|
||||
<% if result.archived? %>
|
||||
<span class="label label-warning"><%= t('search.index.archived') %></span>
|
||||
<% end %>
|
||||
</div>
|
||||
</span>
|
||||
<div class="file-name">
|
||||
<% if defined? export_all and export_all %>
|
||||
<% file_link = @obj_filenames.dig(:assets, asset.id, :file) %>
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
<% timestamp = asset.created_at %>
|
||||
<div class="report-element report-step-attachment-element report-step-asset-element">
|
||||
<div class="report-element-header">
|
||||
<div class="pull-left attachment-icon <%= defined?(export_all) && export_all ? 'export-all-icons' : '' %>">
|
||||
<span class="pull-left attachment-icon <%= defined?(export_all) && export_all ? 'export-all-icons' : '' %>">
|
||||
<%= file_extension_icon_html(asset, true) %>
|
||||
</div>
|
||||
<div class="pull-left file-name">
|
||||
</span>
|
||||
<span class="pull-left file-name">
|
||||
<% if defined? export_all and export_all %>
|
||||
<% file_link = @obj_filenames.dig(:assets, asset.id, :file) %>
|
||||
<a href="<%= file_link %>" class="export-all-link">
|
||||
|
@ -17,7 +17,7 @@
|
|||
<%= link_to t('projects.reports.elements.download'), asset_download_url(asset, disposition: 'attachment'), class: 'download-link', target: :_blank %>
|
||||
</em>
|
||||
<% end %>
|
||||
</div>
|
||||
</span>
|
||||
<div class="user-time">
|
||||
<%= t('projects.reports.elements.step_asset.user_time', timestamp: l(timestamp, format: :full)) %>
|
||||
</div>
|
||||
|
|
|
@ -23,9 +23,6 @@
|
|||
nonce: true %>
|
||||
<% end %>
|
||||
|
||||
<!-- Init Handsontables -->
|
||||
<%= javascript_include_tag 'team_zip_exports/load_handson' %>
|
||||
|
||||
<title><%= title %></title>
|
||||
</head>
|
||||
<body class='print-report-body'>
|
||||
|
|
|
@ -103,7 +103,6 @@ Rails.application.config.assets.precompile += %w(users/invitations/resource_erro
|
|||
Rails.application.config.assets.precompile += %w(users/registrations/team_errors.js)
|
||||
Rails.application.config.assets.precompile += %w(users/registrations/resource_errors.js)
|
||||
Rails.application.config.assets.precompile += %w(users/registrations/new_with_provider.js)
|
||||
Rails.application.config.assets.precompile += %w(team_zip_exports/load_handson.js)
|
||||
Rails.application.config.assets.precompile += %w(repository_columns/manage_column_partials/number.js)
|
||||
Rails.application.config.assets.precompile += %w(repository_columns/manage_column_partials/stock.js)
|
||||
Rails.application.config.assets.precompile += %w(shared/file_preview.js)
|
||||
|
|
Loading…
Reference in a new issue