[angular-18]: Add condition to hide templates in portals with type != community in super admin options

This commit is contained in:
Konstantinos Triantafyllou 2024-09-26 13:56:11 +03:00
parent e543d1f0f7
commit 9c93a1e306
1 changed files with 15 additions and 10 deletions

View File

@ -6,16 +6,21 @@ import {ActivatedRoute} from "@angular/router";
@Component({
selector: 'admin-tabs',
template: `
<ul class="uk-tab uk-margin-remove-bottom uk-margin-medium-top uk-flex uk-flex-center uk-flex-left@m" uk-tab>
<li *ngIf="isPortalAdmin && !portal" [class.uk-active]="tab === 'portal'"><a routerLink="../portals">Portals</a></li>
<li [class.uk-active]="tab === 'page'"><a routerLink="../pages">Pages</a></li>
<li [class.uk-active]="tab === 'entity'"><a routerLink="../entities">Entities</a></li>
<li *ngIf="portal && type === 'community'" [class.uk-active]="tab === 'menu'"><a routerLink="../menu">Menus</a></li>
<li *ngIf="isPortalAdmin && !portal" [class.uk-active]="tab === 'class'"><a routerLink="../classes">Classes</a></li>
<li *ngIf="isPortalAdmin && !portal" [class.uk-active]="tab === 'template'"><a routerLink="../templates">Templates</a></li>
<li *ngIf="isPortalAdmin && portal=='connect'" [class.uk-active]="tab === 'customization'"><a routerLink="../customization">Customization</a></li>
</ul>
template: `
<ul class="uk-tab uk-margin-remove-bottom uk-margin-medium-top uk-flex uk-flex-center uk-flex-left@m" uk-tab>
<li *ngIf="isPortalAdmin && !portal" [class.uk-active]="tab === 'portal'"><a
routerLink="../portals">Portals</a></li>
<li [class.uk-active]="tab === 'page'"><a routerLink="../pages">Pages</a></li>
<li [class.uk-active]="tab === 'entity'"><a routerLink="../entities">Entities</a></li>
<li *ngIf="portal && type === 'community'" [class.uk-active]="tab === 'menu'"><a
routerLink="../menu">Menus</a></li>
<li *ngIf="isPortalAdmin && !portal" [class.uk-active]="tab === 'class'"><a
routerLink="../classes">Classes</a></li>
<li *ngIf="isPortalAdmin && !portal && type === 'community'" [class.uk-active]="tab === 'template'"><a routerLink="../templates">Templates</a>
</li>
<li *ngIf="isPortalAdmin && portal=='connect'" [class.uk-active]="tab === 'customization'"><a
routerLink="../customization">Customization</a></li>
</ul>
`
})
export class AdminTabsComponent implements OnInit {