/
select-properties.component.html
53 lines (52 loc) · 2.58 KB
/
select-properties.component.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<div class="properties-container">
<div class="properties">
<div *ngFor="let prop of properties; let last = last;" [class.border-bottom]="!last">
<div class="property" *ngIf="!prop.isLinkProperty || prop">
<div class="property-label">
<span>
<h3 class="label mat-subheading-1"
[class.label-info]="prop.comment"
[matTooltip]="prop.comment"
matTooltipPosition="above">
{{prop.label}}
</h3>
</span>
<span *ngIf="propertyValuesKeyValuePair[prop.id + '-cardinality'][0] === 1" class="propIsRequired">
*
</span>
</div>
<div class="property-value large-field">
<div *ngFor="let val of propertyValuesKeyValuePair[prop.id]; let i=index">
<div *ngIf="val !== undefined">
<div class="value">
<app-switch-properties
#switchProp
[property]="prop"
[parentResource]="parentResource"
[parentForm]="parentForm"
[formName]="prop.label + '_' + i"
[isRequiredProp]="propertyValuesKeyValuePair[prop.id + '-cardinality']">
</app-switch-properties>
</div>
<div class="buttons">
<button *ngIf="propertyValuesKeyValuePair[prop.id + '-filtered'].length !== 1"
type="button"
title="Delete this value"
(click)="deleteValue(prop, i)"
class="delete">
<mat-icon>delete</mat-icon>
</button>
</div>
</div>
</div>
<!-- Add button -->
<div *ngIf="addValueIsAllowed(prop)">
<button type="button" class="create" (click)="addNewValueFormToProperty(prop)" title="Add a new value">
<mat-icon>add_box</mat-icon>
</button>
</div>
</div>
</div>
</div>
</div>
</div>