/
resource-list.component.html
32 lines (32 loc) · 1.7 KB
/
resource-list.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
<!-- When withMultipleSelection is false and user can select only one resource at a time to view -->
<mat-list class="resource-list">
<div class="link"
[class.selected-resource]="selectedResourceIdx.indexOf(i) > -1"
[class.border-bottom]="!last"
*ngFor="let resource of resources.resources; let i = index; let last = last">
<mat-list-item>
<mat-icon matListIcon>image_search</mat-icon>
<div matLine (click)="selectResource({ checked: true, resIndex: i, resId: resource.id, resLabel: resource.label, isCheckbox: false })">
<p matLine class="res-class-label">
{{ resource.entityInfo.classes[resource.type].label }}
</p>
<h3 matLine class="res-class-value">{{ resource.label }}</h3>
<div matLine *ngFor="let prop of resource.properties | keyvalue">
<div matLine *ngFor="let val of prop.value">
<span class="res-prop-label">
{{ resource.entityInfo.properties[val.property].label }}
</span>
<div class="res-prop-value shorten-long-text" [innerHtml]="val.strval"></div>
</div>
</div>
</div>
<!-- if withMultipleSelection is true, we display checkbox -->
<mat-checkbox #ckbox
*ngIf="withMultipleSelection"
id="{{ i }}"
(change)="selectResource({ checked: $event.checked, resIndex: i, resId: resource.id, resLabel: resource.label, isCheckbox: true })"
class="res-checkbox">
</mat-checkbox>
</mat-list-item>
</div>
</mat-list>