WIP: Permissions
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
<ng-container>
|
||||
|
||||
<div *ngIf="root && item.visible !== false" class="layout-menuitem-root-text">{{ item.label }}</div>
|
||||
|
||||
<a *ngIf="(!item.routerLink || item.items) && item.visible !== false" [attr.href]="item.url"
|
||||
@@ -16,7 +15,7 @@
|
||||
<a *ngIf="(item.routerLink && !item.items) && item.visible !== false" (click)="itemClick($event)"
|
||||
[ngClass]="item.class"
|
||||
[routerLink]="item.routerLink" routerLinkActive="active-route"
|
||||
[routerLinkActiveOptions]="item.routerLinkActiveOptions||{ paths: 'exact', queryParams: 'ignored', matrixParams: 'ignored', fragment: 'ignored' }"
|
||||
[routerLinkActiveOptions]="item.routerLinkActiveOptions || { paths: 'exact', queryParams: 'ignored', matrixParams: 'ignored', fragment: 'ignored' }"
|
||||
[fragment]="item.fragment" [queryParamsHandling]="item.queryParamsHandling"
|
||||
[preserveFragment]="item.preserveFragment"
|
||||
[skipLocationChange]="item.skipLocationChange" [replaceUrl]="item.replaceUrl" [state]="item.state"
|
||||
@@ -29,7 +28,7 @@
|
||||
<i class="pi pi-fw pi-angle-down layout-submenu-toggler" *ngIf="item.items"></i>
|
||||
</a>
|
||||
<span *ngIf="(item.routerLink && !item.items) && item.visible !== false">
|
||||
<ng-container *ngIf="item.type === 'Library' || item.type === 'Shelf'">
|
||||
<ng-container *ngIf="(item.type === 'Library' || item.type === 'Shelf') && canManipulateLibrary">
|
||||
<p-button
|
||||
(click)="entitymenu.toggle($event)"
|
||||
(mouseover)="hovered = true"
|
||||
@@ -46,9 +45,14 @@
|
||||
<p-menu #entitymenu [model]="item.menu" [popup]="true" appendTo="body"></p-menu>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="item.type === 'Library' && !canManipulateLibrary">
|
||||
<p class="text-[var(--primary-color)] pr-1">
|
||||
{{ (item.bookCount$ | async)?.toString() || '0' }}
|
||||
</p>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="item.type === 'All Books'">
|
||||
<p
|
||||
class="text-[var(--primary-color)] pr-1">
|
||||
<p class="text-[var(--primary-color)] pr-1">
|
||||
{{ (item.bookCount$ | async)?.toString() || '0' }}
|
||||
</p>
|
||||
</ng-container>
|
||||
|
||||
Reference in New Issue
Block a user