Fix rendering template for additional data for reports [SCI-9717] (#6660)

This commit is contained in:
ajugo 2023-11-17 11:11:07 +01:00 committed by GitHub
parent a765ab009d
commit 8853f54ad3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View file

@ -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

View file

@ -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