diff --git a/public/typo3conf/ext/ep_theme/Classes/DataProcessing/FlexFormProcessor.php b/public/typo3conf/ext/ep_theme/Classes/DataProcessing/FlexFormProcessor.php index afad1b43..55e37906 100644 --- a/public/typo3conf/ext/ep_theme/Classes/DataProcessing/FlexFormProcessor.php +++ b/public/typo3conf/ext/ep_theme/Classes/DataProcessing/FlexFormProcessor.php @@ -51,7 +51,6 @@ class FlexFormProcessor implements DataProcessorInterface ) { $data = $cObj->data; if (array_key_exists('pi_flexform', $data)) { - /** @var \TYPO3\CMS\Extbase\Service\FlexFormService $flexFormService */ $flexFormService = GeneralUtility::makeInstance(FlexFormService::class); $processedData['data']['flexForm'] = $flexFormService->convertFlexFormContentToArray($data['pi_flexform']); } diff --git a/public/typo3conf/ext/ep_theme/Configuration/PageTS/Mod/Wizards/NewContentElement.tsconfig b/public/typo3conf/ext/ep_theme/Configuration/PageTS/Mod/Wizards/NewContentElement.tsconfig index d9d8f31c..32f1f199 100644 --- a/public/typo3conf/ext/ep_theme/Configuration/PageTS/Mod/Wizards/NewContentElement.tsconfig +++ b/public/typo3conf/ext/ep_theme/Configuration/PageTS/Mod/Wizards/NewContentElement.tsconfig @@ -68,6 +68,12 @@ mod { description = Störer mit Bild, mehreren Buttons und Kontaktinfo tt_content_defValues.CType = disturber } + disrupter { + iconIdentifier = content-ep_theme-ce + title = Störer (neu) + description = Störer mit Bild, mehreren Buttons und Kontaktinfo + tt_content_defValues.CType = disrupter + } deal_of_the_week { iconIdentifier = content-ep_theme-ce title = Deal der Woche @@ -75,7 +81,7 @@ mod { tt_content_defValues.CType = deal_of_the_week } } - show := addToList(disturber, deal_of_the_week) + show := addToList(disturber, disrupter, deal_of_the_week) } special { elements { diff --git a/public/typo3conf/ext/ep_theme/Configuration/TCA/Overrides/tt_content_element_disrupter.php b/public/typo3conf/ext/ep_theme/Configuration/TCA/Overrides/tt_content_element_disrupter.php new file mode 100644 index 00000000..6c2adf2d --- /dev/null +++ b/public/typo3conf/ext/ep_theme/Configuration/TCA/Overrides/tt_content_element_disrupter.php @@ -0,0 +1,53 @@ + 0, + 'label' => 'Störer', + 'config' => [ + 'type' => 'select', + 'foreign_table' => 'tx_eptheme_domain_model_disrupter', + 'foreign_field' => 'tt_content', + 'maxitems' => 1, + 'minitems' => 1, + 'foreign_table_where' => 'ORDER BY headline ASC', + 'MM' => 'tx_eptheme_ttcontent_tx_eptheme_disrupter_mm', + ], + ]; + + $GLOBALS['TCA']['tt_content']['types']['disrupter'] = [ + 'showitem' => ' + --palette--;' . $frontendLanguageFilePrefix . 'palette.general;general, tx_eptheme_disrupter, + --div--;' . $frontendLanguageFilePrefix . 'tabs.appearance, + layout;' . $frontendLanguageFilePrefix . 'layout_formlabel, + --div--;' . $frontendLanguageFilePrefix . 'tabs.access, + hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden, + --div--;' . $frontendLanguageFilePrefix . 'tabs.extended + ', + 'columnsOverrides' => [ + ] + ]; + + \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( + '*', + 'FILE:EXT:ep_theme/Configuration/FlexForms/flexform_disturber.xml', + 'disrupter' + ); + +}); diff --git a/public/typo3conf/ext/ep_theme/Configuration/TCA/tx_eptheme_domain_model_disrupter.php b/public/typo3conf/ext/ep_theme/Configuration/TCA/tx_eptheme_domain_model_disrupter.php new file mode 100644 index 00000000..07ca773f --- /dev/null +++ b/public/typo3conf/ext/ep_theme/Configuration/TCA/tx_eptheme_domain_model_disrupter.php @@ -0,0 +1,220 @@ + [ + 'title' => 'Störer', + 'default_sortby' => 'ORDER BY headline', + 'label' => 'headline', + 'tstamp' => 'tstamp', + 'crdate' => 'crdate', + 'cruser_id' => 'cruser_id', + 'dividers2tabs' => true, + 'versioningWS' => true, + 'languageField' => 'sys_language_uid', + 'transOrigPointerField' => 'l10n_parent', + 'transOrigDiffSourceField' => 'l10n_diffsource', + 'delete' => 'deleted', + 'enablecolumns' => [ + 'disabled' => 'hidden', + 'starttime' => 'starttime', + 'endtime' => 'endtime', + ], + 'searchFields' => 'headline,text', + 'iconfile' => 'EXT:ep_theme/Resources/Public/images/icon_ce.svg', + ], + 'interface' => [ + 'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, layout, headline, text, + image, pi_flexform', + ], + 'types' => [ + '1' => [ + 'showitem' => 'sys_language_uid, hidden, layout, headline, text, image, pi_flexform', + ], + ], + 'palettes' => [ + ], + 'columns' => [ + + 'sys_language_uid' => [ + 'exclude' => 0, + 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.language', + 'config' => [ + 'type' => 'select', + 'renderType' => 'selectSingle', + 'foreign_table' => 'sys_language', + 'foreign_table_where' => 'ORDER BY sys_language.title', + 'items' => [ + ['LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1], + ['LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0] + ], + ], + ], + 'l10n_parent' => [ + 'displayCond' => 'FIELD:sys_language_uid:>:0', + 'exclude' => 0, + 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent', + 'config' => [ + 'type' => 'select', + 'renderType' => 'selectSingle', + 'items' => [ + ['', 0], + ], + 'foreign_table' => 'tx_eptheme_domain_model_disrupter', + 'foreign_table_where' => 'AND tx_eptheme_domain_model_disrupter.pid=###CURRENT_PID### AND tx_eptheme_domain_model_disrupter.sys_language_uid IN (-1,0)', + ], + ], + 'l10n_diffsource' => [ + 'config' => [ + 'type' => 'passthrough', + ], + ], + + 't3ver_label' => [ + 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel', + 'config' => [ + 'type' => 'input', + 'size' => 30, + 'max' => 255, + ] + ], + + 'hidden' => [ + 'exclude' => 0, + 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.hidden', + 'config' => [ + 'type' => 'check', + ], + ], + 'starttime' => [ + 'exclude' => 0, + 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.starttime', + 'config' => [ + 'type' => 'input', + 'size' => 13, + 'eval' => 'datetime', + 'checkbox' => 0, + 'default' => 0, + 'range' => [ + 'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y')) + ], + 'behaviour' => [ + 'allowLanguageSynchronization' => true, + ], + 'renderType' => 'inputDateTime', + ], + ], + 'endtime' => [ + 'exclude' => 0, + 'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.endtime', + 'config' => [ + 'type' => 'input', + 'size' => 13, + 'eval' => 'datetime', + 'checkbox' => 0, + 'default' => 0, + 'range' => [ + 'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y')) + ], + 'behaviour' => [ + 'allowLanguageSynchronization' => true, + ], + 'renderType' => 'inputDateTime', + ], + ], + + 'headline' => [ + 'exclude' => 0, + 'label' => 'Headline', + 'config' => [ + 'type' => 'input', + 'size' => 30, + 'eval' => 'trim' + ], + ], + 'layout' => [ + 'exclude' => 0, + 'label' => 'Layout', + 'config' => [ + 'type' => 'selectSingle', + 'items' => [ + ['klein', 0], + ['groß', 1], + ['Event klein', 2], + ['Event groß', 3], + ], + ], + ], + 'text' => [ + 'exclude' => 0, + 'label' => 'Text', + 'config' => [ + 'type' => 'text', + 'cols' => 40, + 'rows' => 5, + 'eval' => 'trim', + 'enableRichtext' => true, + ], + ], + 'image' => [ + 'exclude' => 0, + 'label' => 'Bild', + 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( + 'image', + [ + 'appearance' => [ + 'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference', + 'fileUploadAllowed' => false, + ], + 'overrideChildTca' => [ + 'types' => [ + \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [ + 'showitem' => ' + --palette--;LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, + --palette--;;filePalette' + ], + ], + 'columns' => [ + 'crop' => [ + 'config' => [ + 'cropVariants' => [ + 'default' => [ + 'title' => 'Alle Geräte', + 'allowedAspectRatios' => [ + 'square' => [ + 'title' => 'quadratisch', + 'value' => 1, + ], + 'free' => [ + 'title' => 'Frei', + 'value' => 'NaN', + ], + ], + ], + ], + ], + ], + ], + ], + 'maxitems' => 1, + 'minitems' => 1, + ], + 'jpg,jpeg' + ), + ], + 'pi_flexform' => [ + 'exclude' => 0, + 'label' => 'Buttons', + 'config' => [ + 'type' => 'flex', + 'ds' => [ + 'default' => 'FILE:EXT:ep_theme/Configuration/FlexForms/flexform_disturber.xml', + ], + ] + ], + 'tt_content' => [ + 'exclude' => 0, + 'config' => [ + 'type' => 'passthrough', + ], + ], + ], +]; diff --git a/public/typo3conf/ext/ep_theme/Configuration/TypoScript/ContentElements/disrupter.typoscript b/public/typo3conf/ext/ep_theme/Configuration/TypoScript/ContentElements/disrupter.typoscript new file mode 100644 index 00000000..c2ebe453 --- /dev/null +++ b/public/typo3conf/ext/ep_theme/Configuration/TypoScript/ContentElements/disrupter.typoscript @@ -0,0 +1,29 @@ +tt_content.disrupter =< lib.contentElement +tt_content.disrupter { + templateName = Disrupter + dataProcessing { + 10 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor + 10 { + table = tx_eptheme_domain_model_disrupter + #pidInList = {$plugin.tx_eptheme.settings.disrupterStoragePid} + pidInList = 1916 + join = tx_eptheme_ttcontent_tx_eptheme_disrupter_mm ON tx_eptheme_ttcontent_tx_eptheme_disrupter_mm.uid_foreign = tx_eptheme_domain_model_disrupter.uid + where { + data = field:uid + intval = 1 + wrap = tx_eptheme_ttcontent_tx_eptheme_disrupter_mm.uid_local=| + } + as = disrupter + + dataProcessing { + 10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor + 10 { + references.fieldName = image + references.table = tx_eptheme_domain_model_disrupter + as = image + } + 20 = EP\EpTheme\DataProcessing\FlexFormProcessor + } + } + } +} diff --git a/public/typo3conf/ext/ep_theme/Configuration/TypoScript/setup.typoscript b/public/typo3conf/ext/ep_theme/Configuration/TypoScript/setup.typoscript index 5971bf89..2eab4fcc 100644 --- a/public/typo3conf/ext/ep_theme/Configuration/TypoScript/setup.typoscript +++ b/public/typo3conf/ext/ep_theme/Configuration/TypoScript/setup.typoscript @@ -16,6 +16,7 @@ @import "EXT:ep_theme/Configuration/TypoScript/ContentElements/calendar.typoscript" @import "EXT:ep_theme/Configuration/TypoScript/ContentElements/contact.typoscript" @import "EXT:ep_theme/Configuration/TypoScript/ContentElements/disturber.typoscript" +@import "EXT:ep_theme/Configuration/TypoScript/ContentElements/disrupter.typoscript" @import "EXT:ep_theme/Configuration/TypoScript/ContentElements/event_pricetable.typoscript" @import "EXT:ep_theme/Configuration/TypoScript/ContentElements/gmap.typoscript" @import "EXT:ep_theme/Configuration/TypoScript/ContentElements/lineup.typoscript" diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Disrupter/Large.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Disrupter/Large.html new file mode 100644 index 00000000..953db093 --- /dev/null +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Disrupter/Large.html @@ -0,0 +1,53 @@ + + + +
+
+
+
+
+ + + {image.alternative} + + + + + +
+
Ihr habt Fragen?
Wir helfen euch gerne!
+ {settings.phoneNumber} +
+
+
+
+ {data.subheadline} +
{data.headline}
+ {data.text -> f:format.html()} +
+ +
+ + +
+ + {button.container.label} + +
+
+
+
+
+
+
+
+
+
+
+ + diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Disrupter/LastChance.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Disrupter/LastChance.html new file mode 100644 index 00000000..71580b1c --- /dev/null +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Disrupter/LastChance.html @@ -0,0 +1,17 @@ + + + +
+
{data.headline}
+
{data.text -> f:format.html()}
+
+ {data.flexForm.buttons -> v:iterator.first() -> v:variable.set(name: 'button')} + {button.container.label -> f:format.raw()} +
+
+
+ + diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Disrupter/Reminder.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Disrupter/Reminder.html new file mode 100644 index 00000000..06666ad5 --- /dev/null +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Disrupter/Reminder.html @@ -0,0 +1,31 @@ + + + + {data.flexForm.buttons -> v:iterator.first() -> v:variable.set(name: 'button')} +
+
{data.headline}
+ +
+
{data.text -> f:format.html()}
+
+ {button.container.label -> f:format.raw()} +
+
+ + diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Disrupter/Small.html b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Disrupter/Small.html new file mode 100644 index 00000000..a42320c6 --- /dev/null +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Partials/Disrupter/Small.html @@ -0,0 +1,40 @@ + + + +
+
+
+
+
+ + + {image.alternative} + + + + + +
+
+ {data.headline} + {data.text -> f:format.html()} +
+
+ + +
{button.container.label}
+
+
+
+
+
+
+
+
+
+ + diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/FluidStyledContent/Disrupter.html b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/FluidStyledContent/Disrupter.html new file mode 100644 index 00000000..2830db85 --- /dev/null +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/FluidStyledContent/Disrupter.html @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/typo3conf/ext/ep_theme/ext_emconf.php b/public/typo3conf/ext/ep_theme/ext_emconf.php index 1a46e3c9..a8da0fca 100644 --- a/public/typo3conf/ext/ep_theme/ext_emconf.php +++ b/public/typo3conf/ext/ep_theme/ext_emconf.php @@ -3,7 +3,7 @@ $EM_CONF[$_EXTKEY] = [ 'title' => 'E&P Theme', 'description' => 'Theme package for Ep Reisen TYPO3 website', - 'category' => 'templates', + 'category' => 'plugins', 'author' => 'Björn Fromme', 'author_email' => 'fromme@dreipunktnull.com', 'state' => 'stable', diff --git a/public/typo3conf/ext/ep_theme/ext_tables.sql b/public/typo3conf/ext/ep_theme/ext_tables.sql index c9176bd1..617d6a47 100644 --- a/public/typo3conf/ext/ep_theme/ext_tables.sql +++ b/public/typo3conf/ext/ep_theme/ext_tables.sql @@ -45,6 +45,51 @@ CREATE TABLE tx_eptheme_domain_model_slide ); +# +# Table structure for table 'tx_eptheme_domain_model_disrupter' +# +CREATE TABLE tx_eptheme_domain_model_disrupter +( + + uid int(11) NOT NULL auto_increment, + pid int(11) DEFAULT '0' NOT NULL, + + headline varchar(255) DEFAULT '' NOT NULL, + layout tinyint(4) unsigned DEFAULT '0' NOT NULL, + text text NOT NULL, + pi_flexform mediumtext NOT NULL, + image int(11) unsigned NOT NULL default '0', + tt_content int(11) unsigned DEFAULT '0' NOT NULL, + + tstamp int(11) unsigned DEFAULT '0' NOT NULL, + crdate int(11) unsigned DEFAULT '0' NOT NULL, + cruser_id int(11) unsigned DEFAULT '0' NOT NULL, + deleted tinyint(4) unsigned DEFAULT '0' NOT NULL, + hidden tinyint(4) unsigned DEFAULT '0' NOT NULL, + starttime int(11) unsigned DEFAULT '0' NOT NULL, + endtime int(11) unsigned DEFAULT '0' NOT NULL, + + t3ver_oid int(11) DEFAULT '0' NOT NULL, + t3ver_id int(11) DEFAULT '0' NOT NULL, + t3ver_wsid int(11) DEFAULT '0' NOT NULL, + t3ver_label varchar(255) DEFAULT '' NOT NULL, + t3ver_state tinyint(4) DEFAULT '0' NOT NULL, + t3ver_stage int(11) DEFAULT '0' NOT NULL, + t3ver_count int(11) DEFAULT '0' NOT NULL, + t3ver_tstamp int(11) DEFAULT '0' NOT NULL, + t3ver_move_id int(11) DEFAULT '0' NOT NULL, + + sys_language_uid int(11) DEFAULT '0' NOT NULL, + l10n_parent int(11) DEFAULT '0' NOT NULL, + l10n_diffsource mediumblob, + + PRIMARY KEY (uid), + KEY parent (pid), + KEY t3ver_oid (t3ver_oid, t3ver_wsid), + KEY language (l10n_parent, sys_language_uid) + +); + # # Table structure for table 'tx_eptheme_domain_model_lineup' # @@ -133,9 +178,20 @@ CREATE TABLE tt_content tx_eptheme_context_date_to int(11) unsigned DEFAULT '0' NOT NULL, tx_eptheme_lineup int(11) unsigned DEFAULT '0', tx_eptheme_contact int(11) unsigned DEFAULT '0', + tx_eptheme_disrupter int(11) unsigned DEFAULT '0', button varchar(255) DEFAULT '' NOT NULL ); +CREATE TABLE tx_eptheme_ttcontent_tx_eptheme_disrupter_mm +( + uid_local int(11) DEFAULT '0' NOT NULL, + uid_foreign int(11) DEFAULT '0' NOT NULL, + sorting int(11) DEFAULT '0' NOT NULL, + + KEY uid_local (uid_local), + KEY uid_foreign (uid_foreign) +); + CREATE TABLE tx_eptheme_domain_model_addresscheck ( uid int(11) NOT NULL auto_increment,