From 6d7521dfb26dc08c0e3ffc762c02270d5b7ec084 Mon Sep 17 00:00:00 2001
From: Michael Kessler <michael.kessler@sgalinski.de>
Date: Wed, 6 Oct 2021 12:40:04 +0200
Subject: [PATCH] [TASK] Add layout options to flexform

---
 .../FlexForms/flexform_sgyoutube_youtube.xml  | 24 +++++++++++++++++++
 Resources/Private/Language/de.locallang.xlf   | 16 +++++++++++++
 Resources/Private/Language/locallang.xlf      | 12 ++++++++++
 3 files changed, 52 insertions(+)

diff --git a/Configuration/FlexForms/flexform_sgyoutube_youtube.xml b/Configuration/FlexForms/flexform_sgyoutube_youtube.xml
index 30113d6..1d12279 100644
--- a/Configuration/FlexForms/flexform_sgyoutube_youtube.xml
+++ b/Configuration/FlexForms/flexform_sgyoutube_youtube.xml
@@ -44,6 +44,30 @@
 						</TCEforms>
 					</settings.maxResults>
 
+					<settings.layout>
+						<TCEforms>
+							<label>LLL:EXT:sg_youtube/Resources/Private/Language/locallang.xlf:flexform.layout</label>
+							<config>
+								<type>select</type>
+								<renderType>selectSingle</renderType>
+								<items type="array">
+									<numIndex index="0" type="array">
+										<numIndex index="0">LLL:EXT:sg_youtube/Resources/Private/Language/locallang.xlf:flexform.layout.default</numIndex>
+										<numIndex index="1">default</numIndex>
+									</numIndex>
+									<numIndex index="1" type="array">
+										<numIndex index="0">LLL:EXT:sg_youtube/Resources/Private/Language/locallang.xlf:flexform.layout.horizontal</numIndex>
+										<numIndex index="1">horizontal</numIndex>
+									</numIndex>
+									<numIndex index="2" type="array">
+										<numIndex index="0">LLL:EXT:sg_youtube/Resources/Private/Language/locallang.xlf:flexform.layout.vertical</numIndex>
+										<numIndex index="1">vertical</numIndex>
+									</numIndex>
+								</items>
+							</config>
+						</TCEforms>
+					</settings.layout>
+
 					<settings.showTitle>
 						<TCEforms>
 							<exclude>0</exclude>
diff --git a/Resources/Private/Language/de.locallang.xlf b/Resources/Private/Language/de.locallang.xlf
index e015846..068b783 100644
--- a/Resources/Private/Language/de.locallang.xlf
+++ b/Resources/Private/Language/de.locallang.xlf
@@ -41,6 +41,22 @@
 				<source><![CDATA[ID of Channel (UC), Playlist (PL) or Single Video (youtube.com/watch?v=%ID%)]]></source>
 				<target><![CDATA[ID eines Channels (UC), einer Playlist (PL) oder eines einzelnen Videos (youtube.com/watch?v=%ID%)]]></target>
 			</trans-unit>
+			<trans-unit id="flexform.layout" approved="yes">
+				<source><![CDATA[Layout Style]]></source>
+				<target><![CDATA[Layout-Art]]></target>
+			</trans-unit>
+			<trans-unit id="flexform.layout.default" approved="yes">
+				<source><![CDATA[Default]]></source>
+				<target><![CDATA[Standard]]></target>
+			</trans-unit>
+			<trans-unit id="flexform.layout.horizontal" approved="yes">
+				<source><![CDATA[List horizontally]]></source>
+				<target><![CDATA[Horizontale Auflistung]]></target>
+			</trans-unit>
+			<trans-unit id="flexform.layout.vertical" approved="yes">
+				<source><![CDATA[List vertically]]></source>
+				<target><![CDATA[Vertikale Auflistung]]></target>
+			</trans-unit>
 			<trans-unit id="flexform.maxResults" approved="yes">
 				<source><![CDATA[Maximum Amount]]></source>
 				<target><![CDATA[Maximale Anzahl]]></target>
diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf
index 33ccb86..24e057c 100644
--- a/Resources/Private/Language/locallang.xlf
+++ b/Resources/Private/Language/locallang.xlf
@@ -32,6 +32,18 @@
 			<trans-unit id="flexform.id">
 				<source><![CDATA[ID of Channel (UC), Playlist (PL) or Single Video (youtube.com/watch?v=%ID%)]]></source>
 			</trans-unit>
+			<trans-unit id="flexform.layout">
+				<source><![CDATA[Layout Style]]></source>
+			</trans-unit>
+			<trans-unit id="flexform.layout.default">
+				<source><![CDATA[Default]]></source>
+			</trans-unit>
+			<trans-unit id="flexform.layout.horizontal">
+				<source><![CDATA[List horizontally]]></source>
+			</trans-unit>
+			<trans-unit id="flexform.layout.vertical">
+				<source><![CDATA[List vertically]]></source>
+			</trans-unit>
 			<trans-unit id="flexform.maxResults">
 				<source><![CDATA[Maximum Amount]]></source>
 			</trans-unit>
-- 
GitLab