OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[#65124] FITKO styling "Föderales IT- Standardisierungsboard" of PDF export of meeting minutes
as-op999e873a311a
diff --git a/app/models/exports/pdf/common/common.rb b/app/models/exports/pdf/common/common.rbindex e0e9f6c0a43..bb942445cdd 100644--- a/app/models/exports/pdf/common/common.rb+++ b/app/models/exports/pdf/common/common.rb@@ -118,6 +118,14 @@ module Exports::PDF::Common::Commonendend+ def draw_text_multiline_left(text:, text_style:, available_width:, top:, max_lines:)+ lines = wrap_to_lines(text, available_width, text_style, max_lines)+ starting_position = top+ lines.reverse_each do |line|+ starting_position += draw_text_multiline_part(line, text_style, 0, starting_position)+ end+ end+def formatted_text_box_measured(formatted_text_array, options)features_box = ::Prawn::Text::Formatted::Box.new(formatted_text_array, options.merge({ document: pdf }))features_box.renderdiff --git a/config/initializers/feature_decisions.rb b/config/initializers/feature_decisions.rbindex 7cc56a2daea..b1a0e296f25 100644--- a/config/initializers/feature_decisions.rb+++ b/config/initializers/feature_decisions.rb@@ -56,3 +56,7 @@ OpenProject::FeatureDecisions.add :scim_api,OpenProject::FeatureDecisions.add :block_note_editor,description: "Enables the block note editor for rich text fields where available."++OpenProject::FeatureDecisions.add :minutes_styling_meeting_pdf,+ description: "Allow exporting a meeting with FITKO styling." \+ "See #65124 for details."diff --git a/frontend/src/stimulus/controllers/dynamic/meetings/export/form.controller.ts b/frontend/src/stimulus/controllers/dynamic/meetings/export/form.controller.tsindex 686146c7fa9..da25be29d8e 100644--- a/frontend/src/stimulus/controllers/dynamic/meetings/export/form.controller.ts+++ b/frontend/src/stimulus/controllers/dynamic/meetings/export/form.controller.ts@@ -7,7 +7,10 @@ export default class FormController extends Controller<HTMLFormElement> {jobStatusDialogUrl: String,};+ static targets = ['templates', 'inputGroups'];+declare jobStatusDialogUrlValue:string;+ declare inputGroupsTargets:Array<HTMLElement>;jobModalUrl(job_id:string):string {return this.jobStatusDialogUrlValue.replace('_job_uuid_', job_id);@@ -73,4 +76,23 @@ export default class FormController extends Controller<HTMLFormElement> {});return query.toString();}++ templatesChanged(event:Event) {+ const target = event.target as HTMLSelectElement;+ const data = target.options[target.selectedIndex].dataset;+ const template = target.options[target.selectedIndex].value;++ const formControl = target.closest('.FormControl') as HTMLElement;+ const captionElement = formControl.querySelector('.FormControl-caption') as HTMLElement;+ if (captionElement) {+ captionElement.innerText = (data.caption || '');+ }+ this.inputGroupsTargets.forEach((inputGroup:HTMLElement) => {+ if (inputGroup.dataset.template === template) {+ inputGroup.classList.remove('d-none');+ } else {+ inputGroup.classList.add('d-none');+ }+ });+ }}diff --git a/modules/meeting/app/components/meetings/exports/modal_dialog_component.html.erb b/modules/meeting/app/components/meetings/exports/modal_dialog_component.html.erbindex 61d98ca891b..61158e23a94 100644--- a/modules/meeting/app/components/meetings/exports/modal_dialog_component.html.erb+++ b/modules/meeting/app/components/meetings/exports/modal_dialog_component.html.erb@@ -16,10 +16,45 @@action: "submit->meetings--export--form#submitForm","meetings--export--form-job-status-dialog-url-value": job_status_dialog_path("_job_uuid_")},- id: GENERATE_PDF_FORM_ID+ id: MEETING_PDF_EXPORT_FORM_ID) doflex_layout do |modal_body|- modal_body.with_row do+ if OpenProject::FeatureDecisions.minutes_styling_meeting_pdf_active?+ modal_body.with_row do+ render(+ Primer::Alpha::Select.new(+ name: "template",+ label: I18n.t("pdf_generator.dialog.templates.label"),+ caption: templates_default[:caption],+ input_width: :large,+ data: {+ "meetings--export--form-target": "templates",+ action: "change->meetings--export--form#templatesChanged"+ }+ )+ ) do |component|+ selected = templates_default[:id]+ templates_options.each do |entry|+ component.option(+ label: entry[:label],+ value: entry[:id],+ selected: selected == entry[:id],+ data: {+ caption: entry[:caption]+ }+ )+ end+ end+ end+ end+ modal_body.with_row(+ mt: 3,+ data: {+ template: "default",+ "meetings--export--form-target": "inputGroups"+ },+ classes: templates_default[:id] == "default" ? nil : "d-none",+ ) dorender(Primer::Alpha::CheckBox.new(id: "pdf_include_participants",@@ -31,7 +66,14 @@))end- modal_body.with_row(mt: 3) do+ modal_body.with_row(+ mt: 3,+ data: {+ template: "default",+ "meetings--export--form-target": "inputGroups"+ },+ classes: templates_default[:id] == "default" ? nil : "d-none",+ ) dorender(Primer::Alpha::CheckBox.new(id: "pdf_include_attachments",@@ -43,7 +85,14 @@))end- modal_body.with_row(mt: 3) do+ modal_body.with_row(+ mt: 3,+ data: {+ template: "default",+ "meetings--export--form-target": "inputGroups"+ },+ classes: templates_default[:id] == "default" ? nil : "d-none",+ ) dorender(Primer::Alpha::CheckBox.new(id: "pdf_include_backlog",@@ -67,10 +116,31 @@))end+ if OpenProject::FeatureDecisions.minutes_styling_meeting_pdf_active?+ modal_body.with_row(+ data: {+ template: "minutes",+ "meetings--export--form-target": "inputGroups"+ },+ classes: templates_default[:id] == "minutes" ? nil : "d-none",+ mt: 3+ ) do+ render Primer::Alpha::TextField.new(+ id: "pdf_author",+ name: :author,+ label: I18n.t("meeting.export_pdf_dialog.author.label"),+ caption: I18n.t("meeting.export_pdf_dialog.author.caption"),+ input_width: :large,+ visually_hide_label: false,+ value: default_author_text+ )+ end+ endmodal_body.with_row(mt: 3) dorender Primer::Alpha::TextField.new(id: "pdf_footer_text",name: :footer_text,+ input_width: :large,label: I18n.t("meeting.export_pdf_dialog.footer_text.label"),caption: I18n.t("meeting.export_pdf_dialog.footer_text.caption"),visually_hide_label: false,@@ -86,7 +156,7 @@Primer::Beta::Button.new(scheme: :primary,type: :submit,- form: GENERATE_PDF_FORM_ID,+ form: MEETING_PDF_EXPORT_FORM_ID,data: {"close-dialog-id": MODAL_ID}diff --git a/modules/meeting/app/components/meetings/exports/modal_dialog_component.rb b/modules/meeting/app/components/meetings/exports/modal_dialog_component.rbindex 0af4768d0be..bd03ce41b83 100644--- a/modules/meeting/app/components/meetings/exports/modal_dialog_component.rb+++ b/modules/meeting/app/components/meetings/exports/modal_dialog_component.rb@@ -31,10 +31,12 @@module Meetingsmodule Exportsclass ModalDialogComponent < ApplicationComponent- MODAL_ID = "op-meeting-generate-pdf-dialog"- GENERATE_PDF_FORM_ID = "op-meeting-generate-pdf-dialog-form"include OpTurbo::Streamableinclude OpPrimer::ComponentHelpers++ MODAL_ID = "op-meeting-export-pdf-dialog"+ MEETING_PDF_EXPORT_FORM_ID = "op-meeting-pdf-export-dialog-form"+attr_reader :meeting, :projectdef initialize(meeting:, project:)@@ -44,9 +46,32 @@ module Meetings@project = projectend+ def templates_options+ [+ {+ id: "default",+ label: I18n.t("meeting.export_pdf_dialog.templates.default.label"),+ caption: I18n.t("meeting.export_pdf_dialog.templates.default.caption")+ },+ {+ id: "minutes",+ label: I18n.t("meeting.export_pdf_dialog.templates.minutes.label"),+ caption: I18n.t("meeting.export_pdf_dialog.templates.minutes.caption")+ }+ ]+ end++ def templates_default+ templates_options[0]+ end+def default_footer_text@project.nameend++ def default_author_text+ @meeting.author&.name || User.current.name+ endendendenddiff --git a/modules/meeting/app/workers/meetings/exporter.rb b/modules/meeting/app/workers/meetings/exporter.rbnew file mode 100644index 00000000000..67847167a62--- /dev/null+++ b/modules/meeting/app/workers/meetings/exporter.rb@@ -0,0 +1,55 @@+# frozen_string_literal: true++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See COPYRIGHT and LICENSE files for more details.+#++++module Meetings+ class Exporter < ::Exports::Exporter+ self.model = Meeting++ attr_accessor :template++ def self.key+ end++ def initialize(meeting, options = {})+ opts = options[:options] || options+ super(meeting, opts)++ self.template =+ if (opts[:template] == "minutes") && OpenProject::FeatureDecisions.minutes_styling_meeting_pdf_active?+ Meetings::PDF::Minutes::Exporter.new(meeting, opts)+ else+ Meetings::PDF::Export::Exporter.new(meeting, opts)+ end+ end++ delegate :export!, to: :template+ end+enddiff --git a/modules/meeting/app/workers/meetings/pdf/agenda.rb b/modules/meeting/app/workers/meetings/pdf/export/agenda.rbsimilarity index 98%rename from modules/meeting/app/workers/meetings/pdf/agenda.rbrename to modules/meeting/app/workers/meetings/pdf/export/agenda.rbindex caec182e395..d5fcc839932 100644--- a/modules/meeting/app/workers/meetings/pdf/agenda.rb+++ b/modules/meeting/app/workers/meetings/pdf/export/agenda.rb@@ -28,7 +28,7 @@# See COPYRIGHT and LICENSE files for more details.#++-module Meetings::PDF+module Meetings::PDF::Exportmodule Agendadef write_agendareturn if meeting.sections.empty?@@ -100,7 +100,7 @@ module Meetings::PDFdef write_agenda_item_hrhr_style = styles.agenda_item_hr- with_vertical_margin(styles.agenda_item_margins) do+ with_vertical_margin(styles.agenda_item_hr_margins) dowrite_horizontal_line(pdf.cursor,hr_style[:height],@@ -207,10 +207,11 @@ module Meetings::PDFenddef write_outcome_title+ style = styles.outcome_titlewith_vertical_margin(styles.outcome_title_margins) dopdf.formatted_text([{ text: "✓ " }.merge(styles.outcome_symbol),- { text: I18n.t("label_agenda_outcome") }.merge(styles.outcome_title)+ { text: I18n.t("label_agenda_outcome") }.merge(style)])endenddiff --git a/modules/meeting/app/workers/meetings/pdf/attachments.rb b/modules/meeting/app/workers/meetings/pdf/export/attachments.rbsimilarity index 99%rename from modules/meeting/app/workers/meetings/pdf/attachments.rbrename to modules/meeting/app/workers/meetings/pdf/export/attachments.rbindex 0d0f7a54beb..e9ab8b7615f 100644--- a/modules/meeting/app/workers/meetings/pdf/attachments.rb+++ b/modules/meeting/app/workers/meetings/pdf/export/attachments.rb@@ -28,7 +28,7 @@# See COPYRIGHT and LICENSE files for more details.#++-module Meetings::PDF+module Meetings::PDF::Exportmodule Attachmentsdef write_attachments_listreturn if meeting.attachments.empty?diff --git a/modules/meeting/app/workers/meetings/pdf/exporter.rb b/modules/meeting/app/workers/meetings/pdf/export/exporter.rbsimilarity index 90%rename from modules/meeting/app/workers/meetings/pdf/exporter.rbrename to modules/meeting/app/workers/meetings/pdf/export/exporter.rbindex c600a90ebce..dff9e2eb504 100644--- a/modules/meeting/app/workers/meetings/pdf/exporter.rb+++ b/modules/meeting/app/workers/meetings/pdf/export/exporter.rb@@ -28,7 +28,7 @@# See COPYRIGHT and LICENSE files for more details.#++-module Meetings::PDF+module Meetings::PDF::Exportclass Exporter < ::Exports::Exporterinclude Exports::PDF::Common::Commoninclude Exports::PDF::Common::Logo@@ -38,11 +38,11 @@ module Meetings::PDFinclude Exports::PDF::Common::Macroinclude Exports::PDF::Components::Pageinclude Exports::PDF::Components::Cover- include Meetings::PDF::Styles- include Meetings::PDF::PageHead- include Meetings::PDF::Participants- include Meetings::PDF::Agenda- include Meetings::PDF::Attachments+ include Meetings::PDF::Export::Styles+ include Meetings::PDF::Export::PageHead+ include Meetings::PDF::Export::Participants+ include Meetings::PDF::Export::Agenda+ include Meetings::PDF::Export::Attachmentsattr_accessor :pdf@@ -54,7 +54,7 @@ module Meetings::PDFend- def initialize(meeting, options = {})+ def initialize(meeting, options)super(meeting, options[:options] || options)@total_page_nr = nil@page_count = 0@@ -92,8 +92,10 @@ module Meetings::PDFenddef write_heading(text)- pdf.formatted_text([styles.heading.merge({ text: })])- pdf.move_down(10)+ style = styles.heading+ with_vertical_margin(styles.heading_margins) do+ pdf.formatted_text([style.merge({ text: })], style)+ endenddef write_hrdiff --git a/modules/meeting/app/workers/meetings/pdf/page_head.rb b/modules/meeting/app/workers/meetings/pdf/export/page_head.rbsimilarity index 89%rename from modules/meeting/app/workers/meetings/pdf/page_head.rbrename to modules/meeting/app/workers/meetings/pdf/export/page_head.rbindex 02883f593c2..c04cfced466 100644--- a/modules/meeting/app/workers/meetings/pdf/page_head.rb+++ b/modules/meeting/app/workers/meetings/pdf/export/page_head.rb@@ -28,7 +28,7 @@# See COPYRIGHT and LICENSE files for more details.#++-module Meetings::PDF+module Meetings::PDF::Exportmodule PageHeaddef write_page_headwith_vertical_margin(styles.page_heading_margins) do@@ -41,13 +41,15 @@ module Meetings::PDFenddef write_page_title- pdf.formatted_text([styles.page_heading.merge(+ style = styles.page_heading+ pdf.formatted_text([style.merge({ text: meeting.title, link: url_helpers.meeting_url(meeting) }- )])+ )], style)enddef write_meeting_subtitle- pdf.formatted_text([styles.page_subtitle.merge({ text: meeting_subtitle })])+ style = styles.page_subtitle+ pdf.formatted_text([style.merge({ text: meeting_subtitle })], style)enddef meeting_subtitlediff --git a/modules/meeting/app/workers/meetings/pdf/participants.rb b/modules/meeting/app/workers/meetings/pdf/export/participants.rbsimilarity index 99%rename from modules/meeting/app/workers/meetings/pdf/participants.rbrename to modules/meeting/app/workers/meetings/pdf/export/participants.rbindex ca8b95990f7..042bbd2991d 100644--- a/modules/meeting/app/workers/meetings/pdf/participants.rb+++ b/modules/meeting/app/workers/meetings/pdf/export/participants.rb@@ -28,7 +28,7 @@# See COPYRIGHT and LICENSE files for more details.#++-module Meetings::PDF+module Meetings::PDF::Exportmodule Participantsdef write_participantsreturn if participants.empty?diff --git a/modules/meeting/app/workers/meetings/pdf/schema.json b/modules/meeting/app/workers/meetings/pdf/export/schema.jsonsimilarity index 100%rename from modules/meeting/app/workers/meetings/pdf/schema.jsonrename to modules/meeting/app/workers/meetings/pdf/export/schema.jsondiff --git a/modules/meeting/app/workers/meetings/pdf/standard.yml b/modules/meeting/app/workers/meetings/pdf/export/standard.ymlsimilarity index 99%rename from modules/meeting/app/workers/meetings/pdf/standard.ymlrename to modules/meeting/app/workers/meetings/pdf/export/standard.ymlindex d121337f0b7..92bdb3e1954 100644--- a/modules/meeting/app/workers/meetings/pdf/standard.yml+++ b/modules/meeting/app/workers/meetings/pdf/export/standard.yml@@ -407,7 +407,7 @@ outcome:heading:size: 11styles: [ "bold" ]- margin_bottom: 8+ margin_bottom: 10hr:color: "6E7781"height: 1diff --git a/modules/meeting/app/workers/meetings/pdf/styles.rb b/modules/meeting/app/workers/meetings/pdf/export/styles.rbsimilarity index 95%rename from modules/meeting/app/workers/meetings/pdf/styles.rbrename to modules/meeting/app/workers/meetings/pdf/export/styles.rbindex af6fe17e231..32d1c54c1a7 100644--- a/modules/meeting/app/workers/meetings/pdf/styles.rb+++ b/modules/meeting/app/workers/meetings/pdf/export/styles.rb@@ -28,7 +28,7 @@# See COPYRIGHT and LICENSE files for more details.#++-module Meetings::PDF::Styles+module Meetings::PDF::Export::Stylesclass PDFStylesinclude MarkdownToPDF::Commoninclude MarkdownToPDF::StyleHelper@@ -45,7 +45,7 @@ module Meetings::PDF::Stylesenddef notes_markdown_margins- resolve_margin(@styles.dig(:work_package, :markdown_margin))+ resolve_margin(@styles.dig(:notes, :markdown_margin))enddef notes_markdown_styling_yml@@ -60,6 +60,10 @@ module Meetings::PDF::Stylesresolve_font(@styles[:heading])end+ def heading_margins+ resolve_margin(@styles[:heading])+ end+def heading_hr{color: @styles.dig(:heading, :hr, :color),@@ -118,12 +122,8 @@ module Meetings::PDF::Styles}end- def agenda_item_margins- resolve_margin(@styles.dig(:agenda_item, :hr))- end-- def heading_margins- resolve_margin(@styles[:heading])+ def agenda_item_hr_margins+ resolve_margin(@styles.dig(:agenda_item, :margins))enddef participants_table_celldiff --git a/modules/meeting/app/workers/meetings/pdf/minutes/agenda.rb b/modules/meeting/app/workers/meetings/pdf/minutes/agenda.rbnew file mode 100644index 00000000000..b348cdff696--- /dev/null+++ b/modules/meeting/app/workers/meetings/pdf/minutes/agenda.rb@@ -0,0 +1,217 @@+# frozen_string_literal: true++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See COPYRIGHT and LICENSE files for more details.+#++++module Meetings::PDF::Minutes+ module Agenda+ def write_agenda+ return if meeting.sections.empty?++ write_optional_page_break+ write_agenda_sections+ end++ def write_backlog+ return if meeting.backlog.blank? || meeting.backlog.agenda_items.empty?++ write_heading(meeting.recurring? ? I18n.t("label_series_backlog") : I18n.t("label_agenda_backlog"))+ write_agenda_items(meeting.backlog)+ end++ def write_agenda_sections+ meeting.sections.each_with_index { |section, index| write_section(section, index) }+ end++ def write_section(section, index)+ write_optional_page_break+ write_section_title(section, index)+ write_agenda_items(section, index)+ end++ def write_section_title(section, index)+ margins = styles.agenda_section_title_table_margins+ with_vertical_margin(margins) do+ pdf.table(+ [[+ { content: "#{index + 1}." },+ { content: format_agenda_section_title_cell(section) }+ ]],+ width: pdf.bounds.width,+ column_widths: [40, pdf.bounds.width - 40],+ cell_style: { inline_format: true }.merge(styles.agenda_section_title_cell)+ )+ end+ end++ def format_agenda_section_title_cell(section)+ content = [prawn_table_cell_inline_formatting_data(section_title(section), styles.agenda_section_title)]+ if section.agenda_items_sum_duration_in_minutes > 0+ content.push(+ prawn_table_cell_inline_formatting_data(+ format_duration(section.agenda_items_sum_duration_in_minutes),+ styles.agenda_section_subtitle+ )+ )+ end+ content.join(" ")+ end++ def format_duration(duration)+ OpenProject::Common::DurationComponent.new(duration, :minutes, abbreviated: true).text+ end++ def section_title(section)+ section.title.presence || I18n.t("meeting_section.untitled_title")+ end++ def write_agenda_items(section, section_index)+ section.agenda_items.each_with_index do |item, index|+ write_optional_page_break+ with_vertical_margin(styles.agenda_item_margins) do+ write_agenda_item(item, section_index, index)+ end+ end+ end++ def write_agenda_item(agenda_item, section_index, index)+ case agenda_item.item_type.to_sym+ when :simple+ write_agenda_title_item_simple(agenda_item, section_index, index)+ when :work_package+ write_agenda_title_item_wp(agenda_item, section_index, index)+ end+ write_notes(agenda_item)+ write_outcome(agenda_item) if with_outcomes?+ end++ def write_agenda_item_title(title, section_index, index)+ with_vertical_margin(styles.agenda_item_title_margins) do+ pdf.table(+ [[+ { content: "#{section_index + 1}.#{index + 1}." },+ { content: title }+ ]],+ width: pdf.bounds.width,+ column_widths: [40, pdf.bounds.width - 40],+ cell_style: { inline_format: true }.merge(styles.agenda_item_title_cell)+ )+ end+ end++ def format_agenda_item_cell(text, duration, user)+ content = [format_agenda_item_title(text)]+ content.push(format_agenda_item_subtitle(format_duration(duration))) if duration > 0+ content.push(format_agenda_item_subtitle(user.name)) unless user.nil?+ content.join(" ")+ end++ def format_agenda_item_subtitle(text)+ prawn_table_cell_inline_formatting_data(text, styles.agenda_item_subtitle)+ end++ def format_agenda_item_title(title)+ prawn_table_cell_inline_formatting_data(title, styles.agenda_item_title)+ end++ def agenda_title_wp(work_package)+ href = url_helpers.work_package_url(work_package)+ make_link_href(+ href,+ prawn_table_cell_inline_formatting_data(+ "#{work_package.type.name} ##{work_package.id} #{work_package.subject}",+ { styles: [:underline] }+ )+ )+ end++ def write_agenda_title_item_wp(agenda_item, section_index, index)+ write_agenda_item_title(agenda_wp_title_row(agenda_item), section_index, index)+ end++ def agenda_wp_title_row(agenda_item)+ if agenda_item.visible_work_package?+ work_package = agenda_item.work_package+ [agenda_title_wp(work_package), "(#{work_package.status.name})"].join(" ")+ elsif agenda_item.linked_work_package?+ I18n.t(:label_agenda_item_undisclosed_wp, id: agenda_item.work_package_id)+ elsif agenda_item.deleted_work_package?+ I18n.t(:label_agenda_item_deleted_wp)+ else+ agenda_item.title+ end+ end++ def write_agenda_title_item_simple(agenda_item, section_index, index)+ write_agenda_item_title(agenda_item.title, section_index, index)+ end++ def write_notes(agenda_item)+ return if agenda_item.notes.blank?++ with_vertical_margin(styles.notes_markdown_margins) do+ write_markdown!(+ apply_markdown_field_macros(agenda_item.notes, { project: meeting.project, user: User.current }),+ styles.notes_markdown_styling_yml+ )+ end+ end++ def write_outcome(agenda_item)+ return unless agenda_item.outcomes.exists?++ outcome = agenda_item.outcomes.information_kind.last+ return if outcome.notes.blank?++ pdf.indent(styles.outcome_indent) do+ write_optional_page_break+ write_outcome_title+ write_outcome_notes(outcome.notes)+ end+ end++ def write_outcome_title+ with_vertical_margin(styles.outcome_title_margins) do+ style = styles.outcome_title+ pdf.formatted_text([+ styles.outcome_symbol.merge({ text: "✓ " }),+ style.merge({ text: I18n.t("label_agenda_outcome") })+ ], style)+ end+ end++ def write_outcome_notes(notes)+ with_vertical_margin(styles.outcome_markdown_margins) do+ write_markdown!(+ apply_markdown_field_macros(notes, { project: meeting.project, user: User.current }),+ styles.outcome_markdown_styling_yml+ )+ end+ end+ end+enddiff --git a/modules/meeting/app/workers/meetings/pdf/minutes/exporter.rb b/modules/meeting/app/workers/meetings/pdf/minutes/exporter.rbnew file mode 100644index 00000000000..cc7e21b02d0--- /dev/null+++ b/modules/meeting/app/workers/meetings/pdf/minutes/exporter.rb@@ -0,0 +1,220 @@+# frozen_string_literal: true++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See COPYRIGHT and LICENSE files for more details.+#++++module Meetings::PDF::Minutes+ class Exporter < ::Exports::Exporter+ include Exports::PDF::Common::Common+ include Exports::PDF::Common::Logo+ include Exports::PDF::Common::Markdown+ include Exports::PDF::Common::Attachments+ include Exports::PDF::Common::Macro+ include Exports::PDF::Components::Page+ include Meetings::PDF::Minutes::Styles+ include Meetings::PDF::Minutes::PageHead+ include Meetings::PDF::Minutes::Agenda++ attr_accessor :pdf++ self.model = Meeting++ alias :meeting :object++ def self.key+ end++ def initialize(meeting, options)+ super(meeting, options[:options] || options)+ @total_page_nr = nil+ @page_count = 0++ setup_page!+ end++ def setup_page!+ self.pdf = get_pdf+ pdf.title = heading+ configure_page_size!(:portrait)+ end++ def export!+ render_doc+ render_doc_again_with_total_page_nrs if wants_total_page_nrs?+ success(pdf.render)+ rescue StandardError => e+ Rails.logger.error "Failed to generate PDF export: #{e.message}:\n#{e.backtrace.join("\n")}"+ error(I18n.t(:error_pdf_failed_to_export, error: e.message))+ end++ def render_doc+ render_meeting+ end++ def render_doc_again_with_total_page_nrs+ @total_page_nr = pdf.page_count + @page_count+ @page_count = 0+ setup_page! # clear current pdf+ render_doc+ end++ def render_meeting+ write_page_head+ write_agenda+ write_headers!+ write_minutes_footers+ write_footer_logo+ end++ def write_heading(text)+ style = styles.heading+ with_vertical_margin(styles.heading_margins) do+ pdf.formatted_text([style.merge({ text: })], style)+ end+ end++ def cover_page_title+ project_title+ end++ def cover_page_heading+ meeting.title+ end++ def cover_page_dates+ [+ "#{meeting_mode},",+ "#{format_date(meeting.start_time)},",+ format_time(meeting.start_time, include_date: false),+ "–",+ format_time(meeting.end_time, include_date: false)+ ].join(" ")+ end++ def meeting_mode+ meeting.state == "open" ? I18n.t("label_meeting_agenda") : I18n.t("label_meeting_minutes")+ end++ def cover_page_subheading+ meeting.location+ end++ def heading+ meeting.title+ end++ def project_title+ meeting.project&.name || ""+ end++ def write_minutes_footers+ pdf.repeat lambda { |pg| header_footer_filter_pages.exclude?(pg) }, dynamic: true do+ draw_minutes_footer_on_page+ end+ end++ def write_footer_logo+ footer_image = File.join(File.dirname(File.expand_path(__FILE__)), "footer.png")+ image_obj, image_info = pdf.build_image_object(footer_image)+ pdf.repeat lambda { |pg| header_footer_filter_pages.exclude?(pg) } do+ pdf.embed_image image_obj, image_info, { at: [-styles.page_margin_left, -23], height: 8 }+ end+ end++ def draw_minutes_footer_on_page+ top = styles.page_footer_offset+ text_style = styles.page_footer+ pos_right = draw_text_right(footer_page_nr, text_style, top)+ spacing = styles.page_footer_horizontal_spacing+ draw_text_multiline_left(+ text: footer_minutes,+ text_style:,+ available_width: pdf.bounds.width - spacing - pos_right,+ top:,+ max_lines: :MAX_NR_OF_PDF_FOOTER_LINES+ )+ end++ def minutes_author+ options[:author] || ""+ end++ def footer_minutes+ "#{meeting.title} • #{format_date(meeting.start_time)}"+ end++ def footer_page_nr+ "S. #{current_page_nr}#{total_page_nr_text}"+ end++ def total_page_nr_text+ if @total_page_nr+ " von #{@total_page_nr - (with_cover? ? 1 : 0)}"+ else+ ""+ end+ end++ def title_datetime+ meeting.start_time.strftime("%Y-%m-%d")+ end++ def title+ build_pdf_filename(meeting.title)+ end++ def with_participants?+ ActiveModel::Type::Boolean.new.cast(options[:participants])+ end++ def with_attachments_list?+ ActiveModel::Type::Boolean.new.cast(options[:attachments])+ end++ def with_backlog?+ ActiveModel::Type::Boolean.new.cast(options[:backlog])+ end++ def with_outcomes?+ ActiveModel::Type::Boolean.new.cast(options[:outcomes])+ end++ def with_cover?+ false+ end++ def wants_total_page_nrs?+ true+ end++ def with_images?+ true+ end+ end+enddiff --git a/modules/meeting/app/workers/meetings/pdf/minutes/footer.png b/modules/meeting/app/workers/meetings/pdf/minutes/footer.pngnew file mode 100644index 00000000000..25cc7ff0c2cBinary files /dev/null and b/modules/meeting/app/workers/meetings/pdf/minutes/footer.png differdiff --git a/modules/meeting/app/workers/meetings/pdf/minutes/page_head.rb b/modules/meeting/app/workers/meetings/pdf/minutes/page_head.rbnew file mode 100644index 00000000000..ddae5426ede--- /dev/null+++ b/modules/meeting/app/workers/meetings/pdf/minutes/page_head.rb@@ -0,0 +1,78 @@+# frozen_string_literal: true++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See COPYRIGHT and LICENSE files for more details.+#++++module Meetings::PDF::Minutes+ module PageHead+ def write_page_head+ write_page_title+ write_page_subheading+ write_meeting_subtitle+ end++ def write_page_title+ style = styles.page_heading+ with_vertical_margin(styles.page_heading_margins) do+ pdf.formatted_text([style.merge({ text: meeting.title })], style)+ end+ end++ def write_page_subheading+ style = styles.page_subheading+ with_vertical_margin(styles.page_subheading_margins) do+ pdf.formatted_text([style.merge({ text: "Protokoll" })], style)+ end+ end++ def write_meeting_subtitle+ style = styles.page_subtitle+ with_vertical_margin(styles.page_subtitle_margins) do+ pdf.formatted_text([style.merge({ text: meeting_subtitle })], style)+ end+ end++ def meeting_subtitle+ list = [+ "#{I18n.t("meeting.export.minutes.date")}:",+ format_date(meeting.start_time),+ "|",+ "#{I18n.t("meeting.export.minutes.time")}:",+ format_time(meeting.start_time, include_date: false), "–", format_time(meeting.end_time, include_date: false),+ ]+ if meeting.location.present?+ list += ["|", "#{I18n.t("meeting.export.minutes.location")}:", meeting.location]+ end+ result = list.join(" ")+ if minutes_author.present?+ result += "\n#{I18n.t("meeting.export.minutes.author")}: #{minutes_author}"+ end+ result+ end+ end+enddiff --git a/modules/meeting/app/workers/meetings/pdf/minutes/schema.json b/modules/meeting/app/workers/meetings/pdf/minutes/schema.jsonnew file mode 100644index 00000000000..ca242824c32--- /dev/null+++ b/modules/meeting/app/workers/meetings/pdf/minutes/schema.json@@ -0,0 +1,1847 @@+{+ "type": "object",+ "title": "Meetings PDF",+ "properties": {+ "page": {+ "$ref": "#/$defs/page"+ },+ "page_logo": {+ "$ref": "#/$defs/page_logo"+ },+ "page_header": {+ "$ref": "#/$defs/page_header"+ },+ "page_footer": {+ "$ref": "#/$defs/page_footer"+ },+ "page_heading": {+ "$ref": "#/$defs/page_heading"+ },+ "page_subtitle": {+ "$ref": "#/$defs/page_heading"+ },+ "page_subheading": {+ "$ref": "#/$defs/page_heading"+ },+ "cover": {+ "$ref": "#/$defs/cover"+ },+ "notes": {+ "$ref": "#/$defs/notes"+ },+ "outcome": {+ "$ref": "#/$defs/outcome"+ },+ "heading": {+ "type": "object",+ "title": "Heading",+ "description": "Styling for the heading of the PDF meeting export",+ "x-example": {+ "heading": {+ "size": 12,+ "styles": [+ "bold"+ ],+ "margin_bottom": 10+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/font"+ },+ {+ "$ref": "#/$defs/margin"+ }+ ]+ },+ "agenda_item": {+ "type": "object",+ "title": "Agenda item",+ "description": "Styling for a agenda item of the PDF meeting export",+ "x-example": {+ "agenda_item": {+ }+ },+ "properties": {+ "title_cell": {+ "title": "Agenda item title table cell",+ "description": "Styling for a table cell with the agenda item title",+ "$ref": "#/$defs/table_cell"+ },+ "title": {+ "$ref": "#/$defs/font"+ },+ "subtitle": {+ "$ref": "#/$defs/font"+ },+ "title_margin": {+ "$ref": "#/$defs/margin"+ },+ "margin": {+ "$ref": "#/$defs/margin"+ },+ "indent": {+ "title": "Indent width",+ "description": "Indent for agenda item notes",+ "$ref": "#/$defs/measurement"+ }+ }+ },+ "agenda_section": {+ "type": "object",+ "title": "Agenda section",+ "description": "Styling for a agenda section of the PDF meeting export",+ "x-example": {+ "agenda_section": {+ }+ },+ "properties": {+ "title_cell": {+ "title": "Agenda section title table cell",+ "description": "Styling for a table cell with the agenda section title",+ "$ref": "#/$defs/table_cell"+ },+ "title": {+ "$ref": "#/$defs/font"+ },+ "subtitle": {+ "$ref": "#/$defs/font"+ },+ "title_margins": {+ "$ref": "#/$defs/margin"+ }+ }+ },+ "participants": {+ "type": "object",+ "title": "Participants",+ "description": "Styling for the participants table",+ "x-example": {+ "margin_bottom": 12,+ "cell": {+ "size": 10,+ "padding_left": 0,+ "no_border": true+ }+ },+ "properties": {+ "status": {+ "title": "Status",+ "description": "Styling for the status text in the participants table",+ "$ref": "#/$defs/font"+ },+ "cell": {+ "title": "Participant table cell",+ "description": "Styling for a table cell with a participant name",+ "$ref": "#/$defs/table_cell"+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/margin"+ }+ ]+ },+ "attachments": {+ "type": "object",+ "title": "Attachments",+ "description": "Styling for the attachments table",+ "x-example": {+ "margin_bottom": 12,+ "cell": {+ "size": 10,+ "padding_left": 0,+ "no_border": true+ }+ },+ "properties": {+ "cell": {+ "title": "Attachments table cell",+ "description": "Styling for a table cell with a attachment name",+ "$ref": "#/$defs/table_cell"+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/margin"+ }+ ]+ }+ },+ "required": [],+ "additionalProperties": false,+ "$defs": {+ "cover": {+ "title": "Cover page",+ "description": "Styling for the cover page of the PDF report export",+ "x-example": {+ "cover": {+ "header": {},+ "footer": {},+ "hero": {}+ }+ },+ "type": "object",+ "properties": {+ "header": {+ "title": "Cover page header",+ "description": "Styling for the cover page header",+ "$ref": "#/$defs/cover_header"+ },+ "footer": {+ "title": "Cover page footer",+ "description": "Styling for the cover page footer",+ "$ref": "#/$defs/cover_footer"+ },+ "hero": {+ "title": "Cover page hero",+ "description": "Styling for the hero banner at the bottom at the cover page",+ "$ref": "#/$defs/cover_hero"+ }+ }+ },+ "cover_header": {+ "title": "Cover page header",+ "description": "Styling for the cover page header of the PDF report export",+ "x-example": {+ "header": {+ "logo_height": 25,+ "border": {}+ }+ },+ "type": "object",+ "properties": {+ "spacing": {+ "title": "Minimum spacing between logo and page header text",+ "examples": [+ 20+ ],+ "$ref": "#/$defs/measurement"+ },+ "offset": {+ "title": "Offset position from page top",+ "examples": [+ 6.5+ ],+ "$ref": "#/$defs/measurement"+ },+ "logo_height": {+ "title": "Height of the logo in the page header",+ "examples": [+ 25+ ],+ "$ref": "#/$defs/measurement"+ },+ "border": {+ "title": "Cover page header",+ "description": "Styling for the cover page header",+ "$ref": "#/$defs/cover_header_border"+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/font"+ }+ ]+ },+ "cover_hero": {+ "title": "Cover page hero",+ "description": "Styling for the hero banner at the bottom at the cover page",+ "x-example": {+ "header": {+ "padding_right": 150,+ "padding_top": 120,+ "title": {},+ "heading": {},+ "subheading": {}+ }+ },+ "type": "object",+ "properties": {+ "padding_right": {+ "title": "Padding right",+ "description": "Padding only on the right side of the hero banner",+ "$ref": "#/$defs/measurement"+ },+ "padding_top": {+ "title": "Padding top",+ "description": "Padding only on the top side of the hero banner",+ "$ref": "#/$defs/measurement"+ },+ "title": {+ "title": "The first block in the hero",+ "type": "object",+ "x-example": {+ "title": {+ "max_height": 30,+ "spacing": 10,+ "font": "SpaceMono",+ "size": 10,+ "color": "414d5f"+ }+ },+ "properties": {+ "spacing": {+ "title": "Minimum spacing between title and heading",+ "examples": [+ 10+ ],+ "$ref": "#/$defs/measurement"+ },+ "max_height": {+ "title": "Maximum height of the block",+ "examples": [+ 30+ ],+ "$ref": "#/$defs/measurement"+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/font"+ }+ ]+ },+ "heading": {+ "title": "The main block in the hero",+ "type": "object",+ "x-example": {+ "heading": {+ "spacing": 10,+ "size": 32,+ "color": "414d5f",+ "styles": [+ "bold"+ ]+ }+ },+ "properties": {+ "spacing": {+ "title": "Minimum spacing between heading and subheading",+ "examples": [+ 10+ ],+ "$ref": "#/$defs/measurement"+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/font"+ }+ ]+ },+ "dates": {+ "title": "The dates block in the hero",+ "type": "object",+ "x-example": {+ "heading": {+ "spacing": 10,+ "max_height": 20,+ "size": 32,+ "color": "414d5f",+ "styles": [+ "bold"+ ]+ }+ },+ "properties": {+ "max_height": {+ "title": "Maximum height of the block",+ "examples": [+ 30+ ],+ "$ref": "#/$defs/measurement"+ },+ "spacing": {+ "title": "Minimum spacing between dates and subheading",+ "examples": [+ 10+ ],+ "$ref": "#/$defs/measurement"+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/font"+ }+ ]+ },+ "subheading": {+ "title": "The last block in the hero",+ "type": "object",+ "x-example": {+ "subheading": {+ "max_height": 30,+ "size": 10,+ "color": "414d5f",+ "styles": [+ "italic"+ ]+ }+ },+ "properties": {+ "max_height": {+ "title": "Maximum height of the block",+ "examples": [+ 30+ ],+ "$ref": "#/$defs/measurement"+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/font"+ }+ ]+ }+ }+ },+ "cover_footer": {+ "title": "Cover page footer",+ "description": "Styling for the cover page footer of the PDF report export",+ "x-example": {+ "footer": {+ "offset": 20,+ "size": 10,+ "color": "064e80"+ }+ },+ "type": "object",+ "properties": {+ "offset": {+ "title": "Offset position from page bottom",+ "examples": [+ 30+ ],+ "$ref": "#/$defs/measurement"+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/font"+ }+ ]+ },+ "cover_header_border": {+ "title": "Cover page header border",+ "description": "Styling for the cover page header border of the PDF report export",+ "x-example": {+ "border": {+ "color": "d3dee3",+ "height": 1,+ "offset": 6+ }+ },+ "type": "object",+ "properties": {+ "spacing": {+ "title": "Minimum spacing between logo and page header text",+ "examples": [+ 20+ ],+ "$ref": "#/$defs/measurement"+ },+ "offset": {+ "title": "Offset position from page top",+ "examples": [+ 6+ ],+ "$ref": "#/$defs/measurement"+ },+ "height": {+ "title": "Line height of the border",+ "examples": [+ 25+ ],+ "$ref": "#/$defs/measurement"+ },+ "color": {+ "title": "Line color of the border",+ "$ref": "#/$defs/color"+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/font"+ }+ ]+ },+ "color": {+ "type": "string",+ "title": "Color",+ "description": "A color in RRGGBB format",+ "examples": [+ "F0F0F0"+ ],+ "x-example": {+ "color": "F0F0F0"+ },+ "pattern": "^(?:[0-9a-fA-F]{3}){1,2}$"+ },+ "font": {+ "title": "Font properties",+ "description": "Properties to set the font style",+ "type": "object",+ "x-example": {+ "font": "OpenSans",+ "size": 10,+ "character_spacing": 0,+ "styles": [],+ "color": "000000",+ "leading": 2+ },+ "properties": {+ "font": {+ "type": "string"+ },+ "size": {+ "$ref": "#/$defs/measurement"+ },+ "character_spacing": {+ "$ref": "#/$defs/measurement"+ },+ "leading": {+ "$ref": "#/$defs/measurement"+ },+ "color": {+ "$ref": "#/$defs/color"+ },+ "styles": {+ "type": "array",+ "items": {+ "$ref": "#/$defs/font_style"+ }+ }+ }+ },+ "font_style": {+ "type": "string",+ "title": "Font Style",+ "description": "Style of the font to use",+ "examples": [+ "bold"+ ],+ "enum": [+ "bold",+ "italic",+ "underline",+ "strikethrough",+ "superscript",+ "subscript"+ ]+ },+ "page": {+ "title": "Page settings",+ "description": "Properties to set the basic page settings",+ "type": "object",+ "x-example": {+ "page": {+ "page_size": "EXECUTIVE",+ "margin_top": 60,+ "margin_bottom": 60,+ "margin_left": 36,+ "margin_right": 36,+ "page_break_threshold": 200,+ "link_color": "175A8E"+ }+ },+ "properties": {+ "link_color": {+ "title": "Link color",+ "description": "Set the color of clickable links",+ "$ref": "#/$defs/color"+ },+ "page_layout": {+ "title": "Page layout",+ "description": "The layout of a page",+ "type": "string",+ "examples": [+ "portrait"+ ],+ "enum": [+ "portrait",+ "landscape"+ ]+ },+ "page_size": {+ "type": "string",+ "title": "Page size",+ "description": "The size of a page",+ "examples": [+ "EXECUTIVE"+ ],+ "enum": [+ "EXECUTIVE",+ "TABLOID",+ "LETTER",+ "LEGAL",+ "FOLIO",+ "A0",+ "A1",+ "A2",+ "A3",+ "A4",+ "A5",+ "A6",+ "A7",+ "A8",+ "A9",+ "A10",+ "B0",+ "B1",+ "B2",+ "B3",+ "B4",+ "B5",+ "B6",+ "B7",+ "B8",+ "B9",+ "B10",+ "C0",+ "C1",+ "C2",+ "C3",+ "C4",+ "C5",+ "C6",+ "C7",+ "C8",+ "C9",+ "C10",+ "RA0",+ "RA1",+ "RA2",+ "RA3",+ "RA4",+ "SRA0",+ "SRA1",+ "SRA2",+ "SRA3",+ "SRA4",+ "4A0",+ "2A0"+ ]+ },+ "page_break_threshold": {+ "title": "Page break threshold",+ "description": "If there is a new section, start a new page if space less than the threshold is available",+ "$ref": "#/$defs/measurement"+ }+ },+ "allOf": [+ {+ "title": "Default font settings",+ "$ref": "#/$defs/font"+ },+ {+ "title": "Page margins",+ "$ref": "#/$defs/margin"+ }+ ]+ },+ "page_heading": {+ "title": "Page heading",+ "description": "The main page title heading",+ "x-example": {+ "page_heading": {+ "size": 14,+ "styles": [+ "bold"+ ],+ "margin_bottom": 10+ }+ },+ "type": "object",+ "allOf": [+ {+ "$ref": "#/$defs/font"+ },+ {+ "$ref": "#/$defs/margin"+ }+ ]+ },+ "page_footer": {+ "type": "object",+ "title": "Page footers",+ "x-example": {+ "page_footer": {+ "offset": -30,+ "size": 8+ }+ },+ "properties": {+ "offset": {+ "title": "Offset position from page bottom",+ "examples": [+ -30+ ],+ "$ref": "#/$defs/measurement_signed"+ },+ "spacing": {+ "title": "Minimum spacing between different page footers",+ "examples": [+ 8+ ],+ "$ref": "#/$defs/measurement"+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/font"+ }+ ]+ },+ "page_header": {+ "type": "object",+ "title": "Page headers",+ "x-example": {+ "page_header": {+ "align": "left",+ "offset": 20,+ "size": 8+ }+ },+ "properties": {+ "align": {+ "$ref": "#/$defs/alignment"+ },+ "offset": {+ "title": "Offset position from page top",+ "examples": [+ -30+ ],+ "$ref": "#/$defs/measurement_signed"+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/font"+ }+ ]+ },+ "page_logo": {+ "title": "Page logo",+ "description": "Styling for logo image in the page header.",+ "type": "object",+ "x-example": {+ "page_logo": {+ "height": 20,+ "align": "right"+ }+ },+ "properties": {+ "height": {+ "$ref": "#/$defs/measurement",+ "title": "Height of the image"+ },+ "align": {+ "$ref": "#/$defs/alignment"+ },+ "offset": {+ "title": "Offset position from page top",+ "examples": [+ -30+ ],+ "$ref": "#/$defs/measurement_signed"+ }+ }+ },+ "margin": {+ "title": "Margin properties",+ "description": "Properties to set margins",+ "type": "object",+ "x-example": {+ "margin": "10mm",+ "margin_top": "15mm"+ },+ "properties": {+ "margin": {+ "title": "Margin",+ "description": "One value for margin on all sides",+ "$ref": "#/$defs/measurement"+ },+ "margin_left": {+ "title": "Margin left",+ "description": "Margin only on the left side",+ "$ref": "#/$defs/measurement"+ },+ "margin_right": {+ "title": "Margin right",+ "description": "Margin only on the right side",+ "$ref": "#/$defs/measurement"+ },+ "margin_top": {+ "title": "Margin top",+ "description": "Margin only on the top side",+ "$ref": "#/$defs/measurement"+ },+ "margin_bottom": {+ "title": "Margin bottom",+ "description": "Margin only on the bottom side",+ "$ref": "#/$defs/measurement"+ }+ }+ },+ "padding": {+ "title": "Padding Properties",+ "description": "Properties to set paddings",+ "type": "object",+ "x-example": {+ "padding": "10mm",+ "padding_top": "15mm"+ },+ "properties": {+ "padding": {+ "title": "Padding",+ "description": "One value for padding on all sides",+ "$ref": "#/$defs/measurement"+ },+ "padding_left": {+ "title": "Padding left",+ "description": "Padding only on the left side",+ "$ref": "#/$defs/measurement"+ },+ "padding_right": {+ "title": "Padding right",+ "description": "Padding only on the right side",+ "$ref": "#/$defs/measurement"+ },+ "padding_top": {+ "title": "Padding top",+ "description": "Padding only on the top side",+ "$ref": "#/$defs/measurement"+ },+ "padding_bottom": {+ "title": "Padding bottom",+ "description": "Padding only on the bottom side",+ "$ref": "#/$defs/measurement"+ }+ }+ },+ "measurement": {+ "type": [+ "number",+ "string"+ ],+ "pattern": "^([0-9\\.]+)(mm|cm|dm|m|in|ft|yr|pt)$",+ "description": "A number >= 0 and an optional unit",+ "examples": [+ "10mm",+ "10"+ ]+ },+ "measurement_signed": {+ "type": [+ "number",+ "string"+ ],+ "pattern": "^-?([0-9\\.]+)(mm|cm|dm|m|in|ft|yr|pt)$",+ "description": "A positive or negative number and an optional unit"+ },+ "alignment": {+ "title": "Alignment",+ "description": "How the element should be aligned",+ "examples": [+ "center"+ ],+ "type": "string",+ "enum": [+ "left",+ "center",+ "right"+ ]+ },+ "unordered_list": {+ "title": "Markdown unordered list",+ "x-example": {+ "unordered_list": {+ "spacing": "1.5mm",+ "padding_top": "2mm",+ "padding_bottom": "2mm"+ }+ },+ "type": "object",+ "properties": {+ "spacing": {+ "title": "Spacing",+ "description": "Additional space between list items",+ "$ref": "#/$defs/measurement"+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/font"+ },+ {+ "$ref": "#/$defs/padding"+ }+ ]+ },+ "unordered_list_point": {+ "title": "Markdown unordered list point",+ "x-example": {+ "unordered_list_point": {+ "sign": "•",+ "spacing": "0.75mm"+ }+ },+ "type": "object",+ "properties": {+ "sign": {+ "title": "Sign",+ "description": "The 'bullet point' character used in the list",+ "type": "string"+ },+ "spacing": {+ "title": "Spacing",+ "description": "Space between point and list item content",+ "$ref": "#/$defs/measurement"+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/font"+ }+ ]+ },+ "task_list_point": {+ "type": "object",+ "title": "Markdown task list point",+ "x-example": {+ "task_list_point": {+ "checked": "☑",+ "unchecked": "☐",+ "spacing": "0.75mm"+ }+ },+ "properties": {+ "checked": {+ "title": "Checked sign",+ "description": "Sign for checked state of a task list item",+ "type": "string"+ },+ "unchecked": {+ "title": "Unchecked sign",+ "description": "Sign for unchecked state of a task list item",+ "type": "string"+ },+ "spacing": {+ "title": "Spacing",+ "description": "Additional space between point and list item content",+ "$ref": "#/$defs/measurement"+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/font"+ }+ ]+ },+ "ordered_list": {+ "title": "Markdown ordered list",+ "x-example": {+ "ordered_list": {+ "spacing": "2mm",+ "point_inline": false+ }+ },+ "type": "object",+ "properties": {+ "spacing": {+ "title": "Spacing",+ "description": "Additional space between list items",+ "$ref": "#/$defs/measurement"+ },+ "point_inline": {+ "title": "Inline Point",+ "description": "Do not indent paragraph text, but include the point into the first paragraph",+ "type": "boolean"+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/font"+ },+ {+ "$ref": "#/$defs/padding"+ }+ ]+ },+ "ordered_list_point": {+ "title": "Markdown ordered list point",+ "type": "object",+ "x-example": {+ "ordered_list_point": {+ "template": "<number>.",+ "list_style_type": "decimal",+ "spacing": "0.75mm",+ "spanning": true+ }+ },+ "properties": {+ "spacing": {+ "$ref": "#/$defs/measurement"+ },+ "alphabetical": {+ "title": "Alphabetical bullet points",+ "description": "(deprecated; use list_style_type) Convert the list item number into a character, eg. `a.` `b.` `c.`",+ "type": "boolean"+ },+ "list_style_type": {+ "title": "List style type",+ "description": "The style of the list bullet points, eg. `decimal`, `lower-latin`, `upper-roman`",+ "type": "string",+ "enum": [+ "decimal",+ "lower-latin",+ "lower-roman",+ "upper-latin",+ "upper-roman"+ ]+ },+ "spanning": {+ "title": "Spanning",+ "description": "Use the width of the largest bullet as indention.",+ "type": "boolean"+ },+ "template": {+ "title": "Template",+ "description": "customize what the prefix should contain, eg. `(<number>)`",+ "type": "string"+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/font"+ }+ ]+ },+ "header": {+ "type": "object",+ "title": "Markdown header",+ "x-example": {+ "header": {+ "styles": [+ "bold"+ ],+ "padding_top": "2mm",+ "padding_bottom": "2mm"+ },+ "header_1": {+ "size": 14,+ "styles": [+ "bold",+ "italic"+ ]+ },+ "header_2": {+ "size": 12,+ "styles": [+ "bold"+ ]+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/font"+ },+ {+ "$ref": "#/$defs/padding"+ }+ ]+ },+ "table_cell": {+ "type": "object",+ "title": "Table cell",+ "description": "Styling for a table cell",+ "x-example": {+ "table_cell": {+ "size": 9,+ "color": "000000",+ "padding": 5,+ "border_width": 1+ }+ },+ "properties": {+ "background_color": {+ "$ref": "#/$defs/color"+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/font"+ },+ {+ "$ref": "#/$defs/padding"+ },+ {+ "$ref": "#/$defs/border"+ },+ {+ "$ref": "#/$defs/cell_alignment"+ }+ ]+ },+ "table_header": {+ "type": "object",+ "title": "Table header cell",+ "description": "Styling for a table header cell",+ "x-example": {+ "table_header": {+ "size": 9,+ "styles": [+ "bold"+ ]+ }+ },+ "properties": {+ "background_color": {+ "$ref": "#/$defs/color"+ },+ "no_repeating": {+ "type": "boolean"+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/font"+ },+ {+ "$ref": "#/$defs/padding"+ },+ {+ "$ref": "#/$defs/border"+ },+ {+ "$ref": "#/$defs/cell_alignment"+ }+ ]+ },+ "cell_alignment": {+ "type": "object",+ "title": "Cell alignment properties",+ "description": "Properties to set vertical and horizontal alignment of table cells",+ "x-example": {+ "align": "center",+ "valign": "middle"+ },+ "properties": {+ "align": {+ "title": "Horizontal alignment",+ "description": "Set the horizontal alignment of the content in a cell",+ "examples": [+ "center"+ ],+ "type": "string",+ "enum": [+ "left",+ "center",+ "right"+ ]+ },+ "valign": {+ "title": "Vertical alignment",+ "description": "Border width only on the left side",+ "examples": [+ "middle"+ ],+ "type": "string",+ "enum": [+ "top",+ "center",+ "middle",+ "bottom"+ ]+ }+ }+ },+ "paragraph": {+ "type": "object",+ "title": "Markdown paragraph",+ "properties": {+ "align": {+ "type": "string",+ "enum": [+ "left",+ "center",+ "right",+ "justify"+ ]+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/font"+ },+ {+ "$ref": "#/$defs/padding"+ }+ ]+ },+ "border": {+ "type": "object",+ "title": "Border Properties",+ "description": "Properties to set borders",+ "x-example": {+ "border_color": "F000FF",+ "border_color_top": "000FFF",+ "border_color_bottom": "FFF000",+ "no_border_left": true,+ "no_border_right": true,+ "border_width": "0.25mm",+ "border_width_left": "0.5mm",+ "border_width_right": "0.5mm"+ },+ "properties": {+ "border_width": {+ "title": "Border width",+ "description": "One value for border line width on all sides",+ "$ref": "#/$defs/measurement"+ },+ "border_width_left": {+ "title": "Border width left",+ "description": "Border width only on the left side",+ "$ref": "#/$defs/measurement"+ },+ "border_width_top": {+ "title": "Border width top",+ "description": "Border width only on the top side",+ "$ref": "#/$defs/measurement"+ },+ "border_width_right": {+ "title": "Border width right",+ "description": "Border width only on the right side",+ "$ref": "#/$defs/measurement"+ },+ "border_width_bottom": {+ "title": "Border width bottom",+ "description": "Border width only on the bottom side",+ "$ref": "#/$defs/measurement"+ },+ "border_color": {+ "title": "Border color",+ "description": "One value for border color on all sides",+ "$ref": "#/$defs/color"+ },+ "border_color_left": {+ "title": "Border color left",+ "description": "Border color only on the left side",+ "$ref": "#/$defs/color"+ },+ "border_color_top": {+ "title": "Border color top",+ "description": "Border color only on the top side",+ "$ref": "#/$defs/color"+ },+ "border_color_right": {+ "title": "Border color right",+ "description": "Border color only on the right side",+ "$ref": "#/$defs/color"+ },+ "border_color_bottom": {+ "title": "Border color bottom",+ "description": "Border color only on the bottom side",+ "$ref": "#/$defs/color"+ },+ "no_border": {+ "title": "Disable borders",+ "description": "Turn off borders on all sides",+ "type": "boolean"+ },+ "no_border_left": {+ "title": "Disable border left",+ "description": "Turn off border on the left sides",+ "type": "boolean"+ },+ "no_border_top": {+ "title": "Disable border top",+ "description": "Turn off border on the top sides",+ "type": "boolean"+ },+ "no_border_right": {+ "title": "Disable border right",+ "description": "Turn off border on the right sides",+ "type": "boolean"+ },+ "no_border_bottom": {+ "title": "Disable border bottom",+ "description": "Turn off border on the bottom sides",+ "type": "boolean"+ }+ }+ },+ "alert": {+ "type": "object",+ "title": "Alert",+ "description": "Styling to denote a quote as alert box",+ "x-example": {+ "ALERT": {+ "alert_color": "f4f9ff",+ "border_color": "f4f9ff",+ "border_width": 2,+ "no_border_right": true,+ "no_border_left": false,+ "no_border_bottom": true,+ "no_border_top": true+ }+ },+ "properties": {+ "background_color": {+ "$ref": "#/$defs/color"+ },+ "alert_color": {+ "$ref": "#/$defs/color"+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/font"+ },+ {+ "$ref": "#/$defs/border"+ },+ {+ "$ref": "#/$defs/padding"+ },+ {+ "$ref": "#/$defs/margin"+ }+ ]+ },+ "alerts": {+ "type": "object",+ "title": "Alert boxes (styled blockquotes)",+ "properties": {+ "NOTE": {+ "$ref": "#/$defs/alert"+ },+ "TIP": {+ "$ref": "#/$defs/alert"+ },+ "WARNING": {+ "$ref": "#/$defs/alert"+ },+ "IMPORTANT": {+ "$ref": "#/$defs/alert"+ },+ "CAUTION": {+ "$ref": "#/$defs/alert"+ }+ }+ },+ "notes": {+ "type": "object",+ "title": "Agenda item notes",+ "description": "Styling for Meeting agenda item notes",+ "x-example": {+ "notes": {+ "markdown_margin": {},+ "markdown": {}+ }+ },+ "properties": {+ "markdown_margin": {+ "type": "object",+ "title": "Agenda item notes markdown margins",+ "description": "Margins for agenda item notes",+ "x-example": {+ "markdown_margin": {+ "margin_bottom": 16+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/margin"+ }+ ]+ },+ "markdown": {+ "$ref": "#/$defs/markdown"+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/margin"+ }+ ]+ },+ "outcome": {+ "type": "object",+ "title": "Agenda item outcome",+ "description": "Styling for Meeting agenda item outcome",+ "x-example": {+ "outcome": {+ "indent": 15,+ "markdown_margin": {},+ "markdown": {}+ }+ },+ "properties": {+ "title": {+ "type": "object",+ "title": "Agenda item outcome title",+ "allOf": [+ {+ "$ref": "#/$defs/font"+ },+ {+ "$ref": "#/$defs/margin"+ }+ ]+ },+ "symbol": {+ "type": "object",+ "title": "Agenda item outcome symbol",+ "allOf": [+ {+ "$ref": "#/$defs/font"+ }+ ]+ },+ "indent": {+ "title": "Indent width",+ "description": "Indent for agenda item notes",+ "$ref": "#/$defs/measurement"+ },+ "markdown_margin": {+ "type": "object",+ "title": "Agenda item outcome markdown margins",+ "description": "Margins for agenda item outcome",+ "x-example": {+ "markdown_margin": {+ "margin_bottom": 16+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/margin"+ }+ ]+ },+ "markdown": {+ "$ref": "#/$defs/markdown"+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/margin"+ }+ ]+ },+ "markdown": {+ "type": "object",+ "title": "Markdown Styling",+ "description": "Styling for markdown content of agenda item notes",+ "x-example": {+ "markdown": {+ "font": {},+ "header": {},+ "header_1": {},+ "header_2": {},+ "header_3": {},+ "paragraph": {},+ "unordered_list": {},+ "unordered_list_point": {},+ "ordered_list": {},+ "ordered_list_point": {},+ "task_list": {},+ "task_list_point": {},+ "link": {},+ "code": {},+ "blockquote": {},+ "codeblock": {},+ "table": {}+ }+ },+ "properties": {+ "font": {+ "$ref": "#/$defs/font"+ },+ "paragraph": {+ "title": "Markdown paragraph",+ "description": "A block of text",+ "type": "object",+ "properties": {+ "align": {+ "type": "string",+ "enum": [+ "left",+ "center",+ "right",+ "justify"+ ]+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/font"+ },+ {+ "$ref": "#/$defs/padding"+ }+ ],+ "x-example": {+ "paragraph": {+ "align": "justify",+ "padding_bottom": "2mm"+ }+ }+ },+ "table": {+ "type": "object",+ "title": "Markdown table",+ "x-example": {+ "table": {+ "auto_width": true,+ "header": {+ "background_color": "F0F0F0",+ "no_repeating": true,+ "size": 12+ },+ "cell": {+ "background_color": "000FFF",+ "size": 10+ }+ }+ },+ "properties": {+ "auto_width": {+ "title": "Automatic column widths",+ "description": "Table columns should fit the content, equal spacing of columns if value is `false`",+ "type": "boolean"+ },+ "header": {+ "$ref": "#/$defs/table_header"+ },+ "cell": {+ "$ref": "#/$defs/table_cell"+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/margin"+ },+ {+ "$ref": "#/$defs/border"+ }+ ]+ },+ "html_table": {+ "type": "object",+ "title": "HTML table",+ "x-example": {+ "table": {+ "auto_width": true,+ "header": {+ "background_color": "F0F0F0",+ "no_repeating": true,+ "size": 12+ },+ "cell": {+ "background_color": "000FFF",+ "size": 10+ }+ }+ },+ "properties": {+ "auto_width": {+ "title": "Automatic column widths",+ "description": "Table columns should fit the content, equal spacing of columns if value is `false`",+ "type": "boolean"+ },+ "header": {+ "$ref": "#/$defs/table_header"+ },+ "cell": {+ "$ref": "#/$defs/table_cell"+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/margin"+ },+ {+ "$ref": "#/$defs/border"+ }+ ]+ },+ "headless_table": {+ "type": "object",+ "title": "Markdown headless table",+ "description": "Tables without or empty header rows can be styled differently.",+ "x-example": {+ "headless_table": {+ "auto_width": true,+ "cell": {+ "style": "underline",+ "background_color": "000FFF"+ }+ }+ },+ "properties": {+ "auto_width": {+ "title": "Automatic column widths",+ "description": "Table columns should fit the content, equal spacing of columns if value is `false`",+ "type": "boolean"+ },+ "cell": {+ "$ref": "#/$defs/table_cell"+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/margin"+ },+ {+ "$ref": "#/$defs/border"+ }+ ]+ },+ "code": {+ "type": "object",+ "title": "Markdown code",+ "description": "Styling to denote a word or phrase as code",+ "x-example": {+ "code": {+ "font": "Consolas",+ "color": "880000"+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/font"+ }+ ]+ },+ "codeblock": {+ "type": "object",+ "title": "Markdown code block",+ "description": "Styling to denote a paragraph as code",+ "x-example": {+ "codeblock": {+ "background_color": "F5F5F5",+ "font": "Consolas",+ "size": 8,+ "color": "880000",+ "padding": "3mm",+ "margin_top": "2mm",+ "margin_bottom": "2mm"+ }+ },+ "properties": {+ "background_color": {+ "$ref": "#/$defs/color"+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/font"+ },+ {+ "$ref": "#/$defs/padding"+ },+ {+ "$ref": "#/$defs/margin"+ }+ ]+ },+ "link": {+ "type": "object",+ "title": "Markdown Link",+ "description": "Styling a clickable link",+ "x-example": {+ "link": {+ "color": "000088"+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/font"+ }+ ]+ },+ "image": {+ "type": "object",+ "title": "Markdown image",+ "description": "Styling of images",+ "x-example": {+ "image": {+ "max_width": "50mm",+ "margin": "2mm",+ "margin_bottom": "3mm",+ "align": "center",+ "caption": {+ "align": "center",+ "size": 8+ }+ }+ },+ "properties": {+ "max_width": {+ "$ref": "#/$defs/measurement",+ "title": "Maximum width of the image"+ },+ "align": {+ "$ref": "#/$defs/alignment"+ },+ "caption": {+ "title": "Image caption",+ "description": "Styling for the caption below an image",+ "type": "object",+ "properties": {+ "align": {+ "type": "string",+ "enum": [+ "left",+ "center",+ "right",+ "justify"+ ]+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/font"+ },+ {+ "$ref": "#/$defs/padding"+ }+ ]+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/margin"+ }+ ]+ },+ "hrule": {+ "type": "object",+ "title": "Markdown horizontal rule",+ "description": "Styling for horizontal lines",+ "properties": {+ "line_width": {+ "title": "Sets the stroke width of the horizontal rule",+ "$ref": "#/$defs/measurement"+ }+ },+ "x-example": {+ "hrule": {+ "line_width": 1+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/margin"+ }+ ]+ },+ "header": {+ "title": "Markdown header",+ "description": "Default styling for headers on all levels.<br/>use header_`x` as key for header level `x`.",+ "$ref": "#/$defs/header"+ },+ "blockquote": {+ "type": "object",+ "title": "Markdown blockquote",+ "description": "Styling to denote a paragraph as quote",+ "x-example": {+ "blockquote": {+ "background_color": "f4f9ff",+ "size": 14,+ "styles": [+ "italic"+ ],+ "color": "0f3b66",+ "border_color": "b8d6f4",+ "border_width": 1,+ "no_border_right": true,+ "no_border_left": false,+ "no_border_bottom": true,+ "no_border_top": true+ }+ },+ "properties": {+ "background_color": {+ "$ref": "#/$defs/color"+ }+ },+ "allOf": [+ {+ "$ref": "#/$defs/font"+ },+ {+ "$ref": "#/$defs/border"+ },+ {+ "$ref": "#/$defs/padding"+ },+ {+ "$ref": "#/$defs/margin"+ }+ ]+ },+ "ordered_list": {+ "title": "Markdown ordered list",+ "description": "Default styling for ordered lists on all levels.<br/>use ordered_list_`x` as key for ordered list level `x`.",+ "$ref": "#/$defs/ordered_list"+ },+ "ordered_list_point": {+ "title": "Markdown ordered list point",+ "description": "Default styling for ordered list points on all levels.<br/>use ordered_list_point_`x` as key for ordered list points level `x`.",+ "$ref": "#/$defs/ordered_list_point"+ },+ "unordered_list": {+ "title": "Markdown unordered list",+ "description": "Default styling for unordered lists on all levels.<br/>use unordered_list_`x` as key for unordered list level `x`.",+ "$ref": "#/$defs/unordered_list"+ },+ "unordered_list_point": {+ "title": "Markdown unordered list point",+ "description": "Default styling for unordered list points on all levels.<br/>use unordered_list_point_`x` as key for unordered list points level `x`.",+ "$ref": "#/$defs/unordered_list_point"+ },+ "task_list": {+ "title": "Markdown task list",+ "x-example": {+ "task_list": {+ "spacing": "2mm"+ }+ },+ "$ref": "#/$defs/unordered_list"+ },+ "task_list_point": {+ "title": "Markdown task list point",+ "$ref": "#/$defs/task_list_point"+ },+ "alerts": {+ "$ref": "#/$defs/alerts"+ }+ },+ "patternProperties": {+ "^ordered_list_point_\\d+": {+ "title": "Markdown ordered list point level",+ "$ref": "#/$defs/ordered_list_point"+ },+ "^ordered_list_\\d+": {+ "title": "Markdown ordered list level",+ "$ref": "#/$defs/ordered_list"+ },+ "^unordered_list_point_\\d+": {+ "title": "Markdown unordered list point level",+ "$ref": "#/$defs/unordered_list_point"+ },+ "^unordered_list_\\d+": {+ "title": "Markdown unordered List Level",+ "$ref": "#/$defs/unordered_list"+ },+ "^header_\\d+": {+ "title": "Markdown header level",+ "$ref": "#/$defs/header"+ }+ }+ }+ }+}diff --git a/modules/meeting/app/workers/meetings/pdf/minutes/standard.yml b/modules/meeting/app/workers/meetings/pdf/minutes/standard.ymlnew file mode 100644index 00000000000..d65a06e7a4b--- /dev/null+++ b/modules/meeting/app/workers/meetings/pdf/minutes/standard.yml@@ -0,0 +1,478 @@+page:+ page_size: "A4"+ margin_top: 100+ margin_bottom: 80+ margin_left: 72+ margin_right: 72+ page_break_threshold: 100+ link_color: "175A8E"++page_header:+ offset: 20+ size: 8++page_footer:+ offset: -30+ size: 8+ spacing: 6++page_logo:+ height: 43+ offset: 25+ align: "right"++page_heading:+ size: 13.5+ styles: [ "bold" ]+ margin_top: 12++page_subheading:+ size: 12+ margin_bottom: 20++page_subtitle:+ margin_bottom: 20+ leading: 1+ size: 10.2++cover:+ header:+ logo_height: 25+ border:+ color: 'd3dee3'+ height: 1+ offset: 6+ footer:+ size: 10+ color: '414d5f'+ offset: 30+ hero:+ padding_right: 144+ padding_top: 120+ title:+ max_height: 30+ spacing: 10+ font: 'SpaceMono'+ color: '414d5f'+ size: 10+ heading:+ spacing: 14+ color: '414d5f'+ styles:+ - bold+ size: 16+ dates:+ spacing: 4+ max_height: 16+ color: '414d5f'+ size: 10+ styles:+ - bold+ subheading:+ max_height: 30+ color: '414d5f'+ size: 10++notes:+ markdown_margin:+ margin_bottom: 0+ markdown:+ font:+ size: 10.5+ leading: 2+ header:+ size: 10.5+ styles: [ "bold" ]+ padding_top: 4+ paragraph:+ align: "justify"+ unordered_list:+ spacing: 1+ padding_top: 10+ padding_bottom: 10+ padding_left: 20+ padding_right: 20+ unordered_list_point:+ sign: ">"+ spacing: 10+ ordered_list:+ spacing: 1+ ordered_list_point:+ spacing: 4+ spanning: true+ list_style_type: decimal+ ordered_list_point_2:+ list_style_type: lower-latin+ ordered_list_point_3:+ list_style_type: lower-roman+ ordered_list_point_4:+ list_style_type: upper-latin+ ordered_list_point_5:+ list_style_type: upper-roman+ task_list:+ spacing: 1+ task_list_point:+ spacing: 4+ checked: "☑"+ unchecked: "☐"+ link:+ color: "175A8E"+ styles: [ ]+ code:+ color: "880000"+ size: 9+ font: "SpaceMono"+ blockquote:+ background_color: "f4f9ff"+ size: 10+ styles: [ "italic" ]+ color: "0f3b66"+ border_color: "b8d6f4"+ border_width: 1+ padding: 4+ padding_left: 6+ margin_top: 4+ margin_bottom: 4+ no_border_left: false+ no_border_right: true+ no_border_bottom: true+ no_border_top: true+ image:+ align: "center"+ margin_bottom: 4+ caption:+ size: 8+ align: "center"+ codeblock:+ background_color: "F5F5F5"+ color: "880000"+ padding: 10+ size: 8+ margin_top: 10+ margin_bottom: 10+ font: "SpaceMono"+ table:+ auto_width: true+ margin_top: 4+ margin_bottom: 4+ header:+ size: 10+ styles: [ "bold" ]+ background_color: "F0F0F0"+ cell:+ size: 10+ border_width: 0.25+ padding: 5+ html_table:+ auto_width: true+ margin_top: 4+ margin_bottom: 4+ header:+ size: 10+ styles: [ "bold" ]+ border_width: 0.25+ border_color: 'FFFFFF'+ color: "FFFFFF"+ background_color: "585858"+ padding_left: 5+ padding_right: 5+ padding_top: 5+ padding_bottom: 9+ cell:+ size: 10+ border_width: 0.25+ border_color: '000000'+ padding_left: 5+ padding_right: 5+ padding_top: 5+ padding_bottom: 8+ valign: top+ alerts:+ NOTE:+ border_color: '0969da'+ alert_color: '0969da'+ padding: '4mm'+ size: 10+ styles: [ ]+ border_width: 2+ no_border_right: true+ no_border_left: false+ no_border_bottom: true+ no_border_top: true+ TIP:+ border_color: '1a7f37'+ alert_color: '1a7f37'+ padding: '4mm'+ size: 10+ styles: [ ]+ border_width: 2+ no_border_right: true+ no_border_left: false+ no_border_bottom: true+ no_border_top: true+ IMPORTANT:+ border_color: '8250df'+ alert_color: '8250df'+ padding: '4mm'+ size: 10+ styles: [ ]+ border_width: 2+ no_border_right: true+ no_border_left: false+ no_border_bottom: true+ no_border_top: true+ WARNING:+ border_color: 'bf8700'+ alert_color: 'bf8700'+ padding: '4mm'+ size: 10+ styles: [ ]+ border_width: 2+ no_border_right: true+ no_border_left: false+ no_border_bottom: true+ no_border_top: true+ CAUTION:+ border_color: 'd1242f'+ alert_color: 'd1242f'+ size: 10+ styles: [ ]+ padding: '4mm'+ border_width: 2+ no_border_right: true+ no_border_left: false+ no_border_bottom: true+ no_border_top: true++outcome:+ indent: 0+ symbol:+ size: 10+ color: "1F883D"+ title:+ size: 10+ styles: [ "bold" ]+ margin_top: 5+ margin_bottom: 5+ markdown_margin:+ margin_bottom: 8+ markdown:+ font:+ size: 10+ leading: 3+ header:+ size: 8+ styles: [ "bold" ]+ padding_top: 4+ header_1:+ size: 10+ header_2:+ size: 10+ header_3:+ size: 9+ paragraph:+ align: "left"+ unordered_list:+ spacing: 1+ unordered_list_point:+ spacing: 4+ ordered_list:+ spacing: 1+ ordered_list_point:+ spacing: 4+ spanning: true+ list_style_type: decimal+ ordered_list_point_2:+ list_style_type: lower-latin+ ordered_list_point_3:+ list_style_type: lower-roman+ ordered_list_point_4:+ list_style_type: upper-latin+ ordered_list_point_5:+ list_style_type: upper-roman+ task_list:+ spacing: 1+ task_list_point:+ spacing: 4+ checked: "☑"+ unchecked: "☐"+ link:+ color: "175A8E"+ styles: [ ]+ code:+ color: "880000"+ size: 9+ font: "SpaceMono"+ blockquote:+ background_color: "f4f9ff"+ size: 10+ styles: [ "italic" ]+ color: "0f3b66"+ border_color: "b8d6f4"+ border_width: 1+ padding: 4+ padding_left: 6+ margin_top: 4+ margin_bottom: 4+ no_border_left: false+ no_border_right: true+ no_border_bottom: true+ no_border_top: true+ image:+ align: "center"+ margin_bottom: 4+ caption:+ size: 8+ align: "center"+ codeblock:+ background_color: "F5F5F5"+ color: "880000"+ padding: 10+ size: 8+ margin_top: 10+ margin_bottom: 10+ font: "SpaceMono"+ table:+ auto_width: true+ margin_top: 4+ margin_bottom: 4+ header:+ size: 9+ styles: [ "bold" ]+ background_color: "F0F0F0"+ cell:+ size: 8+ border_width: 0.25+ padding: 5+ html_table:+ auto_width: true+ margin_top: 4+ margin_bottom: 4+ header:+ size: 9+ styles: [ "bold" ]+ no_border: true+ cell:+ size: 8+ border_width: 0.25+ padding: 5+ no_border: true+ valign: middle+ alerts:+ NOTE:+ border_color: '0969da'+ alert_color: '0969da'+ padding: '4mm'+ size: 10+ styles: [ ]+ border_width: 2+ no_border_right: true+ no_border_left: false+ no_border_bottom: true+ no_border_top: true+ TIP:+ border_color: '1a7f37'+ alert_color: '1a7f37'+ padding: '4mm'+ size: 10+ styles: [ ]+ border_width: 2+ no_border_right: true+ no_border_left: false+ no_border_bottom: true+ no_border_top: true+ IMPORTANT:+ border_color: '8250df'+ alert_color: '8250df'+ padding: '4mm'+ size: 10+ styles: [ ]+ border_width: 2+ no_border_right: true+ no_border_left: false+ no_border_bottom: true+ no_border_top: true+ WARNING:+ border_color: 'bf8700'+ alert_color: 'bf8700'+ padding: '4mm'+ size: 10+ styles: [ ]+ border_width: 2+ no_border_right: true+ no_border_left: false+ no_border_bottom: true+ no_border_top: true+ CAUTION:+ border_color: 'd1242f'+ alert_color: 'd1242f'+ size: 10+ styles: [ ]+ padding: '4mm'+ border_width: 2+ no_border_right: true+ no_border_left: false+ no_border_bottom: true+ no_border_top: true++heading:+ size: 11+ styles: [ "bold" ]+ margin_bottom: 8++participants:+ margin_bottom: 8+ status:+ size: 9+ color: "636C76"+ cell:+ size: 10+ padding_left: 0+ padding_bottom: 7+ no_border: true++attachments:+ margin_bottom: 8+ cell:+ size: 10+ padding_left: 0+ padding_bottom: 7+ no_border: true++agenda_section:+ title:+ size: 12+ color: "000000"+ styles: [ "bold" ]+ subtitle:+ size: 11+ color: "636C76"+ title_cell:+ padding_top: 2+ padding_bottom: 5+ padding_left: 0+ padding_right: 0+ border_color: "D0D7DE"+ border_width: 1+ no_border: true+ title_margins:+ margin_bottom: 0++agenda_item:+ indent: 0+ margin:+ margin_bottom: 16+ title_margin:+ margin_bottom: 6+ title_cell:+ padding_top: 0+ padding_bottom: 0+ padding_left: 0+ padding_right: 0+ no_border: true+ title:+ styles: []+ size: 11+ subtitle:+ color: "636C76"+ size: 10diff --git a/modules/meeting/app/workers/meetings/pdf/minutes/styles.rb b/modules/meeting/app/workers/meetings/pdf/minutes/styles.rbnew file mode 100644index 00000000000..180fcf65d2c--- /dev/null+++ b/modules/meeting/app/workers/meetings/pdf/minutes/styles.rb@@ -0,0 +1,165 @@+# frozen_string_literal: true++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See COPYRIGHT and LICENSE files for more details.+#++++module Meetings::PDF::Minutes::Styles+ class PDFStyles+ include MarkdownToPDF::Common+ include MarkdownToPDF::StyleHelper+ include Exports::PDF::Common::Styles+ include Exports::PDF::Components::PageStyles+ include Exports::PDF::Components::CoverStyles++ def page_subheading+ resolve_font(@styles[:page_subheading])+ end++ def page_subheading_margins+ resolve_margin(@styles[:page_subheading])+ end++ def page_subtitle+ resolve_font(@styles[:page_subtitle])+ end++ def page_subtitle_margins+ resolve_margin(@styles[:page_subtitle])+ end++ def notes_markdown_margins+ resolve_margin(@styles.dig(:notes, :markdown_margin))+ end++ def notes_markdown_styling_yml+ resolve_markdown_styling(@styles.dig(:notes, :markdown) || {})+ end++ def outcome_markdown_styling_yml+ resolve_markdown_styling(@styles.dig(:outcome, :markdown) || {})+ end++ def heading+ resolve_font(@styles[:heading])+ end++ def agenda_item_title_margins+ resolve_margin(@styles.dig(:agenda_item, :title_margin))+ end++ def agenda_item_indent+ @styles.dig(:agenda_item, :indent).presence || 5+ end++ def outcome_title+ resolve_font(@styles.dig(:outcome, :title))+ end++ def outcome_symbol+ resolve_font(@styles.dig(:outcome, :symbol))+ end++ def outcome_title_margins+ resolve_margin(@styles.dig(:outcome, :title))+ end++ def outcome_markdown_margins+ resolve_margin(@styles.dig(:outcome, :markdown_margin))+ end++ def outcome_indent+ @styles.dig(:outcome, :indent).presence || 15+ end++ def agenda_item_title+ resolve_font(@styles.dig(:agenda_item, :title))+ end++ def agenda_item_title_cell+ resolve_table_cell(@styles.dig(:agenda_item, :title_cell))+ end++ def agenda_item_subtitle+ resolve_font(@styles.dig(:agenda_item, :subtitle))+ end++ def agenda_item_margins+ resolve_margin(@styles.dig(:agenda_item, :margin))+ end++ def heading_margins+ resolve_margin(@styles[:heading])+ end++ def participants_table_cell+ resolve_table_cell(@styles.dig(:participants, :cell))+ end++ def participants_status+ resolve_font(@styles.dig(:participants, :status))+ end++ def participants_margins+ resolve_margin(@styles[:participants])+ end++ def attachments_table_cell+ resolve_table_cell(@styles.dig(:attachments, :cell))+ end++ def attachments_margins+ resolve_margin(@styles[:attachments])+ end++ def agenda_section_title+ resolve_font(@styles.dig(:agenda_section, :title))+ end++ def agenda_section_title_table_margins+ resolve_margin(@styles.dig(:agenda_section, :title_margins))+ end++ def agenda_section_subtitle+ resolve_font(@styles.dig(:agenda_section, :subtitle))+ end++ def agenda_section_title_cell+ resolve_table_cell(@styles.dig(:agenda_section, :title_cell))+ end+ end++ def styles+ @styles ||= PDFStyles.new(styles_asset_path)+ end++ private++ def styles_asset_path+ File.dirname(File.expand_path(__FILE__))+ end+enddiff --git a/modules/meeting/config/locales/crowdin/de.yml b/modules/meeting/config/locales/crowdin/de.ymlindex 981316f45e2..b0cc15d7d39 100644--- a/modules/meeting/config/locales/crowdin/de.yml+++ b/modules/meeting/config/locales/crowdin/de.yml@@ -240,9 +240,25 @@ de:label_export_pdf: "PDF exportieren"export:your_meeting_export: "Besprechung wird exportiert"+ minutes:+ author: "Verfasser:in"+ date: "Datum"+ time: "Zeit"+ location: "Ort"+ title: "Protokoll"export_pdf_dialog:title: PDF exportierendescription: Erstellen Sie eine druckbare PDF-Datei dieser Besprechung im aktuellen Zustand.+ templates:+ default:+ label: Standard+ caption: Die Standardvorlage eignet sich für die meisten Besprechungen und repräsentiert den aktuellen Status.+ minutes:+ label: Protokoll+ caption: Die Protokollvorlage eignet sich für Besprechungen, die abgeschlossen sind und archiviert werden.+ author:+ label: Verfasser:in+ caption: Verfasser:in des Protokolls wird in der Unterüberschrift angezeigt.include_participants:label: Liste der Teilnehmer einfügencaption: Eine Liste der Teilnehmer wird oberhalb der Agenda ausgegeben.diff --git a/modules/meeting/config/locales/en.yml b/modules/meeting/config/locales/en.ymlindex d716f9552d4..449683b4045 100644--- a/modules/meeting/config/locales/en.yml+++ b/modules/meeting/config/locales/en.yml@@ -261,9 +261,25 @@ en:label_export_pdf: "Export PDF"export:your_meeting_export: "Meeting is being exported"+ minutes:+ author: "Author"+ date: "Date"+ time: "Time"+ location: "Location"+ title: "Minutes"export_pdf_dialog:title: Export PDFdescription: Generate a printable PDF file of this meeting at the current state.+ templates:+ default:+ label: Default+ caption: The default template is suitable for most meetings and represent the current state.+ minutes:+ label: Minutes+ caption: The minutes template is suitable for meetings that have been closed and are archived.+ author:+ label: Author+ caption: The author of the minutes will be displayed in the subtitle.include_participants:label: Include list of participantscaption: A list of participants will be preset above the meeting agenda.diff --git a/modules/meeting/lib/open_project/meeting/engine.rb b/modules/meeting/lib/open_project/meeting/engine.rbindex d48d5dbf7df..84e216310e4 100644--- a/modules/meeting/lib/open_project/meeting/engine.rb+++ b/modules/meeting/lib/open_project/meeting/engine.rb@@ -183,7 +183,7 @@ module OpenProject::MeetingPermittedParams.permit(:search, :meetings)::Exports::Register.register do- single(::Meeting, Meetings::PDF::Exporter)+ single(::Meeting, Meetings::Exporter)endenddiff --git a/modules/meeting/spec/workers/meetings/pdf/exporter_spec.rb b/modules/meeting/spec/workers/meetings/pdf/export/exporter_spec.rbsimilarity index 99%rename from modules/meeting/spec/workers/meetings/pdf/exporter_spec.rbrename to modules/meeting/spec/workers/meetings/pdf/export/exporter_spec.rbindex bd569dc2879..36f2fa444b7 100644--- a/modules/meeting/spec/workers/meetings/pdf/exporter_spec.rb+++ b/modules/meeting/spec/workers/meetings/pdf/export/exporter_spec.rb@@ -31,7 +31,7 @@require "spec_helper"require "pdf/inspector"-RSpec.describe Meetings::PDF::Exporter do+RSpec.describe Meetings::PDF::Export::Exporter doinclude Redmine::I18nshared_let(:role) { create(:project_role, permissions: [:view_work_packages]) }shared_let(:user) { create(:user, firstname: "Export", lastname: "User") }diff --git a/script/pdf_export/styles.yml b/script/pdf_export/styles.ymlindex 4c031000972..e931ca15b15 100644--- a/script/pdf_export/styles.yml+++ b/script/pdf_export/styles.yml@@ -6,4 +6,4 @@ styles:- name: "timesheet"path: "modules/reporting/app/workers/cost_query/pdf"- name: "meeting"- path: "modules/meeting/app/workers/meetings/pdf"+ path: "modules/meeting/app/workers/meetings/pdf/export"