2 <div class="border rounded m-1">
3 <div class="font-weight-bold header p-2 d-flex" i18n>
4 {{label}} <span *ngIf="hasChanged" class="text-danger">*</span>
5 <ng-container *ngIf="bulky()">
6 <div class="flex-1"></div>
7 <a href='javascript:;' (click)="expanded = true" *ngIf="!expanded">
8 <span class="material-icons">unfold_more</span>
10 <a href='javascript:;' (click)="expanded = false" *ngIf="expanded">
11 <span class="material-icons">unfold_less</span>
15 <div tabindex="0" class="p-2" *ngIf="!editing || multiValue()"
16 (click)="enterEditMode()" (keyup.enter)="enterEditMode()"
17 [ngClass]="{'has-changes': hasChanged, 'bg-warning': warnOnRequired()}">
19 *ngFor="let count of labelCounts | keyvalue; let idx = index">
20 <ng-container *ngIf="!expanded && !editing && idx === defaultDisplayCount">
21 <span class="text-info" i18n>...</span>
23 <ng-container *ngIf="expanded || editing || idx < defaultDisplayCount">
24 <ng-container *ngIf="editing">
25 <div class="ml-4 mr-2">
26 <input type="checkbox" class="form-check-input"
27 [(ngModel)]="editValues[count.key]"/>
31 <ng-container *ngIf="displayAs == 'bool'">
32 <ng-container *ngIf="valueIsUnset(count.key); else defaultBool">
33 <span i18n><Unset></span>
35 <ng-template #defaultBool>
36 <span *ngIf="count.key == 't'" i18n>Yes</span>
37 <span *ngIf="count.key == 'f'" i18n>No</span>
40 <ng-container *ngIf="displayAs == 'currency'">
42 *ngIf="valueIsUnset(count.key); else defaultCurrency">
43 <span i18n><Unset></span>
45 <ng-template #defaultCurrency>{{count.key | currency}}</ng-template>
47 <ng-container *ngIf="displayAs != 'bool' && displayAs != 'currency'">
49 *ngIf="valueIsUnset(count.key); else default">
50 <span i18n><Unset></span>
52 <ng-template #default>{{count.key}}</ng-template>
55 <div i18n>{{count.value}} copies</div>
59 <ng-container *ngIf="editing">
60 <ng-container *ngTemplateOutlet="editTemplate"></ng-container>
62 <button class="btn btn-outline-dark" (click)="save()" i18n>Apply</button>
63 <button class="btn btn-outline-dark ml-1" (click)="cancel()" i18n>Cancel</button>
64 <button class="btn btn-outline-dark ml-1" (click)="clear()" i18n>Clear</button>