Skip to content

Commit

Permalink
Merge pull request #2 from ronjastoeppel/feat/rs-title
Browse files Browse the repository at this point in the history
feat: Ermögliche das Setzen eines Titles für die Nodetypes
  • Loading branch information
gerdemann authored Feb 7, 2023
2 parents f5276a9 + 1fc62f8 commit c668182
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Configuration/NodeTypes.Content.Hotspot.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'Gerdemann.ImageHotspots:Content.Hotspot':
label: "${String.trim(String.htmlSpecialChars(String.pregReplace(!String.isBlank(q(node).property('title')) ? q(node).property('title') + ' (' + (I18n.translate(node.nodeType.label) || node.nodeType.name) + ')' : (I18n.translate(node.nodeType.label) || node.nodeType.name), '/\\x{00a0}|[[^:print:]]|\\s+/u', ' ')))}"
superTypes:
'Neos.Neos:Content': true
'Gerdemann.ImageHotspots:Mixin.HotspotContent': true
Expand Down Expand Up @@ -26,7 +27,21 @@
tab: 'general'
icon: 'icon-camera'
position: 20
creationDialog:
elements:
title:
type: string
ui:
label: i18n
editor: 'Neos.Neos/Inspector/Editors/TextFieldEditor'
properties:
title:
type: string
defaultValue: ''
ui:
label: i18n
inspector:
group: 'position'
top:
type: string
defaultValue: 50
Expand Down
10 changes: 10 additions & 0 deletions Resources/Private/Translations/de/NodeTypes/Content/Hotspot.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,17 @@
<target xml:lang="de">Icon</target>
</trans-unit>

<!-- CreationDialog -->
<trans-unit id="creationDialog.title" xml:space="preserve" approved="yes">
<source>Title (in Neos Backend)</source>
<target xml:lang="de">Titel (im Neos Backend)</target>
</trans-unit>

<!-- properties -->
<trans-unit id="properties.title" xml:space="preserve" approved="yes">
<source>Title</source>
<target xml:lang="de">Titel</target>
</trans-unit>
<trans-unit id="properties.top" xml:space="preserve" approved="yes">
<source>From top</source>
<target xml:lang="de">Von oben</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,15 @@
<source>Icon</source>
</trans-unit>

<!-- CreationDialog -->
<trans-unit id="creationDialog.title" xml:space="preserve" approved="yes">
<source>Title (in Neos Backend)</source>
</trans-unit>

<!-- properties -->
<trans-unit id="properties.title" xml:space="preserve" approved="yes">
<source>Title</source>
</trans-unit>
<trans-unit id="properties.top" xml:space="preserve" approved="yes">
<source>From top</source>
</trans-unit>
Expand Down

0 comments on commit c668182

Please sign in to comment.