|
|
@ -5,113 +5,124 @@ |
|
|
|
|
|
|
|
|
<ng-template #abpBody> |
|
|
<ng-template #abpBody> |
|
|
<div class="row"> |
|
|
<div class="row"> |
|
|
<div class="col-md-4"> |
|
|
<ng-container *ngIf="groups.length"> |
|
|
<ul |
|
|
<div class="col-md-4"> |
|
|
ngbNav |
|
|
<ul |
|
|
#nav="ngbNav" |
|
|
ngbNav |
|
|
[(activeId)]="selectedGroupDisplayName" |
|
|
#nav="ngbNav" |
|
|
class="nav-pills" |
|
|
[(activeId)]="selectedGroupDisplayName" |
|
|
orientation="vertical" |
|
|
class="nav-pills" |
|
|
> |
|
|
orientation="vertical" |
|
|
<li |
|
|
|
|
|
*ngFor="let group of groups; trackBy: track.by('name')" |
|
|
|
|
|
[ngbNavItem]="group.displayName" |
|
|
|
|
|
> |
|
|
> |
|
|
<a ngbNavLink>{{ group.displayName }}</a> |
|
|
<li |
|
|
<ng-template ngbNavContent> |
|
|
*ngFor="let group of groups; trackBy: track.by('name')" |
|
|
<h4>{{ selectedGroupDisplayName }}</h4> |
|
|
[ngbNavItem]="group.displayName" |
|
|
<hr class="mt-2 mb-3" /> |
|
|
> |
|
|
|
|
|
<a ngbNavLink>{{ group.displayName }}</a> |
|
|
|
|
|
<ng-template ngbNavContent> |
|
|
|
|
|
<h4>{{ selectedGroupDisplayName }}</h4> |
|
|
|
|
|
<hr class="mt-2 mb-3" /> |
|
|
|
|
|
|
|
|
<div |
|
|
<div |
|
|
class="mt-2" |
|
|
class="mt-2" |
|
|
*ngFor="let feature of features[group.name]; let i = index; trackBy: track.by('id')" |
|
|
*ngFor=" |
|
|
[ngStyle]="feature.style" |
|
|
let feature of features[group.name]; |
|
|
[ngSwitch]="feature.valueType?.name" |
|
|
let i = index; |
|
|
(keyup.enter)="save()" |
|
|
trackBy: track.by('id') |
|
|
> |
|
|
" |
|
|
<ng-container *ngSwitchCase="valueTypes.ToggleStringValueType"> |
|
|
[ngStyle]="feature.style" |
|
|
<div class="form-check"> |
|
|
[ngSwitch]="feature.valueType?.name" |
|
|
<input |
|
|
(keyup.enter)="save()" |
|
|
class="form-check-input" |
|
|
> |
|
|
type="checkbox" |
|
|
<ng-container *ngSwitchCase="valueTypes.ToggleStringValueType"> |
|
|
[id]="feature.name" |
|
|
<div class="form-check"> |
|
|
[(ngModel)]="feature.value" |
|
|
<input |
|
|
(ngModelChange)="onCheckboxClick($event, feature)" |
|
|
class="form-check-input" |
|
|
/> |
|
|
type="checkbox" |
|
|
|
|
|
[id]="feature.name" |
|
|
|
|
|
[(ngModel)]="feature.value" |
|
|
|
|
|
(ngModelChange)="onCheckboxClick($event, feature)" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
<label class="form-check-label" [htmlFor]="feature.name">{{ |
|
|
<label class="form-check-label" [htmlFor]="feature.name">{{ |
|
|
feature.displayName |
|
|
feature.displayName |
|
|
}}</label> |
|
|
}}</label> |
|
|
<ng-container |
|
|
<ng-container |
|
|
*ngTemplateOutlet="descTmp; context: { $implicit: feature.description }" |
|
|
*ngTemplateOutlet="descTmp; context: { $implicit: feature.description }" |
|
|
></ng-container> |
|
|
></ng-container> |
|
|
</div> |
|
|
</div> |
|
|
</ng-container> |
|
|
</ng-container> |
|
|
<ng-container *ngSwitchCase="valueTypes.FreeTextStringValueType"> |
|
|
<ng-container *ngSwitchCase="valueTypes.FreeTextStringValueType"> |
|
|
<div class="mb-3 form-group"> |
|
|
|
|
|
<label [htmlFor]="feature.name" class="form-label">{{ |
|
|
|
|
|
feature.displayName |
|
|
|
|
|
}}</label> |
|
|
|
|
|
<input |
|
|
|
|
|
class="form-control" |
|
|
|
|
|
type="text" |
|
|
|
|
|
[id]="feature.name" |
|
|
|
|
|
[(ngModel)]="feature.value" |
|
|
|
|
|
[abpFeatureManagementFreeText]="feature" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
<ng-container |
|
|
|
|
|
*ngTemplateOutlet="descTmp; context: { $implicit: feature.description }" |
|
|
|
|
|
></ng-container> |
|
|
|
|
|
</div> |
|
|
|
|
|
</ng-container> |
|
|
|
|
|
<ng-container *ngSwitchCase="valueTypes.SelectionStringValueType"> |
|
|
|
|
|
<ng-container *ngIf="feature.valueType.itemSource?.items?.length"> |
|
|
|
|
|
<div class="mb-3 form-group"> |
|
|
<div class="mb-3 form-group"> |
|
|
<label [htmlFor]="feature.name" class="form-label">{{ |
|
|
<label [htmlFor]="feature.name" class="form-label">{{ |
|
|
feature.displayName |
|
|
feature.displayName |
|
|
}}</label> |
|
|
}}</label> |
|
|
<select class="form-select" [id]="feature.name" [(ngModel)]="feature.value"> |
|
|
<input |
|
|
<option |
|
|
class="form-control" |
|
|
*ngFor=" |
|
|
type="text" |
|
|
let item of feature.valueType.itemSource?.items; |
|
|
[id]="feature.name" |
|
|
trackBy: track.by('value') |
|
|
[(ngModel)]="feature.value" |
|
|
" |
|
|
[abpFeatureManagementFreeText]="feature" |
|
|
[ngValue]="item.value" |
|
|
/> |
|
|
> |
|
|
|
|
|
{{ |
|
|
|
|
|
item.displayText?.resourceName + '::' + item.displayText?.name |
|
|
|
|
|
| abpLocalization |
|
|
|
|
|
}} |
|
|
|
|
|
</option> |
|
|
|
|
|
</select> |
|
|
|
|
|
<ng-container |
|
|
<ng-container |
|
|
*ngTemplateOutlet="descTmp; context: { $implicit: feature.description }" |
|
|
*ngTemplateOutlet="descTmp; context: { $implicit: feature.description }" |
|
|
></ng-container> |
|
|
></ng-container> |
|
|
</div> |
|
|
</div> |
|
|
</ng-container> |
|
|
</ng-container> |
|
|
</ng-container> |
|
|
<ng-container *ngSwitchCase="valueTypes.SelectionStringValueType"> |
|
|
<ng-container *ngSwitchDefault>{{ feature.displayName }}</ng-container> |
|
|
<ng-container *ngIf="feature.valueType.itemSource?.items?.length"> |
|
|
</div> |
|
|
<div class="mb-3 form-group"> |
|
|
</ng-template> |
|
|
<label [htmlFor]="feature.name" class="form-label">{{ |
|
|
</li> |
|
|
feature.displayName |
|
|
</ul> |
|
|
}}</label> |
|
|
</div> |
|
|
<select class="form-select" [id]="feature.name" [(ngModel)]="feature.value"> |
|
|
|
|
|
<option |
|
|
|
|
|
*ngFor=" |
|
|
|
|
|
let item of feature.valueType.itemSource?.items; |
|
|
|
|
|
trackBy: track.by('value') |
|
|
|
|
|
" |
|
|
|
|
|
[ngValue]="item.value" |
|
|
|
|
|
> |
|
|
|
|
|
{{ |
|
|
|
|
|
item.displayText?.resourceName + '::' + item.displayText?.name |
|
|
|
|
|
| abpLocalization |
|
|
|
|
|
}} |
|
|
|
|
|
</option> |
|
|
|
|
|
</select> |
|
|
|
|
|
<ng-container |
|
|
|
|
|
*ngTemplateOutlet="descTmp; context: { $implicit: feature.description }" |
|
|
|
|
|
></ng-container> |
|
|
|
|
|
</div> |
|
|
|
|
|
</ng-container> |
|
|
|
|
|
</ng-container> |
|
|
|
|
|
<ng-container *ngSwitchDefault>{{ feature.displayName }}</ng-container> |
|
|
|
|
|
</div> |
|
|
|
|
|
</ng-template> |
|
|
|
|
|
</li> |
|
|
|
|
|
</ul> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
<ng-template #descTmp let-description> |
|
|
<ng-template #descTmp let-description> |
|
|
<small *ngIf="description" class="d-block form-text text-muted">{{ description }}</small> |
|
|
<small *ngIf="description" class="d-block form-text text-muted">{{ description }}</small> |
|
|
</ng-template> |
|
|
</ng-template> |
|
|
|
|
|
|
|
|
<div class="col-md-8"><div [ngbNavOutlet]="nav"></div></div> |
|
|
<div class="col-md-8"><div [ngbNavOutlet]="nav"></div></div> |
|
|
|
|
|
</ng-container> |
|
|
|
|
|
|
|
|
<div class="mx-3" *ngIf="!groups.length"> |
|
|
<div class="col" *ngIf="!groups.length"> |
|
|
{{ 'AbpFeatureManagement::NoFeatureFoundMessage' | abpLocalization }} |
|
|
{{ 'AbpFeatureManagement::NoFeatureFoundMessage' | abpLocalization }} |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</ng-template> |
|
|
</ng-template> |
|
|
|
|
|
|
|
|
<ng-template #abpFooter> |
|
|
<ng-template #abpFooter> |
|
|
<abp-button iconClass="fa fa-refresh" [disabled]="modalBusy" (click)="resetToDefault()"> |
|
|
<abp-button |
|
|
|
|
|
*ngIf="groups.length" |
|
|
|
|
|
iconClass="fa fa-refresh" |
|
|
|
|
|
[disabled]="modalBusy" |
|
|
|
|
|
(click)="resetToDefault()" |
|
|
|
|
|
> |
|
|
{{ 'AbpFeatureManagement::ResetToDefault' | abpLocalization }} |
|
|
{{ 'AbpFeatureManagement::ResetToDefault' | abpLocalization }} |
|
|
</abp-button> |
|
|
</abp-button> |
|
|
|
|
|
|
|
|
|