Merge pull request #5192 from tsiegleauq/reco-and-state-in-pdf-toc
Show final state in Motion PDF toc
This commit is contained in:
commit
a6bdaedff1
@ -176,7 +176,7 @@ _('Custom number of ballot papers');
|
|||||||
_('PDF export');
|
_('PDF export');
|
||||||
_('Title for PDF documents of motions');
|
_('Title for PDF documents of motions');
|
||||||
_('Preamble text for PDF documents of motions');
|
_('Preamble text for PDF documents of motions');
|
||||||
_('Show submitters and recommendation in table of contents');
|
_('Show submitters and recommendation/state in table of contents');
|
||||||
_('Show checkbox to record decision');
|
_('Show checkbox to record decision');
|
||||||
// misc motion strings
|
// misc motion strings
|
||||||
_('Amendment');
|
_('Amendment');
|
||||||
|
@ -243,8 +243,13 @@ export class MotionPdfCatalogService {
|
|||||||
* @returns {Array<Object>} An array containing the `DocDefinitions` for `pdf-make`.
|
* @returns {Array<Object>} An array containing the `DocDefinitions` for `pdf-make`.
|
||||||
*/
|
*/
|
||||||
private appendSubmittersAndRecommendation(motion: ViewMotion, style: StyleType = StyleType.DEFAULT): Object[] {
|
private appendSubmittersAndRecommendation(motion: ViewMotion, style: StyleType = StyleType.DEFAULT): Object[] {
|
||||||
const recommendation = this.motionRepo.getExtendedRecommendationLabel(motion);
|
|
||||||
let submitterList = '';
|
let submitterList = '';
|
||||||
|
let state = '';
|
||||||
|
if (motion.state.isFinalState) {
|
||||||
|
state = this.motionRepo.getExtendedStateLabel(motion);
|
||||||
|
} else {
|
||||||
|
state = this.motionRepo.getExtendedRecommendationLabel(motion);
|
||||||
|
}
|
||||||
for (let i = 0; i < motion.submitters.length; ++i) {
|
for (let i = 0; i < motion.submitters.length; ++i) {
|
||||||
submitterList +=
|
submitterList +=
|
||||||
i !== motion.submitters.length - 1
|
i !== motion.submitters.length - 1
|
||||||
@ -257,7 +262,7 @@ export class MotionPdfCatalogService {
|
|||||||
`${motion.id}`,
|
`${motion.id}`,
|
||||||
style,
|
style,
|
||||||
this.pdfService.createTocLineInline(submitterList),
|
this.pdfService.createTocLineInline(submitterList),
|
||||||
this.pdfService.createTocLineInline(recommendation, true)
|
this.pdfService.createTocLineInline(state, true)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -416,7 +416,7 @@ def get_config_variables():
|
|||||||
yield ConfigVariable(
|
yield ConfigVariable(
|
||||||
name="motions_export_submitter_recommendation",
|
name="motions_export_submitter_recommendation",
|
||||||
default_value=False,
|
default_value=False,
|
||||||
label="Show submitters and recommendation in table of contents",
|
label="Show submitters and recommendation/state in table of contents",
|
||||||
input_type="boolean",
|
input_type="boolean",
|
||||||
weight=384,
|
weight=384,
|
||||||
group="Motions",
|
group="Motions",
|
||||||
|
Loading…
Reference in New Issue
Block a user