Skip to content

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

line below group section title less bold attribute labels, e.g. no uppercase

as-ope96cd07e79f5
diff --git a/app/models/work_package/pdf_export/common/styles_attributes_table.rb b/app/models/work_package/pdf_export/common/styles_attributes_table.rb
index cfe9e29677d..fc32e9c148f 100644
--- a/app/models/work_package/pdf_export/common/styles_attributes_table.rb
+++ b/app/models/work_package/pdf_export/common/styles_attributes_table.rb
@@ -29,6 +29,25 @@
#++
module WorkPackage::PDFExport::Common::StylesAttributesTable
+ def wp_attributes_group_label_margins
+ resolve_margin(@styles.dig(:work_package, :attributes_group))
+ end
+
+ def wp_attributes_group_label
+ resolve_font(@styles.dig(:work_package, :attributes_group))
+ end
+
+ def wp_attributes_group_label_hr
+ {
+ color: @styles.dig(:work_package, :attributes_group, :hr, :color),
+ height: resolve_pt(@styles.dig(:work_package, :attributes_group, :hr, :height), 1)
+ }
+ end
+
+ def wp_markdown_label_margins
+ resolve_margin(@styles.dig(:work_package, :attributes_group))
+ end
+
def wp_attributes_table_margins
resolve_margin(@styles.dig(:work_package, :attributes_table))
end
@@ -37,6 +56,10 @@ module WorkPackage::PDFExport::Common::StylesAttributesTable
resolve_table_cell(@styles.dig(:work_package, :attributes_table, :cell))
end
+ def wp_attributes_table_label
+ resolve_font(@styles.dig(:work_package, :attributes_table, :cell_label))
+ end
+
def wp_attributes_table_label_cell
wp_attributes_table_cell.merge(
resolve_table_cell(@styles.dig(:work_package, :attributes_table, :cell_label))
diff --git a/app/models/work_package/pdf_export/export/report/schema.json b/app/models/work_package/pdf_export/export/report/schema.json
index 583a73c7f6f..829c783cbe3 100644
--- a/app/models/work_package/pdf_export/export/report/schema.json
+++ b/app/models/work_package/pdf_export/export/report/schema.json
@@ -547,6 +547,54 @@
}
]
},
+ "attributes_group": {
+ "type": "object",
+ "title": "Work package attributes group label",
+ "description": "Label headline for a work package attributes group",
+ "x-example": {
+ "attributes_group": {
+ "size": 12,
+ "styles": [
+ "bold"
+ ],
+ "margin_top": 2,
+ "margin_bottom": 4
+ }
+ },
+ "properties": {
+ "hr": {
+ "type": "object",
+ "title": "Horizontal rule for attributes group rule",
+ "x-example": {
+ "border": {
+ "color": "d3dee3",
+ "height": 1
+ }
+ },
+ "properties": {
+ "height": {
+ "title": "Line height of the horizontal rule",
+ "examples": [
+ 1
+ ],
+ "$ref": "#/$defs/measurement"
+ },
+ "color": {
+ "title": "Line color of the horizontal rule",
+ "$ref": "#/$defs/color"
+ }
+ }
+ }
+ },
+ "allOf": [
+ {
+ "$ref": "#/$defs/font"
+ },
+ {
+ "$ref": "#/$defs/margin"
+ }
+ ]
+ },
"attributes_table" : {
"type" : "object",
"title" : "Work package attributes",
diff --git a/app/models/work_package/pdf_export/export/report/standard.yml b/app/models/work_package/pdf_export/export/report/standard.yml
index 5ac0ee60d24..5a31ecb5ae2 100644
--- a/app/models/work_package/pdf_export/export/report/standard.yml
+++ b/app/models/work_package/pdf_export/export/report/standard.yml
@@ -94,6 +94,14 @@ work_package:
styles: [ "bold" ]
subject_level_10:
styles: [ "bold" ]
+ attributes_group:
+ size: 11
+ styles: [ "bold" ]
+ margin_top: 0
+ margin_bottom: 4
+ hr:
+ color: "1F2328"
+ height: 0.25
attributes_table:
margin_bottom: 16
cell:
diff --git a/app/models/work_package/pdf_export/export/wp/attributes.rb b/app/models/work_package/pdf_export/export/wp/attributes.rb
index 7c2cb93a70d..2b7bbbdd07e 100644
--- a/app/models/work_package/pdf_export/export/wp/attributes.rb
+++ b/app/models/work_package/pdf_export/export/wp/attributes.rb
@@ -56,10 +56,25 @@ module WorkPackage::PDFExport::Export::Wp::Attributes
custom_value = work_package.custom_field_values
.find { |cv| cv.custom_field.id == field_id && cv.custom_field.formattable? }
if custom_value&.value
- write_markdown_field!(work_package, custom_value.value, custom_value.custom_field.name)
+ write_long_text_custom_field!(work_package, custom_value.value, custom_value.custom_field.name)
end
end
+ def write_long_text_custom_field!(work_package, markdown, label)
+ return if markdown.blank?
+
+ write_optional_page_break
+ write_long_text_custom_field_label(label)
+ write_markdown_field_value(work_package, markdown)
+ end
+
+ def write_long_text_custom_field_label(label)
+ with_margin(styles.wp_markdown_label_margins) do
+ pdf.formatted_text([styles.wp_attributes_table_label.merge({ text: label })])
+ end
+ end
+
+
def write_query_group(group, work_package)
prepare_query_group(group, work_package)
related_work_packages = group.query.results.work_packages
@@ -155,9 +170,12 @@ module WorkPackage::PDFExport::Export::Wp::Attributes
end
def write_group_title(group)
- with_margin(styles.wp_markdown_label_margins) do
- pdf.formatted_text([styles.wp_markdown_label
+ write_optional_page_break
+ with_margin(styles.wp_attributes_group_label_margins) do
+ pdf.formatted_text([styles.wp_attributes_group_label
.merge({ text: group.translated_key })])
+ hr_style = styles.wp_attributes_group_label_hr
+ write_horizontal_line(pdf.cursor, hr_style[:height], hr_style[:color])
end
end
@@ -222,7 +240,7 @@ module WorkPackage::PDFExport::Export::Wp::Attributes
# get work package attribute table cell data: [label, value]
[
- pdf.make_cell(attribute_data[:label].upcase, styles.wp_attributes_table_label_cell),
+ pdf.make_cell(attribute_data[:label], styles.wp_attributes_table_label_cell),
attribute_data[:value]
]
end
diff --git a/app/models/work_package/pdf_export/export/wp/schema.json b/app/models/work_package/pdf_export/export/wp/schema.json
index 9d5bb410ba6..9e83681830e 100644
--- a/app/models/work_package/pdf_export/export/wp/schema.json
+++ b/app/models/work_package/pdf_export/export/wp/schema.json
@@ -1,327 +1,375 @@
{
- "type" : "object",
- "title" : "Attributes and description",
- "description" : "This document describes the style settings format for the [PDF Export styling file](https://github.com/opf/openproject/blob/dev/app/models/work_package/pdf_export/wp/standard.yml)",
- "properties" : {
- "page" : {
- "$ref" : "#/$defs/page"
+ "type": "object",
+ "title": "Attributes and description",
+ "description": "This document describes the style settings format for the [PDF Export styling file](https://github.com/opf/openproject/blob/dev/app/models/work_package/pdf_export/wp/standard.yml)",
+ "properties": {
+ "page": {
+ "$ref": "#/$defs/page"
},
- "page_logo" : {
- "$ref" : "#/$defs/page_logo"
+ "page_logo": {
+ "$ref": "#/$defs/page_logo"
},
- "page_header" : {
- "$ref" : "#/$defs/page_header"
+ "page_header": {
+ "$ref": "#/$defs/page_header"
},
- "page_footer" : {
- "$ref" : "#/$defs/page_footer"
+ "page_footer": {
+ "$ref": "#/$defs/page_footer"
},
- "page_heading" : {
- "$ref" : "#/$defs/page_heading"
+ "page_heading": {
+ "$ref": "#/$defs/page_heading"
},
- "work_package" : {
- "$ref" : "#/$defs/work_package"
+ "work_package": {
+ "$ref": "#/$defs/work_package"
},
- "wp_table" : {
- "$ref" : "#/$defs/wp_table"
+ "wp_table": {
+ "$ref": "#/$defs/wp_table"
}
},
- "required" : [],
- "additionalProperties" : false,
- "$defs" : {
- "work_package" : {
- "type" : "object",
- "title" : "Work package",
- "description" : "Styling for the Work package section",
- "x-example" : {
- "work_package" : {
- "margin_bottom" : 20,
- "subject" : {
+ "required": [],
+ "additionalProperties": false,
+ "$defs": {
+ "work_package": {
+ "type": "object",
+ "title": "Work package",
+ "description": "Styling for the Work package section",
+ "x-example": {
+ "work_package": {
+ "margin_bottom": 20,
+ "subject": {
},
- "subject_level_1" : {
+ "subject_level_1": {
},
- "subject_level_2" : {
+ "subject_level_2": {
},
- "subject_level_3" : {
+ "subject_level_3": {
},
- "attributes_table" : {},
- "markdown_label" : {},
- "markdown_margin" : {},
- "markdown" : {}
+ "attributes_table": {},
+ "markdown_label": {},
+ "markdown_margin": {},
+ "markdown": {}
}
},
- "properties" : {
- "subject" : {
- "type" : "object",
- "title" : "Work package subject",
- "description" : "Styling for the Work package subject headline",
- "x-example" : {
- "subject" : {
- "size" : 10,
- "styles" : [
+ "properties": {
+ "subject": {
+ "type": "object",
+ "title": "Work package subject",
+ "description": "Styling for the Work package subject headline",
+ "x-example": {
+ "subject": {
+ "size": 10,
+ "styles": [
"bold"
],
- "margin_bottom" : 10
+ "margin_bottom": 10
}
},
- "allOf" : [
+ "allOf": [
{
- "$ref" : "#/$defs/font"
+ "$ref": "#/$defs/font"
},
{
- "$ref" : "#/$defs/margin"
+ "$ref": "#/$defs/margin"
}
]
},
- "attributes_table" : {
- "type" : "object",
- "title" : "Work package attributes",
- "description" : "Styling for the Work package attributes table",
- "x-example" : {
- "attributes_table" : {
- "margin_bottom" : 10,
- "cell" : {
- "size" : 9,
- "color" : "000000",
- "padding_left" : 5,
- "padding_right" : 5,
- "padding_top" : 0,
- "padding_bottom" : 5,
- "border_color" : "4B4B4B",
- "border_width" : 0.25
+ "attributes_table": {
+ "type": "object",
+ "title": "Work package attributes",
+ "description": "Styling for the Work package attributes table",
+ "x-example": {
+ "attributes_table": {
+ "margin_bottom": 10,
+ "cell": {
+ "size": 9,
+ "color": "000000",
+ "padding_left": 5,
+ "padding_right": 5,
+ "padding_top": 0,
+ "padding_bottom": 5,
+ "border_color": "4B4B4B",
+ "border_width": 0.25
},
- "cell_label" : {
- "styles" : [
+ "cell_label": {
+ "styles": [
"bold"
]
}
}
},
- "properties" : {
- "cell" : {
- "title" : "Attribute value table cell",
- "description" : "Styling for a table cell with attribute value",
- "$ref" : "#/$defs/table_cell"
+ "properties": {
+ "cell": {
+ "title": "Attribute value table cell",
+ "description": "Styling for a table cell with attribute value",
+ "$ref": "#/$defs/table_cell"
},
- "cell_label" : {
- "title" : "Attribute label table cell",
- "description" : "Styling for a table cell with attribute label",
- "$ref" : "#/$defs/table_cell"
+ "cell_label": {
+ "title": "Attribute label table cell",
+ "description": "Styling for a table cell with attribute label",
+ "$ref": "#/$defs/table_cell"
}
},
- "allOf" : [
+ "allOf": [
+ {
+ "$ref": "#/$defs/margin"
+ }
+ ]
+ },
+ "attributes_group": {
+ "type": "object",
+ "title": "Work package attributes group label",
+ "description": "Label headline for a work package attributes group",
+ "x-example": {
+ "attributes_group": {
+ "size": 12,
+ "styles": [
+ "bold"
+ ],
+ "margin_top": 2,
+ "margin_bottom": 4
+ }
+ },
+ "properties": {
+ "hr": {
+ "type": "object",
+ "title": "Horizontal rule for attributes group rule",
+ "x-example": {
+ "border": {
+ "color": "d3dee3",
+ "height": 1
+ }
+ },
+ "properties": {
+ "height": {
+ "title": "Line height of the horizontal rule",
+ "examples": [
+ 1
+ ],
+ "$ref": "#/$defs/measurement"
+ },
+ "color": {
+ "title": "Line color of the horizontal rule",
+ "$ref": "#/$defs/color"
+ }
+ }
+ }
+ },
+ "allOf": [
+ {
+ "$ref": "#/$defs/font"
+ },
{
- "$ref" : "#/$defs/margin"
+ "$ref": "#/$defs/margin"
}
]
},
- "markdown_label" : {
- "type" : "object",
- "title" : "Work package markdown label",
- "description" : "Label headline for work package description and long text custom fields",
- "x-example" : {
- "markdown_label" : {
- "size" : 12,
- "styles" : [
+ "markdown_label": {
+ "type": "object",
+ "title": "Work package markdown label",
+ "description": "Label headline for work package description and long text custom fields",
+ "x-example": {
+ "markdown_label": {
+ "size": 12,
+ "styles": [
"bold"
],
- "margin_top" : 2,
- "margin_bottom" : 4
+ "margin_top": 2,
+ "margin_bottom": 4
}
},
- "allOf" : [
+ "allOf": [
{
- "$ref" : "#/$defs/font"
+ "$ref": "#/$defs/font"
},
{
- "$ref" : "#/$defs/margin"
+ "$ref": "#/$defs/margin"
}
]
},
- "markdown_margin" : {
- "type" : "object",
- "title" : "Work package markdown margins",
- "description" : "Margins for work package description and long text custom fields",
- "x-example" : {
- "markdown_margin" : {
- "margin_bottom" : 16
+ "markdown_margin": {
+ "type": "object",
+ "title": "Work package markdown margins",
+ "description": "Margins for work package description and long text custom fields",
+ "x-example": {
+ "markdown_margin": {
+ "margin_bottom": 16
}
},
- "allOf" : [
+ "allOf": [
{
- "$ref" : "#/$defs/margin"
+ "$ref": "#/$defs/margin"
}
]
},
- "markdown" : {
- "$ref" : "#/$defs/markdown"
+ "markdown": {
+ "$ref": "#/$defs/markdown"
}
},
- "patternProperties" : {
- "^subject_level_\\d+" : {
- "type" : "object",
- "title" : "Work package subject level",
- "x-example" : {
- "subject_level_1" : {
- "size" : 14,
- "styles" : [
+ "patternProperties": {
+ "^subject_level_\\d+": {
+ "type": "object",
+ "title": "Work package subject level",
+ "x-example": {
+ "subject_level_1": {
+ "size": 14,
+ "styles": [
"bold"
]
},
- "subject_level_2" : {
- "size" : 13,
- "styles" : [
+ "subject_level_2": {
+ "size": 13,
+ "styles": [
"bold"
]
},
- "subject_level_3" : {
- "size" : 12,
- "styles" : [
+ "subject_level_3": {
+ "size": 12,
+ "styles": [
"bold"
]
}
},
- "allOf" : [
+ "allOf": [
{
- "$ref" : "#/$defs/font"
+ "$ref": "#/$defs/font"
},
{
- "$ref" : "#/$defs/margin"
+ "$ref": "#/$defs/margin"
}
]
}
},
- "allOf" : [
+ "allOf": [
{
- "$ref" : "#/$defs/margin"
+ "$ref": "#/$defs/margin"
}
]
},
- "wp_table" : {
- "title" : "Work package table",
- "description" : "Styling for the related tables (Form configuration)",
- "x-example" : {
- "overview" : {
- "group_heading" : {},
- "table" : {}
+ "wp_table": {
+ "title": "Work package table",
+ "description": "Styling for the related tables (Form configuration)",
+ "x-example": {
+ "overview": {
+ "group_heading": {},
+ "table": {}
}
},
- "type" : "object",
- "properties" : {
- "group_heading" : {
- "type" : "object",
- "title" : "Overview group heading",
- "description" : "Styling for the group label if grouping is activated",
- "x-example" : {
- "group_heading" : {
- "size" : 11,
- "styles" : [
+ "type": "object",
+ "properties": {
+ "group_heading": {
+ "type": "object",
+ "title": "Overview group heading",
+ "description": "Styling for the group label if grouping is activated",
+ "x-example": {
+ "group_heading": {
+ "size": 11,
+ "styles": [
"bold"
],
- "margin_bottom" : 10
+ "margin_bottom": 10
}
},
- "allOf" : [
+ "allOf": [
{
- "$ref" : "#/$defs/font"
+ "$ref": "#/$defs/font"
},
{
- "$ref" : "#/$defs/margin"
+ "$ref": "#/$defs/margin"
}
]
},
- "table" : {
- "type" : "object",
- "title" : "Overview table",
- "x-example" : {
- "table" : {
- "subject_indent" : 0,
- "margin_bottom" : 20,
- "cell" : {
- "size" : 9,
- "color" : "000000",
- "padding" : 5
+ "table": {
+ "type": "object",
+ "title": "Overview table",
+ "x-example": {
+ "table": {
+ "subject_indent": 0,
+ "margin_bottom": 20,
+ "cell": {
+ "size": 9,
+ "color": "000000",
+ "padding": 5
},
- "cell_header" : {
- "size" : 9,
- "styles" : [
+ "cell_header": {
+ "size": 9,
+ "styles": [
"bold"
]
},
- "cell_sums" : {
- "size" : 8,
- "styles" : [
+ "cell_sums": {
+ "size": 8,
+ "styles": [
"bold"
]
}
}
},
- "properties" : {
- "subject_indent" : {
- "title" : "Indent subject",
- "description" : "Indent by work package level in the subject cell",
- "$ref" : "#/$defs/measurement"
+ "properties": {
+ "subject_indent": {
+ "title": "Indent subject",
+ "description": "Indent by work package level in the subject cell",
+ "$ref": "#/$defs/measurement"
},
- "cell" : {
- "title" : "Table cell",
- "description" : "Styling for a table value cell",
- "$ref" : "#/$defs/table_cell"
+ "cell": {
+ "title": "Table cell",
+ "description": "Styling for a table value cell",
+ "$ref": "#/$defs/table_cell"
},
- "cell_header" : {
- "title" : "Table header cell",
- "description" : "Styling for a table header cell",
- "$ref" : "#/$defs/table_cell"
+ "cell_header": {
+ "title": "Table header cell",
+ "description": "Styling for a table header cell",
+ "$ref": "#/$defs/table_cell"
},
- "cell_sums" : {
- "title" : "Table sum cell",
- "description" : "Styling for a table sum cell",
- "$ref" : "#/$defs/table_cell"
+ "cell_sums": {
+ "title": "Table sum cell",
+ "description": "Styling for a table sum cell",
+ "$ref": "#/$defs/table_cell"
}
},
- "allOf" : [
+ "allOf": [
{
- "$ref" : "#/$defs/margin"
+ "$ref": "#/$defs/margin"
}
]
}
}
},
- "markdown" : {
- "type" : "object",
- "title" : "Markdown Styling",
- "description" : "Styling for content of work package description and long text custom fields",
- "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" : {}
+ "markdown": {
+ "type": "object",
+ "title": "Markdown Styling",
+ "description": "Styling for content of work package description and long text custom fields",
+ "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" : [
+ "properties": {
+ "font": {
+ "$ref": "#/$defs/font"
+ },
+ "paragraph": {
+ "title": "Markdown paragraph",
+ "description": "A block of text",
+ "type": "object",
+ "properties": {
+ "align": {
+ "type": "string",
+ "enum": [
"left",
"center",
"right",
@@ -329,226 +377,226 @@
]
}
},
- "allOf" : [
+ "allOf": [
{
- "$ref" : "#/$defs/font"
+ "$ref": "#/$defs/font"
},
{
- "$ref" : "#/$defs/padding"
+ "$ref": "#/$defs/padding"
}
],
- "x-example" : {
- "paragraph" : {
- "align" : "justify",
- "padding_bottom" : "2mm"
+ "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
+ "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
+ "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"
+ "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"
+ "header": {
+ "$ref": "#/$defs/table_header"
},
- "cell" : {
- "$ref" : "#/$defs/table_cell"
+ "cell": {
+ "$ref": "#/$defs/table_cell"
}
},
- "allOf" : [
+ "allOf": [
{
- "$ref" : "#/$defs/margin"
+ "$ref": "#/$defs/margin"
},
{
- "$ref" : "#/$defs/border"
+ "$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
+ "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
+ "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"
+ "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"
+ "header": {
+ "$ref": "#/$defs/table_header"
},
- "cell" : {
- "$ref" : "#/$defs/table_cell"
+ "cell": {
+ "$ref": "#/$defs/table_cell"
}
},
- "allOf" : [
+ "allOf": [
{
- "$ref" : "#/$defs/margin"
+ "$ref": "#/$defs/margin"
},
{
- "$ref" : "#/$defs/border"
+ "$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"
+ "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"
+ "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"
+ "cell": {
+ "$ref": "#/$defs/table_cell"
}
},
- "allOf" : [
+ "allOf": [
{
- "$ref" : "#/$defs/margin"
+ "$ref": "#/$defs/margin"
},
{
- "$ref" : "#/$defs/border"
+ "$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"
+ "code": {
+ "type": "object",
+ "title": "Markdown code",
+ "description": "Styling to denote a word or phrase as code",
+ "x-example": {
+ "code": {
+ "font": "Consolas",
+ "color": "880000"
}
},
- "allOf" : [
+ "allOf": [
{
- "$ref" : "#/$defs/font"
+ "$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"
+ "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"
+ "properties": {
+ "background_color": {
+ "$ref": "#/$defs/color"
}
},
- "allOf" : [
+ "allOf": [
{
- "$ref" : "#/$defs/font"
+ "$ref": "#/$defs/font"
},
{
- "$ref" : "#/$defs/padding"
+ "$ref": "#/$defs/padding"
},
{
- "$ref" : "#/$defs/margin"
+ "$ref": "#/$defs/margin"
}
]
},
- "link" : {
- "type" : "object",
- "title" : "Markdown Link",
- "description" : "Styling a clickable link",
- "x-example" : {
- "link" : {
- "color" : "000088"
+ "link": {
+ "type": "object",
+ "title": "Markdown Link",
+ "description": "Styling a clickable link",
+ "x-example": {
+ "link": {
+ "color": "000088"
}
},
- "allOf" : [
+ "allOf": [
{
- "$ref" : "#/$defs/font"
+ "$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
+ "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"
+ "properties": {
+ "max_width": {
+ "$ref": "#/$defs/measurement",
+ "title": "Maximum width of the image"
},
- "align" : {
- "$ref" : "#/$defs/alignment"
+ "align": {
+ "$ref": "#/$defs/alignment"
},
- "caption" : {
- "title" : "Image caption",
- "description" : "Styling for the caption below an image",
- "type" : "object",
- "properties" : {
- "align" : {
- "type" : "string",
- "enum" : [
+ "caption": {
+ "title": "Image caption",
+ "description": "Styling for the caption below an image",
+ "type": "object",
+ "properties": {
+ "align": {
+ "type": "string",
+ "enum": [
"left",
"center",
"right",
@@ -556,204 +604,204 @@
]
}
},
- "allOf" : [
+ "allOf": [
{
- "$ref" : "#/$defs/font"
+ "$ref": "#/$defs/font"
},
{
- "$ref" : "#/$defs/padding"
+ "$ref": "#/$defs/padding"
}
]
}
},
- "allOf" : [
+ "allOf": [
{
- "$ref" : "#/$defs/margin"
+ "$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"
+ "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
+ "x-example": {
+ "hrule": {
+ "line_width": 1
}
},
- "allOf" : [
+ "allOf": [
{
- "$ref" : "#/$defs/margin"
+ "$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" : [
+ "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
+ "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"
+ "properties": {
+ "background_color": {
+ "$ref": "#/$defs/color"
}
},
- "allOf" : [
+ "allOf": [
{
- "$ref" : "#/$defs/font"
+ "$ref": "#/$defs/font"
},
{
- "$ref" : "#/$defs/border"
+ "$ref": "#/$defs/border"
},
{
- "$ref" : "#/$defs/padding"
+ "$ref": "#/$defs/padding"
},
{
- "$ref" : "#/$defs/margin"
+ "$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"
+ "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"
+ "$ref": "#/$defs/unordered_list"
},
- "task_list_point" : {
- "title" : "Markdown task list point",
- "$ref" : "#/$defs/task_list_point"
+ "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"
+ "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"
}
}
},
- "color" : {
- "type" : "string",
- "title" : "Color",
- "description" : "A color in RRGGBB format",
- "examples" : [
+ "color": {
+ "type": "string",
+ "title": "Color",
+ "description": "A color in RRGGBB format",
+ "examples": [
"F0F0F0"
],
- "x-example" : {
- "color" : "F0F0F0"
+ "x-example": {
+ "color": "F0F0F0"
},
- "pattern" : "^(?:[0-9a-fA-F]{3}){1,2}$"
+ "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
+ "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"
+ "properties": {
+ "font": {
+ "type": "string"
},
- "size" : {
- "$ref" : "#/$defs/measurement"
+ "size": {
+ "$ref": "#/$defs/measurement"
},
- "character_spacing" : {
- "$ref" : "#/$defs/measurement"
+ "character_spacing": {
+ "$ref": "#/$defs/measurement"
},
- "leading" : {
- "$ref" : "#/$defs/measurement"
+ "leading": {
+ "$ref": "#/$defs/measurement"
},
- "color" : {
- "$ref" : "#/$defs/color"
+ "color": {
+ "$ref": "#/$defs/color"
},
- "styles" : {
- "type" : "array",
- "items" : {
- "$ref" : "#/$defs/font_style"
+ "styles": {
+ "type": "array",
+ "items": {
+ "$ref": "#/$defs/font_style"
}
}
}
},
- "font_style" : {
- "type" : "string",
- "title" : "Font Style",
- "description" : "Style of the font to use",
- "examples" : [
+ "font_style": {
+ "type": "string",
+ "title": "Font Style",
+ "description": "Style of the font to use",
+ "examples": [
"bold"
],
- "enum" : [
+ "enum": [
"bold",
"italic",
"underline",
@@ -762,47 +810,47 @@
"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"
+ "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" : [
+ "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" : [
+ "enum": [
"portrait",
"landscape"
]
},
- "page_size" : {
- "type" : "string",
- "title" : "Page size",
- "description" : "The size of a page",
- "examples" : [
+ "page_size": {
+ "type": "string",
+ "title": "Page size",
+ "description": "The size of a page",
+ "examples": [
"EXECUTIVE"
],
- "enum" : [
+ "enum": [
"EXECUTIVE",
"TABLOID",
"LETTER",
@@ -855,366 +903,366 @@
"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"
+ "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" : [
+ "allOf": [
{
- "title" : "Default font settings",
- "$ref" : "#/$defs/font"
+ "title": "Default font settings",
+ "$ref": "#/$defs/font"
},
{
- "title" : "Page margins",
- "$ref" : "#/$defs/margin"
+ "title": "Page margins",
+ "$ref": "#/$defs/margin"
}
]
},
- "page_heading" : {
- "title" : "Page heading",
- "description" : "The main page title heading",
- "x-example" : {
- "page_heading" : {
- "size" : 14,
- "styles" : [
+ "page_heading": {
+ "title": "Page heading",
+ "description": "The main page title heading",
+ "x-example": {
+ "page_heading": {
+ "size": 14,
+ "styles": [
"bold"
],
- "margin_bottom" : 10
+ "margin_bottom": 10
}
},
- "type" : "object",
- "allOf" : [
+ "type": "object",
+ "allOf": [
{
- "$ref" : "#/$defs/font"
+ "$ref": "#/$defs/font"
},
{
- "$ref" : "#/$defs/margin"
+ "$ref": "#/$defs/margin"
}
]
},
- "page_footer" : {
- "type" : "object",
- "title" : "Page footers",
- "x-example" : {
- "page_footer" : {
- "offset" : -30,
- "size" : 8
+ "page_footer": {
+ "type": "object",
+ "title": "Page footers",
+ "x-example": {
+ "page_footer": {
+ "offset": -30,
+ "size": 8
}
},
- "properties" : {
- "offset" : {
- "title" : "Offset position from page bottom",
- "examples" : [
+ "properties": {
+ "offset": {
+ "title": "Offset position from page bottom",
+ "examples": [
-30
],
- "$ref" : "#/$defs/measurement_signed"
+ "$ref": "#/$defs/measurement_signed"
},
- "spacing" : {
- "title" : "Minimum spacing between different page footers",
- "examples" : [
+ "spacing": {
+ "title": "Minimum spacing between different page footers",
+ "examples": [
8
],
- "$ref" : "#/$defs/measurement"
+ "$ref": "#/$defs/measurement"
}
},
- "allOf" : [
+ "allOf": [
{
- "$ref" : "#/$defs/font"
+ "$ref": "#/$defs/font"
}
]
},
- "page_header" : {
- "type" : "object",
- "title" : "Page headers",
- "x-example" : {
- "page_header" : {
- "align" : "left",
- "offset" : 20,
- "size" : 8
+ "page_header": {
+ "type": "object",
+ "title": "Page headers",
+ "x-example": {
+ "page_header": {
+ "align": "left",
+ "offset": 20,
+ "size": 8
}
},
- "properties" : {
- "align" : {
- "$ref" : "#/$defs/alignment"
+ "properties": {
+ "align": {
+ "$ref": "#/$defs/alignment"
},
- "offset" : {
- "title" : "Offset position from page top",
- "examples" : [
+ "offset": {
+ "title": "Offset position from page top",
+ "examples": [
-30
],
- "$ref" : "#/$defs/measurement_signed"
+ "$ref": "#/$defs/measurement_signed"
}
},
- "allOf" : [
+ "allOf": [
{
- "$ref" : "#/$defs/font"
+ "$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"
+ "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"
+ "properties": {
+ "height": {
+ "$ref": "#/$defs/measurement",
+ "title": "Height of the image"
},
- "align" : {
- "$ref" : "#/$defs/alignment"
+ "align": {
+ "$ref": "#/$defs/alignment"
},
- "offset" : {
- "title" : "Offset position from page top",
- "examples" : [
+ "offset": {
+ "title": "Offset position from page top",
+ "examples": [
-30
],
- "$ref" : "#/$defs/measurement_signed"
+ "$ref": "#/$defs/measurement_signed"
}
}
},
- "margin" : {
- "title" : "Margin properties",
- "description" : "Properties to set margins",
- "type" : "object",
- "x-example" : {
- "margin" : "10mm",
- "margin_top" : "15mm"
+ "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"
+ "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"
+ "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"
+ "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" : [
+ "measurement": {
+ "type": [
"number",
"string"
],
- "pattern" : "^([0-9\\.]+)(mm|cm|dm|m|in|ft|yr|pt)$",
- "description" : "A number >= 0 and an optional unit",
- "examples" : [
+ "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" : [
+ "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"
+ "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" : [
+ "alignment": {
+ "title": "Alignment",
+ "description": "How the element should be aligned",
+ "examples": [
"center"
],
- "type" : "string",
- "enum" : [
+ "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"
+ "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"
+ "type": "object",
+ "properties": {
+ "spacing": {
+ "title": "Spacing",
+ "description": "Additional space between list items",
+ "$ref": "#/$defs/measurement"
}
},
- "allOf" : [
+ "allOf": [
{
- "$ref" : "#/$defs/font"
+ "$ref": "#/$defs/font"
},
{
- "$ref" : "#/$defs/padding"
+ "$ref": "#/$defs/padding"
}
]
},
- "unordered_list_point" : {
- "title" : "Markdown unordered list point",
- "x-example" : {
- "unordered_list_point" : {
- "sign" : "•",
- "spacing" : "0.75mm"
+ "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"
+ "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" : [
+ "allOf": [
{
- "$ref" : "#/$defs/font"
+ "$ref": "#/$defs/font"
}
]
},
- "task_list_point" : {
- "type" : "object",
- "title" : "Markdown task list point",
- "x-example" : {
- "task_list_point" : {
- "checked" : "☑",
- "unchecked" : "☐",
- "spacing" : "0.75mm"
+ "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"
+ "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" : [
+ "allOf": [
{
- "$ref" : "#/$defs/font"
+ "$ref": "#/$defs/font"
}
]
},
- "ordered_list" : {
- "title" : "Markdown ordered list",
- "x-example" : {
- "ordered_list" : {
- "spacing" : "2mm",
- "point_inline" : false
+ "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"
+ "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" : [
+ "allOf": [
{
- "$ref" : "#/$defs/font"
+ "$ref": "#/$defs/font"
},
{
- "$ref" : "#/$defs/padding"
+ "$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
+ "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"
+ "properties": {
+ "spacing": {
+ "$ref": "#/$defs/measurement"
},
"alphabetical": {
"title": "Alphabetical bullet points",
@@ -1233,120 +1281,120 @@
"upper-roman"
]
},
- "spanning" : {
- "title" : "Spanning",
- "description" : "Use the width of the largest bullet as indention.",
- "type" : "boolean"
+ "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"
+ "template": {
+ "title": "Template",
+ "description": "customize what the prefix should contain, eg. `(<number>)`",
+ "type": "string"
}
},
- "allOf" : [
+ "allOf": [
{
- "$ref" : "#/$defs/font"
+ "$ref": "#/$defs/font"
}
]
},
- "header" : {
- "type" : "object",
- "title" : "Markdown header",
- "x-example" : {
- "header" : {
- "styles" : [
+ "header": {
+ "type": "object",
+ "title": "Markdown header",
+ "x-example": {
+ "header": {
+ "styles": [
"bold"
],
- "padding_top" : "2mm",
- "padding_bottom" : "2mm"
+ "padding_top": "2mm",
+ "padding_bottom": "2mm"
},
- "header_1" : {
- "size" : 14,
- "styles" : [
+ "header_1": {
+ "size": 14,
+ "styles": [
"bold",
"italic"
]
},
- "header_2" : {
- "size" : 12,
- "styles" : [
+ "header_2": {
+ "size": 12,
+ "styles": [
"bold"
]
}
},
- "allOf" : [
+ "allOf": [
{
- "$ref" : "#/$defs/font"
+ "$ref": "#/$defs/font"
},
{
- "$ref" : "#/$defs/padding"
+ "$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
+ "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
}
},
- "allOf" : [
+ "allOf": [
{
- "$ref" : "#/$defs/font"
+ "$ref": "#/$defs/font"
},
{
- "$ref" : "#/$defs/padding"
+ "$ref": "#/$defs/padding"
},
{
- "$ref" : "#/$defs/border"
+ "$ref": "#/$defs/border"
}
]
},
- "table_header" : {
- "type" : "object",
- "title" : "Table header cell",
- "description" : "Styling for a table header cell",
- "x-example" : {
- "table_header" : {
- "size" : 9,
- "styles" : [
+ "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"
+ "properties": {
+ "background_color": {
+ "$ref": "#/$defs/color"
},
- "no_repeating" : {
- "type" : "boolean"
+ "no_repeating": {
+ "type": "boolean"
}
},
- "allOf" : [
+ "allOf": [
{
- "$ref" : "#/$defs/font"
+ "$ref": "#/$defs/font"
},
{
- "$ref" : "#/$defs/padding"
+ "$ref": "#/$defs/padding"
},
{
- "$ref" : "#/$defs/border"
+ "$ref": "#/$defs/border"
}
]
},
- "paragraph" : {
- "type" : "object",
- "title" : "Markdown paragraph",
- "properties" : {
- "align" : {
- "type" : "string",
- "enum" : [
+ "paragraph": {
+ "type": "object",
+ "title": "Markdown paragraph",
+ "properties": {
+ "align": {
+ "type": "string",
+ "enum": [
"left",
"center",
"right",
@@ -1354,104 +1402,104 @@
]
}
},
- "allOf" : [
+ "allOf": [
{
- "$ref" : "#/$defs/font"
+ "$ref": "#/$defs/font"
},
{
- "$ref" : "#/$defs/padding"
+ "$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"
+ "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"
+ "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"
}
}
},
diff --git a/app/models/work_package/pdf_export/export/wp/standard.yml b/app/models/work_package/pdf_export/export/wp/standard.yml
index 953de089f0f..f557ca63dbd 100644
--- a/app/models/work_package/pdf_export/export/wp/standard.yml
+++ b/app/models/work_package/pdf_export/export/wp/standard.yml
@@ -77,6 +77,14 @@ work_package:
styles: [ "bold" ]
subject_level_10:
styles: [ "bold" ]
+ attributes_group:
+ size: 11
+ styles: [ "bold" ]
+ margin_top: 0
+ margin_bottom: 4
+ hr:
+ color: "1F2328"
+ height: 0.25
attributes_table:
margin_bottom: 16
cell:
@@ -88,6 +96,8 @@ work_package:
padding_bottom: 5
no_border: true
cell_label:
+ size: 9
+ color: "000000"
styles: [ "bold" ]
markdown_label:
size: 12
diff --git a/spec/models/work_packages/pdf_export/work_package_to_pdf_spec.rb b/spec/models/work_packages/pdf_export/work_package_to_pdf_spec.rb
index a24b0805f31..cc027c520ba 100644
--- a/spec/models/work_packages/pdf_export/work_package_to_pdf_spec.rb
+++ b/spec/models/work_packages/pdf_export/work_package_to_pdf_spec.rb
@@ -201,28 +201,28 @@ RSpec.describe WorkPackage::PDFExport::WorkPackageToPdf do
let(:expected_details) do
result = [
"##{work_package.id} #{work_package.subject}",
- "STATUS", work_package.status.name,
- "TYPE", type.name,
+ "Status", work_package.status.name,
+ "Type", type.name,
"People",
- "ASSIGNEE", user.name,
- "ACCOUNTABLE", user.name,
+ "Assignee", user.name,
+ "Accountable", user.name,
"Estimates and progress",
- "WORK", "10h",
- "REMAINING WORK", "9h",
- "% COMPLETE", "25%",
- "SPENT TIME", "0h",
+ "Work", "10h",
+ "Remaining work", "9h",
+ "% Complete", "25%",
+ "Spent time", "0h",
"Details",
- "PRIORITY", "Normal",
- "VERSION", work_package.version,
- "CATEGORY", work_package.category,
- "START DATE", "05/30/2024",
- "FINISH DATE", "05/30/2024",
- "DURATION", "1 d",
+ "Priority", "Normal",
+ "Version", work_package.version,
+ "Category", work_package.category,
+ "Start date", "05/30/2024",
+ "Finish date", "05/30/2024",
+ "Duration", "1 d",
"Other",
- "WORK PACKAGE CUSTOM FIELD BOOLEAN", "Yes",
+ "Work Package Custom Field Boolean", "Yes",
"Work Package Custom Field Long Text", "foo faa",
"Costs",
- "SPENT", "UNITS", "LABOR", "COSTS UNIT", "COSTS OVERALL", "COSTS BUDGET"
+ "Spent units", "Labor costs", "Unit costs", "Overall costs", "Budget"
]
result
end
@@ -441,10 +441,10 @@ RSpec.describe WorkPackage::PDFExport::WorkPackageToPdf do
"Custom field boolean", I18n.t(:general_text_Yes),
"Custom field rich text", "[#{I18n.t('export.macro.rich_text_unsupported')}]",
"Custom field hidden",
+ "No replacement of:",
"1", export_time_formatted, project.name,
- "No replacement of:",
"projectValue:1:status",
"projectLabel:status",
"projectValue:2:status projectLabel:status",