OpenSlides/client/src/app/shared/components/head-bar/head-bar.component.html

77 lines
2.6 KiB
HTML
Raw Normal View History

2018-11-29 17:36:22 +01:00
<mat-toolbar color="primary" [ngClass]="multiSelectMode ? 'multi-select' : ''" *ngIf="!vp.isMobile"></mat-toolbar>
<mat-toolbar color="primary" [ngClass]="multiSelectMode ? 'multi-select' : ''" class="sticky-toolbar">
2018-11-06 15:35:51 +01:00
<div class="toolbar-left">
<!-- Nav menu -->
2018-11-29 17:36:22 +01:00
<button
mat-icon-button
class="on-transition-fade"
*ngIf="vp.isMobile && nav && !multiSelectMode"
(click)="clickHamburgerMenu()"
>
<mat-icon>menu</mat-icon>
</button>
2018-11-06 15:35:51 +01:00
<!-- Exit / Back button -->
2018-11-29 17:36:22 +01:00
<button
mat-icon-button
class="on-transition-fade"
*ngIf="!nav && !editMode && !multiSelectMode"
(click)="onBackButton()"
>
2018-11-06 15:35:51 +01:00
<mat-icon>arrow_back</mat-icon>
</button>
2018-11-06 15:35:51 +01:00
<!-- Cancel edit button -->
<button mat-icon-button class="on-transition-fade" *ngIf="editMode" (click)="sendMainEvent()">
<mat-icon>close</mat-icon>
</button>
2018-11-05 17:40:32 +01:00
<div class="toolbar-left-text on-transition-fade" *ngIf="!multiSelectMode">
2018-11-06 15:35:51 +01:00
<!-- Title slot -->
<ng-content select=".title-slot"></ng-content>
</div>
</div>
2018-11-05 17:40:32 +01:00
2018-11-29 17:36:22 +01:00
<!-- centered information slot -->
<div *ngIf="!multiSelectMode" class="spacer"></div>
2018-11-05 17:40:32 +01:00
<div class="toolbar-centered on-transition-fade" *ngIf="multiSelectMode">
<ng-content select=".central-info-slot"></ng-content>
</div>
2018-11-29 17:36:22 +01:00
<div class="spacer"></div>
2018-11-05 17:40:32 +01:00
<div class="toolbar-right">
2018-11-06 15:35:51 +01:00
<!-- Extra controls slot -->
<div class="extra-controls-wrapper on-transition-fade">
<ng-content select=".extra-controls-slot"></ng-content>
</div>
2018-11-06 15:35:51 +01:00
<!-- Main action button - desktop -->
2018-11-29 17:36:22 +01:00
<button
mat-mini-fab
color="accent"
class="on-transition-fade"
*ngIf="mainButton && !editMode && !vp.isMobile && !multiSelectMode"
(click)="sendMainEvent()"
>
2018-11-08 17:38:44 +01:00
<mat-icon>{{ mainButtonIcon }}</mat-icon>
2018-11-06 15:35:51 +01:00
</button>
<!-- Save button -->
2018-11-29 17:36:22 +01:00
<button mat-button *ngIf="editMode" (click)="save()"><strong translate class="upper">Save</strong></button>
2018-11-06 15:35:51 +01:00
<!-- Menu button slot -->
<ng-content class="on-transition-fade" *ngIf="!editMode" select=".menu-slot"></ng-content>
</div>
</mat-toolbar>
2018-11-29 17:36:22 +01:00
<!-- Main action button - mobile -->
2018-11-05 17:40:32 +01:00
2018-11-29 17:36:22 +01:00
<button
mat-fab
class="head-button on-transition-fade"
*ngIf="mainButton && !editMode && vp.isMobile && !multiSelectMode"
(click)="sendMainEvent()"
>
2018-11-08 17:38:44 +01:00
<mat-icon>{{ mainButtonIcon }}</mat-icon>
2018-11-06 15:35:51 +01:00
</button>