mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-24 00:29:30 +08:00
Fix rendering template for additional data for reports [SCI-9717] (#6660)
This commit is contained in:
parent
a765ab009d
commit
8853f54ad3
2 changed files with 12 additions and 1 deletions
|
@ -1327,6 +1327,17 @@ function reportHandsonTableConverter() {
|
|||
$.get($('#templateSelector').data('valuesEditorPath'), params, function(result) {
|
||||
$('.report-template-values-container').removeClass('hidden');
|
||||
$('.report-template-values-container').html(result.html);
|
||||
|
||||
$('.section').each(function() {
|
||||
var section = $(this);
|
||||
var collapseButton = section.find('.sn-icon-down');
|
||||
var valuesContainer = section.find('.values-container');
|
||||
|
||||
if (valuesContainer.children().length === 0) {
|
||||
collapseButton.hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('.report-template-value-dropdown').each(function() {
|
||||
dropdownSelector.init($(this), {
|
||||
noEmptyOption: true
|
||||
|
|
|
@ -151,7 +151,7 @@ module Reports
|
|||
end
|
||||
|
||||
def prepend_title_page(file, template, report, renderer)
|
||||
unless File.exist?(Rails.root.join('app', 'views', 'reports', 'templates', template, 'cover'))
|
||||
unless File.exist?(Rails.root.join('app', 'views', 'reports', 'templates', template, 'cover.html.erb'))
|
||||
return file
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue