Merge pull request #4930 from GabrielInTheWorld/showNumberOrLetIt

Sets the default value for sequential numbers in export dialog
This commit is contained in:
Sean 2019-08-20 14:48:33 +02:00 committed by GitHub
commit df429a7d8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,7 +49,7 @@ export class MotionExportDialogComponent implements OnInit {
format: ExportFileFormat.PDF, format: ExportFileFormat.PDF,
content: ['text', 'reason'], content: ['text', 'reason'],
pdfOptions: ['toc', 'page'], pdfOptions: ['toc', 'page'],
metaInfo: ['submitters', 'state', 'recommendation', 'category', 'origin', 'tags', 'motion_block', 'polls', 'id'] metaInfo: ['submitters', 'state', 'recommendation', 'category', 'origin', 'tags', 'motion_block', 'polls']
}; };
/** /**
@ -96,6 +96,9 @@ export class MotionExportDialogComponent implements OnInit {
) { ) {
this.defaults.lnMode = this.configService.instant('motions_default_line_numbering'); this.defaults.lnMode = this.configService.instant('motions_default_line_numbering');
this.defaults.crMode = this.configService.instant('motions_recommendation_text_mode'); this.defaults.crMode = this.configService.instant('motions_recommendation_text_mode');
if (this.configService.instant('motions_show_sequential_numbers')) {
this.defaults.metaInfo.push('id');
}
// Get the export order, exclude everything that does not count as meta-data // Get the export order, exclude everything that does not count as meta-data
this.metaInfoExportOrder = motionImportExportHeaderOrder.filter(metaData => { this.metaInfoExportOrder = motionImportExportHeaderOrder.filter(metaData => {
return !noMetaData.some(noMeta => metaData === noMeta); return !noMetaData.some(noMeta => metaData === noMeta);