Newer
Older
<div class="fx-row-start-stretch"
[style.height.%]="100">
<button class="drawer-button show-elements-button" (click)="toolbox_drawer.toggle()">
<span>
{{'elements' | translate | uppercase}}
<mat-drawer-container class="fx-flex">
<mat-drawer #toolbox_drawer class="toolbox_drawer" mode="side" opened>
<aspect-ui-element-toolbox></aspect-ui-element-toolbox>
preserveContent="true"
[style.height.%]="100" mat-align-tabs="start" mat-stretch-tabs="false"
[selectedIndex]="showPagesAsList ? 0 : selectionService.selectedPageIndex"
(selectedIndexChange)="selectPage($event)"
(animationDone)="pageChangeService.pageChanged.emit()">
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<ng-container *ngIf="!showPagesAsList">
<mat-tab *ngFor="let page of unitService.unit.pages; let i = index">
<ng-template mat-tab-label>
<ng-container *ngIf="page.alwaysVisible">
<mat-icon [matTooltip]="'Dauerhaft sichtbare Seite'"
[matTooltipPosition]="'above'" [matTooltipShowDelay]="400">
sticky_note_2
</mat-icon>
</ng-container>
<ng-container *ngIf="!page.alwaysVisible && unitService.unit.pages[0].alwaysVisible === false">
{{'page' | translate }} {{i + 1}}
</ng-container>
<ng-container *ngIf="!page.alwaysVisible && unitService.unit.pages[0].alwaysVisible === true">
{{'page' | translate }} {{i}}
</ng-container>
<button *ngIf="selectionService.selectedPageIndex == i"
mat-icon-button class="menu-button" [matMenuTriggerFor]="pageMenu"
[matTooltip]="'Seiteneinstellungen'" [matTooltipPosition]="'above'" [matTooltipShowDelay]="400">
<mat-icon>more_vert</mat-icon>
</button>
<mat-menu #pageMenu="matMenu">
<div (click)="$event.stopPropagation()">
<aspect-unit-view-page-menu [page]="page" [pageIndex]="i"
(pageOrderChanged)="refreshTabs()"></aspect-unit-view-page-menu>
</div>
</mat-menu>
</ng-template>
<aspect-page-canvas *ngIf="pagesLoaded" class="fx-column-start-stretch fullscreen-page"
[pages]="[unitService.unit.pages[selectionService.selectedPageIndex]]"
(pagesChanged)="refreshTabs()">
</aspect-page-canvas>
</mat-tab>
</ng-container>
<ng-container *ngIf="showPagesAsList">
<mat-tab *ngIf="unitService.unit.pages[0].alwaysVisible">
<ng-template mat-tab-label>
<mat-icon [matTooltip]="'Dauerhaft sichtbare Seite'"
[matTooltipPosition]="'above'" [matTooltipShowDelay]="400">
sticky_note_2
</mat-icon>
</ng-template>
<aspect-page-canvas *ngIf="pagesLoaded" class="fx-column-start-stretch"
[pages]="[unitService.unit.pages[0]]">
</aspect-page-canvas>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>
{{unitService.unit.pages[0].alwaysVisible ? unitService.unit.pages.length - 1: unitService.unit.pages.length}} Seiten
</ng-template>
<aspect-page-canvas *ngIf="pagesLoaded" class="fx-column-start-stretch"
[pages]="unitService.unit.pages[0].alwaysVisible ?
unitService.unit.pages.slice(1) : unitService.unit.pages">
</aspect-page-canvas>
<button mat-fab extended class="add-page-button" [matTooltip]="'Weitere Seite anlegen'" (click)="addPage()">
<mat-icon>add</mat-icon>Neue Seite
<mat-tab *ngIf="!showPagesAsList" [disabled]="true">
<button mat-icon-button [matTooltip]="'Weitere Seite anlegen'" (click)="addPage()">
<mat-icon>add</mat-icon>
</button>
</ng-template>
</mat-tab>
<!-- Commented out for now, until feature works-->
<!-- <mat-tab disabled>-->
<!-- <ng-template mat-tab-label>-->
<!-- <button mat-icon-button class="history-button" [matMenuTriggerFor]="historyMenu">-->
<!-- <mat-icon>history</mat-icon>-->
<!-- </button>-->
<!-- <mat-menu #historyMenu="matMenu">-->
<!-- <h3>Änderungshistorie</h3>-->
<!-- <p [style.color]="'red'">Achtung experimentelle Funktion!<br>-->
<!-- Benutzung kann Fehler verursachen bis hin zu kaputter Unit.</p>-->
<!-- <div *ngFor="let command of historyService.commandList">-->
<!-- <p>{{ command.title }}</p>-->
<!-- </div>-->
<!-- <button *ngIf="historyService.commandList.length > 0" (click)="unitService.rollback()">Rollback</button>-->
<!-- </mat-menu>-->
<!-- </ng-template>-->
<!-- </mat-tab>-->
<mat-tab [disabled]="true" class="align-right">
<ng-template mat-tab-label>
<button mat-icon-button [matMenuTriggerFor]="numberingMenu">
<mat-icon>format_list_numbered</mat-icon>
</button>
<mat-menu #numberingMenu="matMenu" (click)="$event.stopPropagation()">
<div [style.padding]="'0 20px 10px'" (click)="$event.stopPropagation()">
<h3>Abschnittsnummerierung</h3>
<mat-checkbox #numberingInput [checked]="unitService.unit.enableSectionNumbering"
(change)="setSectionNumbering($event)">
Nummerierung aktivieren
</mat-checkbox>
<mat-checkbox [disabled]="!numberingInput.checked" (change)="setSectionNumberingPosition($event)">
vertikale Ausrichtung
</mat-checkbox>
</div>
</mat-menu>
</ng-template>
</mat-tab>
<mat-tab [disabled]="true" class="align-right">
<ng-template mat-tab-label>
<button mat-icon-button [matMenuTriggerFor]="extrasMenu">
<mat-icon>menu</mat-icon>
</button>
<mat-menu #extrasMenu="matMenu" (click)="$event.stopPropagation()">
<div [style.padding]="'0 20px 10px'" (click)="$event.stopPropagation()">
<mat-checkbox [disabled]="!unitService.allowExpertMode"
[ngModel]="unitService.expertMode" (change)="setExpertMode($event)">
<mat-checkbox [checked]="showPagesAsList" (change)="toggleViewMode()">
Seitenansicht untereinander
</mat-checkbox>
</div>
</mat-menu>
</ng-template>
</mat-tab>
<mat-drawer #properties_drawer class="properties_drawer" position="end" mode="side" opened>
<aspect-element-properties></aspect-element-properties>
<button class="drawer-button show-properties-button" (click)="properties_drawer.toggle()">
<span>
{{'properties' | translate | uppercase}}