Feat: Add default PDF layout option as fallback to ENV

This commit is contained in:
Silvia Bigler
2025-01-26 11:47:14 +01:00
committed by shamoon
parent 96d1a43da7
commit 6b398a6c62
7 changed files with 118 additions and 80 deletions

View File

@@ -2030,7 +2030,7 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">84</context>
<context context-type="linenumber">88</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/workflow-edit-dialog/workflow-edit-dialog.component.html</context>
@@ -4032,123 +4032,130 @@
<context context-type="linenumber">58</context>
</context-group>
</trans-unit>
<trans-unit id="8776300244268604360" datatype="html">
<source>System default</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">65</context>
</context-group>
</trans-unit>
<trans-unit id="4812910224365219000" datatype="html">
<source>Text, then HTML</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">65</context>
<context context-type="linenumber">69</context>
</context-group>
</trans-unit>
<trans-unit id="3181744476823286470" datatype="html">
<source>HTML, then text</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">69</context>
<context context-type="linenumber">73</context>
</context-group>
</trans-unit>
<trans-unit id="9048933760263399623" datatype="html">
<source>HTML only</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">73</context>
<context context-type="linenumber">77</context>
</context-group>
</trans-unit>
<trans-unit id="3835211125655594627" datatype="html">
<source>Text only</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">77</context>
<context context-type="linenumber">81</context>
</context-group>
</trans-unit>
<trans-unit id="2784260611081866636" datatype="html">
<source>Move to specified folder</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">88</context>
<context context-type="linenumber">92</context>
</context-group>
</trans-unit>
<trans-unit id="4593278936733161020" datatype="html">
<source>Mark as read, don&apos;t process read mails</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">92</context>
<context context-type="linenumber">96</context>
</context-group>
</trans-unit>
<trans-unit id="2378921144019636516" datatype="html">
<source>Flag the mail, don&apos;t process flagged mails</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">96</context>
<context context-type="linenumber">100</context>
</context-group>
</trans-unit>
<trans-unit id="6457024618858980302" datatype="html">
<source>Tag the mail with specified tag, don&apos;t process tagged mails</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">100</context>
<context context-type="linenumber">104</context>
</context-group>
</trans-unit>
<trans-unit id="4673329664686432878" datatype="html">
<source>Use subject as title</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">107</context>
<context context-type="linenumber">111</context>
</context-group>
</trans-unit>
<trans-unit id="8645471396972938185" datatype="html">
<source>Use attachment filename as title</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">111</context>
<context context-type="linenumber">115</context>
</context-group>
</trans-unit>
<trans-unit id="2881879110886196973" datatype="html">
<source>Do not assign title from this rule</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">115</context>
<context context-type="linenumber">119</context>
</context-group>
</trans-unit>
<trans-unit id="1568902914205618549" datatype="html">
<source>Do not assign a correspondent</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">122</context>
<context context-type="linenumber">126</context>
</context-group>
</trans-unit>
<trans-unit id="3567746385454588269" datatype="html">
<source>Use mail address</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">126</context>
<context context-type="linenumber">130</context>
</context-group>
</trans-unit>
<trans-unit id="445154175758965852" datatype="html">
<source>Use name (or mail address if not available)</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">130</context>
<context context-type="linenumber">134</context>
</context-group>
</trans-unit>
<trans-unit id="1258862217749148424" datatype="html">
<source>Use correspondent selected below</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">134</context>
<context context-type="linenumber">138</context>
</context-group>
</trans-unit>
<trans-unit id="3147349817770432927" datatype="html">
<source>Create new mail rule</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">186</context>
<context context-type="linenumber">190</context>
</context-group>
</trans-unit>
<trans-unit id="3374331029704382439" datatype="html">
<source>Edit mail rule</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts</context>
<context context-type="linenumber">190</context>
<context context-type="linenumber">194</context>
</context-group>
</trans-unit>
<trans-unit id="8911059720204770105" datatype="html">

View File

@@ -60,6 +60,10 @@ const CONSUMPTION_SCOPE_OPTIONS = [
]
const PDF_LAYOUT_OPTIONS = [
{
id: MailRulePdfLayout.Default,
name: $localize`System default`,
},
{
id: MailRulePdfLayout.TextHtml,
name: $localize`Text, then HTML`,
@@ -204,7 +208,7 @@ export class MailRuleEditDialogComponent extends EditDialogComponent<MailRule> {
filter_attachment_filename_exclude: new FormControl(null),
maximum_age: new FormControl(null),
attachment_type: new FormControl(MailFilterAttachmentType.Attachments),
pdf_layout: new FormControl(MailRulePdfLayout.TextHtml),
pdf_layout: new FormControl(MailRulePdfLayout.Default),
consumption_scope: new FormControl(MailRuleConsumptionScope.Attachments),
order: new FormControl(null),
action: new FormControl(MailAction.MarkRead),

View File

@@ -12,6 +12,7 @@ export enum MailRuleConsumptionScope {
}
export enum MailRulePdfLayout {
Default = 0,
TextHtml = 1,
HtmlText = 2,
HtmlOnly = 3,