2018-07-31 15:46:55 +02:00
|
|
|
<mat-sidenav-container autosize class='main-container'>
|
2018-08-23 16:49:51 +02:00
|
|
|
<mat-sidenav #sideNav [mode]="vp.isMobile ? 'push' : 'side'" [opened]='!vp.isMobile' disableClose='!vp.isMobile' class="side-panel">
|
2018-07-26 16:40:34 +02:00
|
|
|
<mat-toolbar class='nav-toolbar'>
|
2018-06-29 17:24:44 +02:00
|
|
|
<!-- logo -->
|
2018-08-02 16:39:08 +02:00
|
|
|
<mat-toolbar-row class='os-logo-container'>
|
2018-06-29 17:24:44 +02:00
|
|
|
</mat-toolbar-row>
|
|
|
|
</mat-toolbar>
|
2018-06-25 17:03:52 +02:00
|
|
|
|
2018-06-29 17:24:44 +02:00
|
|
|
<!-- User Menu -->
|
2018-07-26 16:40:34 +02:00
|
|
|
<mat-expansion-panel class='user-menu mat-elevation-z0'>
|
2018-06-29 17:24:44 +02:00
|
|
|
<mat-expansion-panel-header>
|
2018-07-06 09:38:25 +02:00
|
|
|
<!-- Get the username from operator -->
|
|
|
|
{{username}}
|
2018-06-29 17:24:44 +02:00
|
|
|
</mat-expansion-panel-header>
|
2018-08-03 11:05:21 +02:00
|
|
|
<mat-nav-list>
|
2018-08-09 13:45:48 +02:00
|
|
|
<a mat-list-item [matMenuTriggerFor]="languageMenu">
|
2018-10-11 14:03:44 +02:00
|
|
|
<mat-icon>language</mat-icon>
|
2018-08-09 13:45:48 +02:00
|
|
|
<span> {{getLangName(this.translate.currentLang)}} </span>
|
|
|
|
</a>
|
2018-08-28 11:07:10 +02:00
|
|
|
<a *ngIf="isLoggedIn" (click)='editProfile()' mat-list-item>
|
2018-10-11 14:03:44 +02:00
|
|
|
<mat-icon>person</mat-icon>
|
2018-08-03 11:05:21 +02:00
|
|
|
<span translate>Edit Profile</span>
|
|
|
|
</a>
|
2018-08-28 11:07:10 +02:00
|
|
|
<a *ngIf="isLoggedIn" (click)='changePassword()' mat-list-item>
|
2018-10-11 14:03:44 +02:00
|
|
|
<mat-icon>vpn_key</mat-icon>
|
2018-08-03 11:05:21 +02:00
|
|
|
<span translate>Change Password</span>
|
|
|
|
</a>
|
|
|
|
<mat-divider></mat-divider>
|
2018-08-28 11:07:10 +02:00
|
|
|
<a *ngIf="isLoggedIn" (click)='logout()' mat-list-item>
|
2018-10-11 14:03:44 +02:00
|
|
|
<mat-icon>exit_to_app</mat-icon>
|
2018-08-03 11:05:21 +02:00
|
|
|
<span translate>Logout</span>
|
|
|
|
</a>
|
2018-08-28 11:07:10 +02:00
|
|
|
<a *ngIf="!isLoggedIn" routerLink='/login' mat-list-item>
|
2018-10-11 14:03:44 +02:00
|
|
|
<mat-icon>exit_to_app</mat-icon>
|
2018-08-28 11:07:10 +02:00
|
|
|
<span translate>Login</span>
|
|
|
|
</a>
|
2018-08-03 11:05:21 +02:00
|
|
|
</mat-nav-list>
|
2018-06-29 17:24:44 +02:00
|
|
|
</mat-expansion-panel>
|
2018-08-09 13:45:48 +02:00
|
|
|
<!-- TODO: Could use translate.getLangs() to fetch available languages-->
|
|
|
|
<mat-menu #languageMenu="matMenu">
|
|
|
|
<button mat-menu-item (click)='selectLang("en")' translate>English</button>
|
|
|
|
<button mat-menu-item (click)='selectLang("de")' translate>German</button>
|
|
|
|
<button mat-menu-item (click)='selectLang("fr")' translate>French</button>
|
|
|
|
</mat-menu>
|
2018-06-25 17:03:52 +02:00
|
|
|
|
2018-06-29 17:24:44 +02:00
|
|
|
<!-- navigation -->
|
2018-07-26 16:40:34 +02:00
|
|
|
<mat-nav-list class='main-nav'>
|
2018-09-20 13:03:51 +02:00
|
|
|
<span *ngFor="let entry of mainMenuService.entries">
|
2018-10-11 14:03:44 +02:00
|
|
|
<a [@navItemAnim] *osPerms="entry.permission" mat-list-item (click)='toggleSideNav()'
|
2018-09-20 13:03:51 +02:00
|
|
|
[routerLink]='entry.route' routerLinkActive='active' [routerLinkActiveOptions]="{exact: true}">
|
2018-10-11 14:03:44 +02:00
|
|
|
<mat-icon>{{entry.icon}}</mat-icon>{{ entry.displayName | translate}}
|
2018-09-20 13:03:51 +02:00
|
|
|
</a>
|
|
|
|
</span>
|
2018-08-14 12:55:45 +02:00
|
|
|
<mat-divider></mat-divider>
|
2018-09-03 17:57:20 +02:00
|
|
|
<a [@navItemAnim] *osPerms="'core.can_see_projector'" mat-list-item routerLink='/projector' routerLinkActive='active' (click)='toggleSideNav()'>
|
2018-10-11 14:03:44 +02:00
|
|
|
<mat-icon>videocam</mat-icon>
|
2018-08-14 12:55:45 +02:00
|
|
|
<span translate>Projector</span>
|
|
|
|
</a>
|
2018-06-29 17:24:44 +02:00
|
|
|
</mat-nav-list>
|
|
|
|
</mat-sidenav>
|
2018-09-04 11:35:50 +02:00
|
|
|
<div class="content">
|
|
|
|
<header>
|
|
|
|
<!-- the first toolbar row is (still) a global element
|
|
|
|
the second one shall be handled by the apps -->
|
|
|
|
<mat-toolbar color='primary'>
|
2018-06-25 17:03:52 +02:00
|
|
|
|
2018-09-04 11:35:50 +02:00
|
|
|
<!-- show/hide menu button -->
|
|
|
|
<button mat-icon-button *ngIf="vp.isMobile" (click)='sideNav.toggle()'>
|
2018-10-11 14:03:44 +02:00
|
|
|
<mat-icon>menu</mat-icon>
|
2018-09-04 11:35:50 +02:00
|
|
|
</button>
|
2018-06-25 17:03:52 +02:00
|
|
|
|
2018-09-04 11:35:50 +02:00
|
|
|
<!-- glob search and generic menu on the right -->
|
|
|
|
<span class='spacer'></span>
|
|
|
|
<button mat-icon-button (click)='sideNav.toggle()'>
|
2018-10-11 14:03:44 +02:00
|
|
|
<mat-icon>search</mat-icon>
|
2018-09-04 11:35:50 +02:00
|
|
|
</button>
|
|
|
|
</mat-toolbar>
|
|
|
|
</header>
|
2018-06-29 17:24:44 +02:00
|
|
|
|
2018-09-04 11:35:50 +02:00
|
|
|
<div class="relax">
|
|
|
|
<main [@pageTransition]="o.isActivated ? o.activatedRoute : ''">
|
|
|
|
<router-outlet #o="outlet"></router-outlet>
|
|
|
|
</main>
|
|
|
|
<footer>
|
|
|
|
<os-footer></os-footer>
|
|
|
|
</footer>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-08-23 16:49:51 +02:00
|
|
|
</mat-sidenav-container>
|