Visualize closed lists of speakers
Hints if a list of speakers is closed or not
This commit is contained in:
parent
bc99750869
commit
0ce5ab1eec
@ -77,6 +77,7 @@ _('Input format: DD.MM.YYYY HH:MM');
|
|||||||
_('Hide internal items when projecting subitems');
|
_('Hide internal items when projecting subitems');
|
||||||
_('Number of last speakers to be shown on the projector');
|
_('Number of last speakers to be shown on the projector');
|
||||||
_('List of speakers');
|
_('List of speakers');
|
||||||
|
_('The list of speakers is closed');
|
||||||
_('Show orange countdown in the last x seconds of speaking time');
|
_('Show orange countdown in the last x seconds of speaking time');
|
||||||
_('Enter duration in seconds. Choose 0 to disable warning color.');
|
_('Enter duration in seconds. Choose 0 to disable warning color.');
|
||||||
_('Hide the amount of speakers in subtitle of list of speakers slide');
|
_('Hide the amount of speakers in subtitle of list of speakers slide');
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
<mat-form-field [style.display]="fullWidth ? 'block' : 'inline-block'">
|
<mat-form-field [style.display]="fullWidth ? 'block' : 'inline-block'">
|
||||||
<mat-select [formControl]="formControl" placeholder="{{ listname | translate }}" [multiple]="multiple" #thisSelector>
|
<mat-select
|
||||||
|
[formControl]="formControl"
|
||||||
|
placeholder="{{ listname | translate }}"
|
||||||
|
[multiple]="multiple"
|
||||||
|
#thisSelector
|
||||||
|
>
|
||||||
<ngx-mat-select-search ngModel (ngModelChange)="onSearch($event)"></ngx-mat-select-search>
|
<ngx-mat-select-search ngModel (ngModelChange)="onSearch($event)"></ngx-mat-select-search>
|
||||||
<div *ngIf="!multiple && includeNone">
|
<div *ngIf="!multiple && includeNone">
|
||||||
<mat-option [value]="null">
|
<mat-option [value]="null">
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
<ng-container *osPerms="'agenda.can_see_list_of_speakers'">
|
<ng-container *osPerms="'agenda.can_see_list_of_speakers'">
|
||||||
<ng-container *ngIf="listOfSpeakers">
|
<ng-container *ngIf="listOfSpeakers">
|
||||||
<a class="anchor-button" *ngIf="!menuItem" [routerLink]="listOfSpeakersUrl">
|
<a class="anchor-button" *ngIf="!menuItem" [routerLink]="listOfSpeakersUrl">
|
||||||
<button type="button" mat-icon-button [disabled]="disabled">
|
<button type="button" mat-icon-button [disabled]="disabled" [matTooltip]="tooltip | translate">
|
||||||
<mat-icon
|
<mat-icon
|
||||||
[matBadge]="listOfSpeakers.waitingSpeakerAmount > 0 ? listOfSpeakers.waitingSpeakerAmount : null"
|
[matBadge]="listOfSpeakers.waitingSpeakerAmount > 0 ? listOfSpeakers.waitingSpeakerAmount : null"
|
||||||
matBadgeColor="accent"
|
matBadgeColor="accent"
|
||||||
>
|
>
|
||||||
mic
|
{{ icon }}
|
||||||
</mat-icon>
|
</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<button type="button" *ngIf="menuItem" mat-menu-item [routerLink]="listOfSpeakers.listOfSpeakersUrl">
|
<button type="button" *ngIf="menuItem" mat-menu-item [routerLink]="listOfSpeakers.listOfSpeakersUrl">
|
||||||
<mat-icon>mic</mat-icon>
|
<mat-icon>{{ icon }}</mat-icon>
|
||||||
<span translate>List of speakers</span>
|
<span translate>List of speakers</span>
|
||||||
</button>
|
</button>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
@ -44,6 +44,14 @@ export class SpeakerButtonComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public get icon(): string {
|
||||||
|
return this.listOfSpeakers.closed ? 'voice_over_off' : 'record_voice_over';
|
||||||
|
}
|
||||||
|
|
||||||
|
public get tooltip(): string {
|
||||||
|
return this.listOfSpeakers.closed ? 'The list of speakers is closed' : 'List of speakers';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The constructor
|
* The constructor
|
||||||
*/
|
*/
|
||||||
|
@ -13,7 +13,12 @@
|
|||||||
|
|
||||||
<mat-card class="os-card speaker-card" *ngIf="viewListOfSpeakers">
|
<mat-card class="os-card speaker-card" *ngIf="viewListOfSpeakers">
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
<h1 class="los-title">{{ viewListOfSpeakers.getTitle() }}</h1>
|
<h1 class="los-title">
|
||||||
|
{{ viewListOfSpeakers.getTitle() }}
|
||||||
|
<mat-icon *ngIf="viewListOfSpeakers.closed">
|
||||||
|
lock
|
||||||
|
</mat-icon>
|
||||||
|
</h1>
|
||||||
|
|
||||||
<!-- List of finished speakers -->
|
<!-- List of finished speakers -->
|
||||||
<mat-expansion-panel *ngIf="finishedSpeakers && finishedSpeakers.length > 0" class="finished-list">
|
<mat-expansion-panel *ngIf="finishedSpeakers && finishedSpeakers.length > 0" class="finished-list">
|
||||||
@ -131,7 +136,7 @@
|
|||||||
<!-- Add me and remove me if OP has correct permission -->
|
<!-- Add me and remove me if OP has correct permission -->
|
||||||
<div *osPerms="'agenda.can_be_speaker'" class="add-self-buttons">
|
<div *osPerms="'agenda.can_be_speaker'" class="add-self-buttons">
|
||||||
<div *ngIf="speakers && !closedList">
|
<div *ngIf="speakers && !closedList">
|
||||||
<button mat-stroked-button (click)="addNewSpeaker()" *ngIf="!isOpInList() && canAddSelf">
|
<button mat-stroked-button [disabled]="viewListOfSpeakers.closed" (click)="addNewSpeaker()" *ngIf="!isOpInList() && canAddSelf">
|
||||||
<mat-icon>add</mat-icon>
|
<mat-icon>add</mat-icon>
|
||||||
<span translate>Add me</span>
|
<span translate>Add me</span>
|
||||||
</button>
|
</button>
|
||||||
@ -166,12 +171,12 @@
|
|||||||
></os-projector-button>
|
></os-projector-button>
|
||||||
|
|
||||||
<button mat-menu-item *ngIf="isListOfSpeakersClosed" (click)="openSpeakerList()">
|
<button mat-menu-item *ngIf="isListOfSpeakersClosed" (click)="openSpeakerList()">
|
||||||
<mat-icon>mic</mat-icon>
|
<mat-icon>lock_open</mat-icon>
|
||||||
<span translate>Open list of speakers</span>
|
<span translate>Open list of speakers</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button mat-menu-item *ngIf="!isListOfSpeakersClosed" (click)="closeSpeakerList()">
|
<button mat-menu-item *ngIf="!isListOfSpeakersClosed" (click)="closeSpeakerList()">
|
||||||
<mat-icon>mic_off</mat-icon>
|
<mat-icon>lock</mat-icon>
|
||||||
<span translate>Close list of speakers</span>
|
<span translate>Close list of speakers</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
@ -369,7 +369,11 @@ export class ListOfSpeakersComponent extends BaseViewComponent implements OnInit
|
|||||||
* @returns 0 or the number of times a speaker occurs in finishedSpeakers
|
* @returns 0 or the number of times a speaker occurs in finishedSpeakers
|
||||||
*/
|
*/
|
||||||
public hasSpokenCount(speaker: ViewSpeaker): number {
|
public hasSpokenCount(speaker: ViewSpeaker): number {
|
||||||
return this.finishedSpeakers.filter(finishedSpeaker => finishedSpeaker.user.id === speaker.user.id).length;
|
return this.finishedSpeakers.filter(finishedSpeaker => {
|
||||||
|
if (finishedSpeaker && finishedSpeaker.user) {
|
||||||
|
return finishedSpeaker.user.id === speaker.user.id;
|
||||||
|
}
|
||||||
|
}).length;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user