openaire-library/dashboard/sharedComponents/sidebar/sideBar.component.html

41 lines
2.0 KiB
HTML

<aside id="sidebar_main">
<div *ngIf= "showHeader" class="sidebar_main_header">
<div *ngIf="headerDashboard || headerLogoUrl || headerName" class="uk-padding-small">
<img *ngIf="headerLogoUrl" [src]="headerLogoUrl">
<div class="uk-text-bold uk-margin-top">{{headerName}}</div>
<div>{{headerDashboard}}</div>
</div>
</div>
<div class="menu_section uk-margin-top">
<ul>
<ng-template ngFor [ngForOf]="items" let-item let-i="index">
<li [class.current_section]="isTheActiveMenuItem(item)"
[class.act_section]="item.open"
[title]="item.title"
[class.submenu_trigger]="item.items.length > 1">
<a *ngIf="item.items.length <= 1" [routerLink]="(item.route && !isTheActiveMenuItem(item))?item.route:null" [queryParams]=item.params>
<span *ngIf="item.icon" class="menu_icon"><i class="material-icons">{{item.icon}}</i></span>
<span class="menu_title">{{item.title}}</span>
</a>
<ng-template [ngIf]="item.items.length > 1">
<a (click)="item.open = !item.open">
<span *ngIf="item.icon" class="menu_icon"><i class="material-icons">{{item.icon}}</i></span>
<span class="menu_title">{{item.title}}</span>
</a>
<ul [style.display]="(item.open?'block':'none')">
<ng-template ngFor [ngForOf]="item.items" let-subItem let-j="index">
<li *ngIf="subItem.route" [class.act_item]="isTheActiveMenuItem(item, subItem)">
<a [routerLink]="!isTheActiveMenuItem(item, subItem)?subItem.route:null" [queryParams]=subItem.params>
<span *ngIf="subItem.icon" class="menu_icon"><i class="material-icons">{{subItem.icon}}</i></span>
<span class="menu_title">{{subItem.title}}</span>
</a>
</li>
</ng-template>
</ul>
</ng-template>
</li>
</ng-template>
</ul>
</div>
</aside>