Adds a variable to hide the motion-text on projector

This commit is contained in:
GabrielMeyer 2019-09-09 19:12:23 +02:00
parent 2c58d0f0fe
commit c0ded6f32e
4 changed files with 23 additions and 8 deletions

View File

@ -35,7 +35,7 @@
<div id="text-wrapper">
<div id="text" [ngStyle]="textDivStyles">
<!-- Text -->
<span class="text-prefix-label">{{ preamble | translate }}</span>
<span *ngIf="isStatuteAmendment() || isParagraphBasedAmendment() || !!getFormattedText()" class="text-prefix-label">{{ preamble | translate }}</span>
<!-- Regular motions or traditional amendments -->
<ng-container *ngIf="!isStatuteAmendment() && !isParagraphBasedAmendment()">
@ -51,7 +51,7 @@
</div>
<div [innerHTML]="getFormattedTitleDiff()"></div>
</div>
<div [innerHTML]="sanitizedText(getFormattedText())"></div>
<div *ngIf="getFormattedText()" [innerHTML]="sanitizedText(getFormattedText())"></div>
</div>
</ng-container>

View File

@ -324,6 +324,9 @@ export class MotionSlideComponent extends BaseMotionSlideComponent<MotionSlideDa
// const changes: ViewUnifiedChange[] = Object.assign([], this.allChangingObjects);
const motion = this.data.data;
if (!motion.text) {
return null;
}
switch (this.crMode) {
case ChangeRecoMode.Original:
return this.lineNumbering.insertLineNumbers(motion.text, this.lineLength, this.highlightedLine);

View File

@ -95,12 +95,22 @@ def get_config_variables():
subgroup="General",
)
yield ConfigVariable(
name="motions_disable_text_on_projector",
default_value=False,
input_type="boolean",
label="Hide motion-text on projector",
weight=325,
group="Motions",
subgroup="General",
)
yield ConfigVariable(
name="motions_disable_reason_on_projector",
default_value=False,
input_type="boolean",
label="Hide reason on projector",
weight=325,
weight=326,
group="Motions",
subgroup="General",
)
@ -110,7 +120,7 @@ def get_config_variables():
default_value=False,
input_type="boolean",
label="Hide meta information box on projector",
weight=326,
weight=327,
group="Motions",
subgroup="General",
)
@ -120,7 +130,7 @@ def get_config_variables():
default_value=False,
input_type="boolean",
label="Hide recommendation on projector",
weight=327,
weight=328,
group="Motions",
subgroup="General",
)
@ -130,7 +140,7 @@ def get_config_variables():
default_value=False,
input_type="boolean",
label="Hide referring motions",
weight=328,
weight=329,
group="Motions",
subgroup="General",
)
@ -141,7 +151,7 @@ def get_config_variables():
input_type="boolean",
label="Show the sequential number for a motion",
help_text="In motion list, motion detail and PDF.",
weight=329,
weight=330,
group="Motions",
subgroup="General",
)

View File

@ -211,7 +211,6 @@ async def motion_slide(
"identifier": motion["identifier"],
"title": motion["title"],
"preamble": motions_preamble,
"text": motion["text"],
"amendment_paragraphs": motion["amendment_paragraphs"],
"base_motion": base_motion,
"base_statute": base_statute,
@ -224,6 +223,9 @@ async def motion_slide(
"line_numbering_mode": line_numbering_mode,
}
if not await get_config(all_data, "motions_disable_text_on_projector"):
return_value["text"] = motion["text"]
if not await get_config(all_data, "motions_disable_reason_on_projector"):
return_value["reason"] = motion["reason"]