-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.hbs
77 lines (77 loc) · 2.39 KB
/
index.hbs
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{{! @glint-nocheck: not typesafe yet }}
<AuContent @skin='tiny'>
<AuToolbar as |Group|>
<Group>
<AuHeading @level='5' @skin='5'>Properties</AuHeading>
</Group>
<Group>
<AuButton
@icon={{this.PlusIcon}}
@skin='naked'
{{on 'click' this.startPropertyCreation}}
>
Add property
</AuButton>
</Group>
</AuToolbar>
{{#if this.hasAttributeProperties}}
<AuList @divider={{true}} as |Item|>
{{#each this.properties as |prop index|}}
{{#if (this.isPlainTriple prop)}}
<Item
class='au-u-flex au-u-flex--row au-u-flex--between au-u-flex--vertical-center'
>
<div class='au-u-padding-tiny'>
<p><strong>predicate:</strong> {{prop.predicate}}</p>
{{#if prop.object.datatype}}
<p><strong>datatype:</strong> {{prop.object.datatype.value}}</p>
{{/if}}
{{#if prop.object.language}}
<p><strong>language:</strong> {{prop.object.language}}</p>
{{/if}}
{{#if (eq prop.object.termType 'ContentLiteral')}}
<AuPill>content-predicate</AuPill>
{{else}}
<p><strong>value:</strong> {{prop.object.value}}</p>
{{/if}}
</div>
<AuDropdown @icon={{this.ThreeDotsIcon}} role='menu' @alignment='left'>
<AuButton
@skin='link'
@icon={{this.PencilIcon}}
role='menuitem'
{{on 'click' (fn this.startPropertyUpdate index)}}
>
Edit property
</AuButton>
<AuButton
@skin='link'
@icon={{this.BinIcon}}
role='menuitem'
class='au-c-button--alert'
{{on 'click' (fn this.removeProperty index)}}
>
Remove property
</AuButton>
</AuDropdown>
</Item>
{{/if}}
{{/each}}
</AuList>
{{else}}
<p>This node doesn't have any properties yet.</p>
{{/if}}
</AuContent>
{{! Creation modal }}
<this.Modal
@modalOpen={{this.isCreating}}
@onSave={{this.addProperty}}
@onCancel={{this.cancel}}
/>
{{! Update modal }}
<this.Modal
@modalOpen={{this.isUpdating}}
@onSave={{this.updateProperty}}
@onCancel={{this.cancel}}
@property={{this.status.property}}
/>