NAvigation bar: add header menu - (if route and url is empty )

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@53967 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2018-11-26 13:01:00 +00:00
parent 0f0f088755
commit c50dd54698
1 changed files with 5 additions and 2 deletions

View File

@ -43,10 +43,12 @@
<a *ngIf="menu.rootItem.route.length == 0 && menu.rootItem.url.length == 0" class="uk-offcanvas-close custom-offcanvas-close">{{menu.rootItem.title}}</a>
<ul class="uk-nav-sub">
<ng-container *ngFor="let submenu of menu.items">
<li *ngIf="isEnabled(submenu.entitiesRequired,showEntity) && isEnabled(submenu.routeRequired, showPage)">
<li *ngIf="isEnabled(submenu.entitiesRequired,showEntity) && isEnabled(submenu.routeRequired, showPage) && (submenu.route.length > 0 || submenu.url.length > 0)">
<a *ngIf="submenu.route.length > 0" routerLinkActive="uk-link" routerLink="{{submenu.route}}" [queryParams]=submenu.params class="uk-offcanvas-close custom-offcanvas-close">{{submenu.title}}</a>
<a *ngIf="submenu.route.length == 0 && submenu.url.length > 0"routerLinkActive="uk-link" href="{{submenu.url}}" target="_blank" class="uk-offcanvas-close custom-offcanvas-close">{{submenu.title}}</a>
</li>
<li *ngIf="submenu.route.length == 0 && submenu.url.length == 0 && isEnabled(submenu.entitiesRequired,showEntity) && isEnabled(submenu.routeRequired, showPage)" class="uk-nav-header">{{submenu.title}}</li>
</ng-container>
</ul>
@ -125,10 +127,11 @@
<div class="uk-first-column">
<ul class="uk-nav uk-navbar-dropdown-nav">
<ng-container *ngFor="let submenu of menu.items">
<li *ngIf="isEnabled(submenu.entitiesRequired,showEntity) && isEnabled(submenu.routeRequired, showPage)">
<li *ngIf="isEnabled(submenu.entitiesRequired,showEntity) && isEnabled(submenu.routeRequired, showPage) && (submenu.route.length > 0 || submenu.url.length > 0)">
<a *ngIf="submenu.route.length > 0" routerLinkActive="uk-link" routerLink="{{submenu.route}}" [queryParams]=submenu.params >{{submenu.title}}</a>
<a *ngIf="submenu.route.length == 0 && submenu.url.length > 0" routerLinkActive="uk-link" href="{{submenu.url}}" target="_blank">{{submenu.title}}</a>
</li>
<li *ngIf="submenu.route.length == 0 && submenu.url.length == 0 && isEnabled(submenu.entitiesRequired,showEntity) && isEnabled(submenu.routeRequired, showPage)" class="uk-nav-header">{{submenu.title}}</li>
</ng-container>
</ul>
</div>