Merge branch 'release/1.28.0' into develop

This commit is contained in:
Martin Artnik 2023-11-22 15:13:57 +01:00
commit e13314349c
6 changed files with 32 additions and 7 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

@ -53,7 +53,7 @@ class ReportsController < ApplicationController
report = current_team.reports.new(project: @project)
end
if Rails.root.join('app', 'views', 'reports', 'templates', template, 'edit.html.erb').exist?
if lookup_context.any_templates?("reports/templates/#{template}/edit")
render json: {
html: render_to_string(
template: "reports/templates/#{template}/edit",

View file

@ -30,6 +30,7 @@ module Users
email = auth.info.email
email ||= auth.dig(:extra, :raw_info, :id_token_claims, :emails)&.first
auth.uid ||= auth.dig(:extra, :raw_info, :sub)
user = User.from_omniauth(auth)
# User found in database so just signing in

View file

@ -222,7 +222,11 @@ module Reports
merged_file
end
def prepend_title_page
def prepend_title_page(file, template, report, renderer)
unless File.exist?(Rails.root.join('app', 'views', 'reports', 'templates', template, 'cover.html.erb'))
return file
end
total_pages = 0
IO.popen(['pdfinfo', @file.path], 'r+') do |f|

View file

@ -4,7 +4,7 @@
</h1>
<div class="collapse-buttons sci-btn-group pull-right">
<button class="btn btn-light collapse-all">
<i class="sn-icon sn-icon-open-show"></i>
<i class="sn-icon sn-icon-up"></i>
<%= t("projects.reports.wizard.second_step.collapse_all") %>
</button>
<button class="btn btn-light expand-all">

View file

@ -175,14 +175,23 @@ class Constants
#=============================================================================
TAG_COLORS = %i(
#104DA9
#C4D3A0
#5EC66F
#6F2DC1
#E9A845
#DF3562
#46C3C8
#A3CCE4
#3B99FD
#104DA9
#6F2DC1
#FF69B4
#DF3562
#AD0015
#FF5C00
#E9A845
#B06500
#663300
#1D2939
#98A2B3
#DCE0E7
).freeze
# Theme colors