Add field for skipass included to control badge display
This commit is contained in:
@@ -45,6 +45,11 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements
|
|||||||
*/
|
*/
|
||||||
protected $daytrip = false;
|
protected $daytrip = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
protected $skipassIncluded = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
@@ -311,6 +316,22 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements
|
|||||||
$this->daytrip = (bool) $daytrip;
|
$this->daytrip = (bool) $daytrip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function isSkipassIncluded()
|
||||||
|
{
|
||||||
|
return $this->skipassIncluded;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param bool $skipassIncluded
|
||||||
|
*/
|
||||||
|
public function setSkipassIncluded($skipassIncluded)
|
||||||
|
{
|
||||||
|
$this->skipassIncluded = $skipassIncluded;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
|||||||
+9
-1
@@ -44,7 +44,7 @@ return [
|
|||||||
],
|
],
|
||||||
'palettes' => [
|
'palettes' => [
|
||||||
'destinations' => ['showitem' => 'country,region,city'],
|
'destinations' => ['showitem' => 'country,region,city'],
|
||||||
'top' => ['showitem' => 'searchable, bookable, daytrip, detail_page'],
|
'top' => ['showitem' => 'searchable, bookable, daytrip, skipass_included, detail_page'],
|
||||||
'name' => ['showitem' => 'name,code'],
|
'name' => ['showitem' => 'name,code'],
|
||||||
'alternative' => ['showitem' => 'alt_product, alt_label'],
|
'alternative' => ['showitem' => 'alt_product, alt_label'],
|
||||||
'header' => ['showitem' => 'headline,subline,--linebreak--,header_title,header_subtitle'],
|
'header' => ['showitem' => 'headline,subline,--linebreak--,header_title,header_subtitle'],
|
||||||
@@ -161,6 +161,14 @@ return [
|
|||||||
'type' => 'check',
|
'type' => 'check',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
'skipass_included' => [
|
||||||
|
'exclude' => 0,
|
||||||
|
'label' => 'Skipass inklusive',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'check',
|
||||||
|
'default' => true,
|
||||||
|
],
|
||||||
|
],
|
||||||
'detail_page' => [
|
'detail_page' => [
|
||||||
'exclude' => 0,
|
'exclude' => 0,
|
||||||
'label' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_product.detail_page',
|
'label' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_product.detail_page',
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ CREATE TABLE tx_epproducts_domain_model_product (
|
|||||||
searchable tinyint(4) unsigned DEFAULT '1' NOT NULL,
|
searchable tinyint(4) unsigned DEFAULT '1' NOT NULL,
|
||||||
bookable tinyint(4) unsigned DEFAULT '1' NOT NULL,
|
bookable tinyint(4) unsigned DEFAULT '1' NOT NULL,
|
||||||
daytrip tinyint(4) unsigned DEFAULT '0' NOT NULL,
|
daytrip tinyint(4) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
skipass_included tinyint(4) unsigned DEFAULT '1' NOT NULL,
|
||||||
name varchar(255) DEFAULT '' NOT NULL,
|
name varchar(255) DEFAULT '' NOT NULL,
|
||||||
name_internal varchar(255) DEFAULT '' NOT NULL,
|
name_internal varchar(255) DEFAULT '' NOT NULL,
|
||||||
subline varchar(255) DEFAULT '' NOT NULL,
|
subline varchar(255) DEFAULT '' NOT NULL,
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</f:else>
|
</f:else>
|
||||||
</f:if>
|
</f:if>
|
||||||
<f:if condition="{settings.showSkipassBadge}">
|
<f:if condition="{settings.showSkipassBadge} && {product.skipassIncluded}">
|
||||||
<f:link.typolink parameter="{settings.skipassPageUid}" title="Skipass inklusive">
|
<f:link.typolink parameter="{settings.skipassPageUid}" title="Skipass inklusive">
|
||||||
<f:image src="EXT:ep_theme/Resources/Public/images/badge_skipass.png"
|
<f:image src="EXT:ep_theme/Resources/Public/images/badge_skipass.png"
|
||||||
alt="Skipass inklusive" class="product-header__badge product-header__badge--skipass" />
|
alt="Skipass inklusive" class="product-header__badge product-header__badge--skipass" />
|
||||||
|
|||||||
Reference in New Issue
Block a user