mirror of https://github.com/abpframework/abp.git
committed by
GitHub
16 changed files with 152 additions and 142 deletions
@ -1,18 +1,16 @@ |
|||||
<ul class="navbar-nav"> |
<ul class="navbar-nav"> |
||||
<ng-container *ngFor="let item of navItems.items$ | async; trackBy: trackByFn"> |
<ng-container *ngFor="let item of navItems.items$ | async; trackBy: trackByFn"> |
||||
<li |
<ng-container *ngIf="item.visible()"> |
||||
class="nav-item d-flex align-items-center" |
<li class="nav-item d-flex align-items-center" *abpPermission="item.requiredPolicy"> |
||||
*ngIf="item.visible()" |
<ng-container |
||||
[abpPermission]="item.requiredPolicy" |
*ngIf="item.component; else htmlTemplate" |
||||
> |
[ngComponentOutlet]="item.component" |
||||
<ng-container |
></ng-container> |
||||
*ngIf="item.component; else htmlTemplate" |
|
||||
[ngComponentOutlet]="item.component" |
|
||||
></ng-container> |
|
||||
|
|
||||
<ng-template #htmlTemplate> |
<ng-template #htmlTemplate> |
||||
<div [innerHTML]="item.html" (click)="item.action ? item.action() : null"></div> |
<div [innerHTML]="item.html" (click)="item.action ? item.action() : null"></div> |
||||
</ng-template> |
</ng-template> |
||||
</li> |
</li> |
||||
|
</ng-container> |
||||
</ng-container> |
</ng-container> |
||||
</ul> |
</ul> |
||||
|
|||||
@ -1,18 +1,20 @@ |
|||||
<div class="row justify-content-end mx-n1" id="AbpContentToolbar"> |
<div class="row justify-content-end mx-n1" id="AbpContentToolbar"> |
||||
<div class="col-auto px-1 pt-2" *ngFor="let action of actionList; trackBy: trackByFn"> |
<div class="col-auto px-1 pt-2" *ngFor="let action of actionList; trackBy: trackByFn"> |
||||
<ng-container *ngIf="action.visible(data)" [abpPermission]="action.permission"> |
<ng-container *ngIf="action.visible(data)"> |
||||
<ng-container *ngIf="action.component as component; else button"> |
<ng-container *abpPermission="action.permission"> |
||||
<ng-container |
<ng-container *ngIf="action.component as component; else button"> |
||||
*ngComponentOutlet="component; injector: createInjector(action)" |
<ng-container |
||||
></ng-container> |
*ngComponentOutlet="component; injector: createInjector(action)" |
||||
</ng-container> |
></ng-container> |
||||
|
</ng-container> |
||||
|
|
||||
<ng-template #button> |
<ng-template #button> |
||||
<button (click)="action.action(data)" type="button" class="btn btn-primary btn-sm"> |
<button (click)="action.action(data)" type="button" class="btn btn-primary btn-sm"> |
||||
<i [ngClass]="action.icon" [class.mr-1]="action.icon"></i> |
<i [ngClass]="action.icon" [class.mr-1]="action.icon"></i> |
||||
{{ action.text | abpLocalization }} |
{{ action.text | abpLocalization }} |
||||
</button> |
</button> |
||||
</ng-template> |
</ng-template> |
||||
|
</ng-container> |
||||
</ng-container> |
</ng-container> |
||||
</div> |
</div> |
||||
</div> |
</div> |
||||
|
|||||
Loading…
Reference in new issue