From 1fc62f8ef281d199aa2751dacda153599afc479c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ronja=20St=C3=B6ppel?= Date: Tue, 7 Feb 2023 11:50:17 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20Erm=C3=B6gliche=20das=20Setzen=20eines?= =?UTF-8?q?=20Titles=20f=C3=BCr=20die=20Nodetypes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Erstelle ein CreationDialog, um den Title direkt eingeben zu können. Wird keiner gesetzt, wird der Standart ausgegeben. --- Configuration/NodeTypes.Content.Hotspot.yaml | 15 +++++++++++++++ .../Translations/de/NodeTypes/Content/Hotspot.xlf | 10 ++++++++++ .../Translations/en/NodeTypes/Content/Hotspot.xlf | 8 ++++++++ 3 files changed, 33 insertions(+) diff --git a/Configuration/NodeTypes.Content.Hotspot.yaml b/Configuration/NodeTypes.Content.Hotspot.yaml index 0bcd6e6..89918a2 100644 --- a/Configuration/NodeTypes.Content.Hotspot.yaml +++ b/Configuration/NodeTypes.Content.Hotspot.yaml @@ -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 @@ -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 diff --git a/Resources/Private/Translations/de/NodeTypes/Content/Hotspot.xlf b/Resources/Private/Translations/de/NodeTypes/Content/Hotspot.xlf index 822fb62..2768394 100644 --- a/Resources/Private/Translations/de/NodeTypes/Content/Hotspot.xlf +++ b/Resources/Private/Translations/de/NodeTypes/Content/Hotspot.xlf @@ -23,7 +23,17 @@ Icon + + + Title (in Neos Backend) + Titel (im Neos Backend) + + + + Title + Titel + From top Von oben diff --git a/Resources/Private/Translations/en/NodeTypes/Content/Hotspot.xlf b/Resources/Private/Translations/en/NodeTypes/Content/Hotspot.xlf index f257d8f..e19727f 100644 --- a/Resources/Private/Translations/en/NodeTypes/Content/Hotspot.xlf +++ b/Resources/Private/Translations/en/NodeTypes/Content/Hotspot.xlf @@ -19,7 +19,15 @@ Icon + + + Title (in Neos Backend) + + + + Title + From top