Hide motion preamble in final state
If a motion is in final state, the preamble does not get shown in detail view and pdf
This commit is contained in:
parent
aed17360e6
commit
a9c1578ebb
@ -142,6 +142,10 @@ export class ViewMotion extends BaseViewModelWithAgendaItemAndListOfSpeakers<Mot
|
||||
return this.speakerAmount > 0;
|
||||
}
|
||||
|
||||
public get showPreamble(): boolean {
|
||||
return !this.state?.isFinalState ?? true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Translate the state's css class into a color
|
||||
*
|
||||
|
@ -40,7 +40,7 @@
|
||||
<div *ngIf="changes.length === 0" class="no-changes">{{ 'No change recommendations yet' | translate }}</div>
|
||||
</section>
|
||||
|
||||
<span class="text-prefix-label">{{ preamble | translate }}</span>
|
||||
<span class="text-prefix-label" *ngIf="showPreamble">{{ preamble | translate }}</span>
|
||||
|
||||
<!-- The actual diff view -->
|
||||
<div class="motion-text-with-diffs">
|
||||
|
@ -85,6 +85,10 @@ export class MotionDetailDiffComponent extends BaseViewComponent implements Afte
|
||||
|
||||
public preamble: string;
|
||||
|
||||
public get showPreamble(): boolean {
|
||||
return this.motion.showPreamble;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param title
|
||||
* @param translate
|
||||
|
@ -667,7 +667,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Text (hide preamble, if diff mode. The preample is included in the motion-detail-diff component) -->
|
||||
<span *ngIf="!isRecoMode(ChangeRecoMode.Diff)" class="text-prefix-label">{{ preamble | translate }}</span>
|
||||
<span *ngIf="showPreamble && !isRecoMode(ChangeRecoMode.Diff)" class="text-prefix-label">{{ preamble | translate }}</span>
|
||||
|
||||
<!-- Regular motions or traditional amendments -->
|
||||
<ng-container *ngIf="!editMotion && !motion.isStatuteAmendment() && !motion.isParagraphBasedAmendment()">
|
||||
|
@ -167,6 +167,10 @@ export class MotionDetailComponent extends BaseViewComponent implements OnInit,
|
||||
);
|
||||
}
|
||||
|
||||
public get showPreamble(): boolean {
|
||||
return this.motion.showPreamble;
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the target motion. Accessed via the getter and setter.
|
||||
*/
|
||||
|
@ -132,8 +132,10 @@ export class MotionPdfService {
|
||||
}
|
||||
|
||||
if (!contentToExport || contentToExport.includes('text')) {
|
||||
const preamble = this.createPreamble(motion);
|
||||
motionPdfContent.push(preamble);
|
||||
if (motion.showPreamble) {
|
||||
const preamble = this.createPreamble(motion);
|
||||
motionPdfContent.push(preamble);
|
||||
}
|
||||
const text = this.createText(motion, lineLength, lnMode, crMode);
|
||||
motionPdfContent.push(text);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user