mirror of https://github.com/abpframework/abp.git
committed by
GitHub
17 changed files with 192 additions and 158 deletions
@ -1,31 +1,29 @@ |
|||
<div class="row justify-content-end mx-0 gap-2" id="AbpContentToolbar"> |
|||
<div |
|||
class="col-auto px-0 pt-0 " |
|||
[class.pe-0]="last" |
|||
*ngFor="let action of actionList; trackBy: trackByFn; let last = last" |
|||
> |
|||
<ng-container *ngIf="action.visible(data)"> |
|||
<ng-container *abpPermission="action.permission;runChangeDetection: false"> |
|||
<ng-container *ngIf="action.component as component; else button"> |
|||
<ng-container |
|||
*ngComponentOutlet="component; injector: record | createInjector: action:this" |
|||
></ng-container> |
|||
</ng-container> |
|||
@for (action of actionList; track action.component || action.action; let last = $last) { |
|||
<div class="col-auto px-0 pt-0" [class.pe-0]="last"> |
|||
@if (action.visible(data)) { |
|||
<ng-container *abpPermission="action.permission; runChangeDetection: false"> |
|||
@if (action.component; as component) { |
|||
<ng-container |
|||
*ngComponentOutlet="component; injector: record | createInjector: action:this" |
|||
></ng-container> |
|||
|
|||
<ng-template #button> |
|||
<ng-container *ngIf="asToolbarAction(action).value as toolbarAction"> |
|||
<button |
|||
(click)="action.action(data)" |
|||
type="button" |
|||
[ngClass]="toolbarAction.btnClass ? toolbarAction.btnClass : defaultBtnClass" |
|||
class="d-inline-flex align-items-center gap-1" |
|||
> |
|||
<i [ngClass]="toolbarAction.icon" [class.me-1]="toolbarAction.icon"></i> |
|||
{{ toolbarAction.text | abpLocalization }} |
|||
</button> |
|||
</ng-container> |
|||
</ng-template> |
|||
</ng-container> |
|||
}@else { |
|||
@if (asToolbarAction(action).value; as toolbarAction ) { |
|||
<button |
|||
(click)="action.action(data)" |
|||
type="button" |
|||
[ngClass]="toolbarAction?.btnClass ? toolbarAction?.btnClass : defaultBtnClass" |
|||
class="d-inline-flex align-items-center gap-1" |
|||
> |
|||
<i [ngClass]="toolbarAction?.icon" [class.me-1]="toolbarAction?.icon"></i> |
|||
{{ toolbarAction?.text | abpLocalization }} |
|||
</button> |
|||
} |
|||
} |
|||
</ng-container> |
|||
} |
|||
</div> |
|||
} |
|||
</div> |
|||
|
|||
|
|||
Loading…
Reference in new issue