|
|
@ -1,42 +1,46 @@ |
|
|
@if (actionList.length > 1) { |
|
|
@if (hasAvailableActions()) { |
|
|
<div ngbDropdown container="body" class="d-inline-block"> |
|
|
@if (actionList.length > 1) { |
|
|
<button |
|
|
<div ngbDropdown container="body" class="d-inline-block"> |
|
|
class="btn btn-primary btn-sm dropdown-toggle" |
|
|
<button |
|
|
data-toggle="dropdown" |
|
|
class="btn btn-primary btn-sm dropdown-toggle" |
|
|
aria-haspopup="true" |
|
|
data-toggle="dropdown" |
|
|
ngbDropdownToggle |
|
|
aria-haspopup="true" |
|
|
> |
|
|
ngbDropdownToggle |
|
|
<i [ngClass]="icon" [class.me-1]="icon"></i>{{ text | abpLocalization }} |
|
|
|
|
|
</button> |
|
|
|
|
|
<div ngbDropdownMenu> |
|
|
|
|
|
@for (action of actionList; track action.text) { |
|
|
|
|
|
<ng-container |
|
|
|
|
|
[ngTemplateOutlet]="dropDownBtnItemTmp" |
|
|
|
|
|
[ngTemplateOutletContext]="{ $implicit: action }" |
|
|
|
|
|
> |
|
|
> |
|
|
</ng-container> |
|
|
<i [ngClass]="icon" [class.me-1]="icon"></i>{{ text | abpLocalization }} |
|
|
} |
|
|
</button> |
|
|
</div> |
|
|
<div ngbDropdownMenu> |
|
|
</div> |
|
|
@for (action of actionList; track action.text) { |
|
|
} @if (actionList.length === 1) { |
|
|
<ng-container |
|
|
<ng-container |
|
|
[ngTemplateOutlet]="dropDownBtnItemTmp" |
|
|
[ngTemplateOutlet]="btnTmp" |
|
|
[ngTemplateOutletContext]="{ $implicit: action }" |
|
|
[ngTemplateOutletContext]="{ $implicit: actionList.get(0).value }" |
|
|
> |
|
|
></ng-container> |
|
|
</ng-container> |
|
|
|
|
|
} |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@if (actionList.length === 1) { |
|
|
|
|
|
<ng-container |
|
|
|
|
|
[ngTemplateOutlet]="btnTmp" |
|
|
|
|
|
[ngTemplateOutletContext]="{ $implicit: actionList.get(0).value }" |
|
|
|
|
|
></ng-container> |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
<ng-template #dropDownBtnItemTmp let-action> |
|
|
<ng-template #dropDownBtnItemTmp let-action> |
|
|
@if (action.visible(data)) { |
|
|
@if (action.visible(data)) { |
|
|
<button |
|
|
<button |
|
|
ngbDropdownItem |
|
|
ngbDropdownItem |
|
|
*abpPermission="action.permission; runChangeDetection: false" |
|
|
*abpPermission="action.permission; runChangeDetection: false" |
|
|
(click)="action.action(data)" |
|
|
(click)="action.action(data)" |
|
|
type="button" |
|
|
type="button" |
|
|
> |
|
|
> |
|
|
<ng-container |
|
|
<ng-container |
|
|
*ngTemplateOutlet="buttonContentTmp; context: { $implicit: action }" |
|
|
*ngTemplateOutlet="buttonContentTmp; context: { $implicit: action }" |
|
|
></ng-container> |
|
|
></ng-container> |
|
|
</button> |
|
|
</button> |
|
|
} |
|
|
} |
|
|
</ng-template> |
|
|
</ng-template> |
|
|
|
|
|
|
|
|
@ -60,7 +64,9 @@ |
|
|
type="button" |
|
|
type="button" |
|
|
[class]="action.btnClass" |
|
|
[class]="action.btnClass" |
|
|
[style]="action.btnStyle" |
|
|
[style]="action.btnStyle" |
|
|
[ngbTooltip]="action.tooltip.text | abpLocalization" [placement]="action.tooltip.placement || 'auto'" container="body" |
|
|
[ngbTooltip]="action.tooltip.text | abpLocalization" |
|
|
|
|
|
[placement]="action.tooltip.placement || 'auto'" |
|
|
|
|
|
container="body" |
|
|
> |
|
|
> |
|
|
<ng-container |
|
|
<ng-container |
|
|
*ngTemplateOutlet="buttonContentTmp; context: { $implicit: action }" |
|
|
*ngTemplateOutlet="buttonContentTmp; context: { $implicit: action }" |
|
|
|