Merge branch 'release/2020.02-09'

This commit is contained in:
Björn Fromme
2020-02-12 18:59:14 +01:00
13 changed files with 535 additions and 3 deletions
@@ -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']);
}
@@ -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 {
@@ -0,0 +1,53 @@
<?php
defined('TYPO3_MODE') or die();
call_user_func(function() {
$frontendLanguageFilePrefix = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
'tt_content',
'CType',
[
'Störer (neu)',
'disrupter',
'content-image'
],
'teaser_product',
'after'
);
$GLOBALS['TCA']['tt_content']['columns']['tx_eptheme_disrupter'] = [
'exclude' => 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'
);
});
@@ -0,0 +1,220 @@
<?php
return [
'ctrl' => [
'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',
],
],
],
];
@@ -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
}
}
}
}
@@ -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"
@@ -0,0 +1,53 @@
<html data-namespace-typo3-fluid="true" lang="en"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers"
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
<f:section name="Disturber">
<div class="container-fluid ep-disturber ep-expert">
<div>
<div>
<div class="container">
<div class="col-md-6">
<f:if condition="{image}">
<f:then>
<img class="lazyload" data-src="{f:uri.image(image: image, width: '400', height: '400c')}"
alt="{image.alternative}" title="{image.title}">
</f:then>
<f:else>
<img src="https://placehold.it/800x600" alt="">
</f:else>
</f:if>
<div>
<div>Ihr habt Fragen?<br>Wir helfen euch gerne!</div>
<a class="headline headline--3 headline--disturber" href="tel:{settings.phoneNumber -> v:format.pregReplace(pattern: '/[\-\s]/', replacement: '')}" rel="nofollow">{settings.phoneNumber}</a>
</div>
<div><a class="call-btn" href="tel:{settings.phoneNumber -> v:format.pregReplace(pattern: '/[\-\s]/', replacement: '')}" rel="nofollow"><i class="fa fa-phone" aria-hidden="true"></i></a></div>
</div>
<div class="col-md-6">
<span class="headline headline--secondary headline--disturber headline--light">{data.subheadline}</span>
<div class="headline headline--secondary headline--disturber headline--light">{data.headline}</div>
{data.text -> f:format.html()}
<br>
<f:for each="{data.flexForm.buttons -> v:iterator.slice(start: 0, length: 4) -> v:iterator.chunk(count: 2)}" as="buttons">
<div class="row">
<f:for each="{buttons}" as="button" iteration="iteration">
<f:if condition="{iteration.cycle} <= 4">
<div class="col-md-6">
<f:link.typolink parameter="{button.container.link}"
class="btn btn-warning btn-shadow">
{button.container.label}
</f:link.typolink>
</div>
</f:if>
</f:for>
</div>
</f:for>
</div>
</div>
</div>
</div>
</div>
</f:section>
</html>
@@ -0,0 +1,17 @@
<html data-namespace-typo3-fluid="true" lang="en"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers"
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
<f:section name="Disturber">
<div class="container-fluid ep-disturber-last-chance">
<div>{data.headline}</div>
<div>{data.text -> f:format.html()}</div>
<div>
{data.flexForm.buttons -> v:iterator.first() -> v:variable.set(name: 'button')}
<a href="{f:uri.typolink(parameter: button.container.link)}" class="btn btn-info" title="{button.container.label -> f:format.raw()}">{button.container.label -> f:format.raw()}</a>
</div>
</div>
</f:section>
</html>
@@ -0,0 +1,31 @@
<html data-namespace-typo3-fluid="true" lang="en"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers"
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
<f:section name="Disturber">
{data.flexForm.buttons -> v:iterator.first() -> v:variable.set(name: 'button')}
<div class="container-fluid ep-disturber-reminder">
<div>{data.headline}</div>
<div class="col-md-6">
<a href="{f:uri.typolink(parameter: button.container.link)}" title="{button.container.label -> f:format.raw()}">
<f:if condition="{image}">
<f:then>
<img class="scale lazyload" data-src="{f:uri.image(image: image, width: '400')}"
alt="{image.alternative}" title="{image.title}">
</f:then>
<f:else>
<img src="https://placehold.it/600x450" class="scale" alt="">
</f:else>
</f:if>
</a>
</div>
<div class="col-md-6 ">
<div>{data.text -> f:format.html()}</div>
</div>
<a href="{f:uri.typolink(parameter: button.container.link)}" class="btn btn-info"
title="{button.container.label -> f:format.raw()}">{button.container.label -> f:format.raw()}</a>
</div>
</f:section>
</html>
@@ -0,0 +1,40 @@
<html data-namespace-typo3-fluid="true" lang="en"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers"
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
<f:section name="Disturber">
<div class="container-fluid ep-disturber ep-expert-small">
<div>
<div>
<div class="container">
<div class="col-sm-2">
<f:if condition="{image}">
<f:then>
<img class="scale lazyload" data-src="{f:uri.image(image: image, width: '400', height: '400c')}"
alt="{image.alternative}" title="{image.title}">
</f:then>
<f:else>
<img class="scale" src="https://placehold.it/800x600" alt="">
</f:else>
</f:if>
</div>
<div class="col-sm-10">
<span class="headline headline--3 headline--disturber">{data.headline}</span>
{data.text -> f:format.html()}
<br>
<div class="row">
<f:for each="{data.flexForm.buttons}" as="button" iteration="iteration">
<f:if condition="{iteration.cycle} <= 3">
<div class="col-sm-4"><f:link.typolink parameter="{button.container.link}" class="btn btn-warning btn-shadow">{button.container.label}</f:link.typolink></div>
</f:if>
</f:for>
</div>
</div>
</div>
</div>
</div>
</div>
</f:section>
</html>
@@ -0,0 +1,27 @@
<html data-namespace-typo3-fluid="true" lang="en"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers"
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
<f:layout name="Default"/>
<f:section name="Main">
<f:alias map="{data: disrupter.0.data, image: disrupter.0.image.0}">
<f:switch expression="{data.layout}">
<f:case value="0">
<f:render partial="Disrupter/Small" section="Disturber" arguments="{_all}"/>
</f:case>
<f:case value="1">
<f:render partial="Disrupter/Large" section="Disturber" arguments="{_all}"/>
</f:case>
<f:case value="2">
<f:render partial="Disrupter/LastChance" section="Disturber" arguments="{_all}"/>
</f:case>
<f:case value="3">
<f:render partial="Disrupter/Reminder" section="Disturber" arguments="{_all}"/>
</f:case>
</f:switch>
</f:alias>
</f:section>
</html>
+1 -1
View File
@@ -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' => '[email protected]',
'state' => 'stable',
@@ -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,