From fef3cf41bb26d2142258abbe7d60602ce97318c4 Mon Sep 17 00:00:00 2001 From: Sean Date: Wed, 13 May 2020 15:18:31 +0200 Subject: [PATCH] Hide the submitter-box in motion slide if empty Hides the "submitter" text and corresponding boxes if they are empty --- .../motions/motion/motion-slide-data.ts | 2 +- .../motion/motion-slide.component.html | 72 +++++++++---------- .../motions/motion/motion-slide.component.ts | 9 +++ 3 files changed, 46 insertions(+), 37 deletions(-) diff --git a/client/src/app/slides/motions/motion/motion-slide-data.ts b/client/src/app/slides/motions/motion/motion-slide-data.ts index 1badec8c7..e60ef3080 100644 --- a/client/src/app/slides/motions/motion/motion-slide-data.ts +++ b/client/src/app/slides/motions/motion/motion-slide-data.ts @@ -63,7 +63,7 @@ export interface MotionSlideData { reason?: string; is_child: boolean; show_meta_box: boolean; - submitter?: string[]; + submitters?: string[]; recommender?: string; recommendation?: string; recommendation_extension?: string; diff --git a/client/src/app/slides/motions/motion/motion-slide.component.html b/client/src/app/slides/motions/motion/motion-slide.component.html index 38af8c6cf..7a594df69 100644 --- a/client/src/app/slides/motions/motion/motion-slide.component.html +++ b/client/src/app/slides/motions/motion/motion-slide.component.html @@ -5,7 +5,7 @@ [ngStyle]="{ 'margin-top': projector.show_header_footer ? '144px' : '94px' }" > -

{{ 'Submitters' | translate }}

+

{{ 'Submitters' | translate }}

{{ submitter }}, @@ -34,41 +34,41 @@ -
- - - - - - - - - - - - - - - - -
- {{ 'Submitters' | translate }}: - - - {{ submitter }}, - -
- {{ data.data.recommender }}: - - {{ getRecommendationLabel() }} -
- {{ 'Referring motions' | translate }}: - - - {{ getIdentifierOrTitle(titleInformation) }}, - -
-
+ + + + + + + + + + + + + + + + + +
+ {{ 'Submitters' | translate }}: + + + {{ submitter }}, + +
+ {{ data.data.recommender }}: + + {{ getRecommendationLabel() }} +
+ {{ 'Referring motions' | translate }}: + + + {{ getIdentifierOrTitle(titleInformation) }}, + +
+ diff --git a/client/src/app/slides/motions/motion/motion-slide.component.ts b/client/src/app/slides/motions/motion/motion-slide.component.ts index 30ce6bb89..0d030af40 100644 --- a/client/src/app/slides/motions/motion/motion-slide.component.ts +++ b/client/src/app/slides/motions/motion/motion-slide.component.ts @@ -85,6 +85,15 @@ export class MotionSlideComponent extends BaseMotionSlideComponent 0 || + (!!this.data.data.recommendation && !!this.data.data.recommender) || + !!this.data.data.recommendation_referencing_motions) + ); + } + private _scroll = 0; @Input()