/
NodeProperty.fusion
25 lines (23 loc) · 990 Bytes
/
NodeProperty.fusion
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
prototype(Neos.Neos:RawContent.NodeProperty) < prototype(Neos.Fusion:Component) {
propertyName = ''
propertyConfiguration = null
propertyNameParts = ${String.split(this.name, ':')}
renderer = afx`
<Neos.Fusion:Fragment @if.isInlineEditable={propertyConfiguration.ui.inlineEditable == true} class="property">
<dt>
<Neos.Neos:RawContent.NodePropertyName name={propertyConfiguration.ui.label || propertyName}/>
</dt>
<dd>
<Neos.Neos:Editable property={propertyName}/>
</dd>
</Neos.Fusion:Fragment>
<Neos.Fusion:Fragment @if.isImage={propertyConfiguration.type == 'Neos\Media\Domain\Model\ImageInterface' && q(node).property(propertyName)}>
<dt>
<Neos.Neos:RawContent.NodePropertyName name={propertyConfiguration.ui.label || propertyName}/>
</dt>
<dd>
<Neos.Neos:ImageTag asset={q(node).property(propertyName)} preset="Neos.Media.Browser:Thumbnail" />
</dd>
</Neos.Fusion:Fragment>
`
}