mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-20 14:45:56 +08:00
Merge branch 'release/1.28.0' into develop
This commit is contained in:
commit
e13314349c
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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|
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue