|
|
|
@ -81,11 +81,12 @@ |
|
|
|
|
let-item="item" |
|
|
|
|
let-index="index" |
|
|
|
|
let-search="searchTerm" |
|
|
|
|
let-clear="clear" |
|
|
|
|
*ngIf="labelRequired" |
|
|
|
|
> |
|
|
|
|
<ng-container |
|
|
|
|
[ngTemplateOutlet]="labelTemplate ? labelTemplate : defaultLabel" |
|
|
|
|
[ngTemplateOutletContext]="{$implicit:item, search:search, index:index }" |
|
|
|
|
[ngTemplateOutlet]="labelTemplate || defaultLabel" |
|
|
|
|
[ngTemplateOutletContext]="{$implicit:item, search:search, index:index, clear:clear }" |
|
|
|
|
></ng-container> |
|
|
|
|
</ng-template> |
|
|
|
|
|
|
|
|
@ -179,14 +180,17 @@ |
|
|
|
|
</ng-container> |
|
|
|
|
</ng-template> |
|
|
|
|
|
|
|
|
|
<ng-template let-item let-search="search" #defaultLabel [ngSwitch]="resource"> |
|
|
|
|
<ng-container *ngSwitchCase="'work_packages'"> |
|
|
|
|
<ng-template let-item let-search="search" let-clear="clear" #defaultLabel> |
|
|
|
|
<ng-container *ngIf="resource === 'work_packages'"> |
|
|
|
|
<span [ngOptionHighlight]="search"> |
|
|
|
|
{{item.type?.name }} #{{ item.id }} {{ item.subject }} |
|
|
|
|
</span> |
|
|
|
|
</ng-container> |
|
|
|
|
|
|
|
|
|
<ng-container *ngSwitchDefault> |
|
|
|
|
<span [ngOptionHighlight]="search">{{ item.name }}</span> |
|
|
|
|
<ng-container *ngIf="resource !== 'work_packages'"> |
|
|
|
|
<span class="ng-value-icon left" (click)="clear(item)">×</span> |
|
|
|
|
<span |
|
|
|
|
[ngOptionHighlight]="search" |
|
|
|
|
class="ng-value-label">{{item.name}}</span> |
|
|
|
|
</ng-container> |
|
|
|
|
</ng-template> |