Add 'new' label
This commit is contained in:
@@ -75,6 +75,11 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
||||
*/
|
||||
protected $earlybird = false;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $new = false;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
@@ -282,6 +287,22 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
||||
$this->earlybird = $earlybird;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isNew()
|
||||
{
|
||||
return $this->new;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $new
|
||||
*/
|
||||
public function setNew($new)
|
||||
{
|
||||
$this->new = $new;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
|
||||
@@ -231,11 +231,11 @@ class HotelRepository extends AbstractRepository
|
||||
'date.hotel as hotelUid', 'date.hotel_name as hotelName', 'date.hotel_teaser as hotelTeaser',
|
||||
'date.hotel_category as hotelCategory', 'date.hotel_detail_page as hotelDetailPage',
|
||||
'date.date_start as dateStart', 'date.date_end as dateEnd', 'date.earlybird as earlybird',
|
||||
'date.low_contingent as lowContingent', 'date.board as board', 'date.product_fact as productFact',
|
||||
'date.hotel_fact as hotelFact', 'date.region_fact as regionFact', 'date.services_included as servicesIncluded',
|
||||
'date.min_price as minPrice', 'date.pseudo_price as pseudoPrice', 'date.nights as nights',
|
||||
'date.available as available', 'date.country as country', 'date.country_code as countryCode',
|
||||
'date.region as region'
|
||||
'date.new as new', 'date.low_contingent as lowContingent', 'date.board as board',
|
||||
'date.product_fact as productFact', 'date.hotel_fact as hotelFact', 'date.region_fact as regionFact',
|
||||
'date.services_included as servicesIncluded', 'date.min_price as minPrice',
|
||||
'date.pseudo_price as pseudoPrice', 'date.nights as nights', 'date.available as available',
|
||||
'date.country as country', 'date.country_code as countryCode', 'date.region as region'
|
||||
)
|
||||
->from('tx_epproducts_domain_model_date', 'date')
|
||||
->leftJoin('date', 'tx_epproducts_product_region_mm', 'mm', 'mm.uid_local = date.product')
|
||||
|
||||
@@ -49,16 +49,17 @@ class ProductRepository extends AbstractRepository
|
||||
$query = $qb
|
||||
->select(
|
||||
'date.concept as conceptUid', 'date.concept_name as conceptName', 'date.concept_code as conceptCode',
|
||||
'date.product as productUid', 'date.product_name as productName', 'date.product_detail_page as productDetailPage',
|
||||
'date.product_feature as productFeature',
|
||||
'date.product as productUid', 'date.product_name as productName',
|
||||
'date.product_detail_page as productDetailPage', 'date.product_feature as productFeature',
|
||||
'date.country as countryUid','date.country_name as countryName', 'date.country_code as countryCode',
|
||||
'date.region as regionUid', 'date.region_name as regionName', 'date.region_feature as regionFeature',
|
||||
'date.date_start as dateStart', 'date.date_end as dateEnd',
|
||||
'date.hotel as hotelUid', 'date.hotel_name as hotelName', 'date.hotel_category as hotelCategory',
|
||||
'date.earlybird as earlybird', 'date.low_contingent as lowContingent', 'date.board as board',
|
||||
'date.product_fact as productFact', 'date.hotel_fact as hotelFact', 'date.region_fact as regionFact',
|
||||
'date.services_included as servicesIncluded', 'date.min_price as minPrice', 'date.nights as nights',
|
||||
'date.available as available', 'date.pseudo_price as pseudoPrice'
|
||||
'date.earlybird as earlybird', 'date.new as new', 'date.low_contingent as lowContingent',
|
||||
'date.board as board', 'date.product_fact as productFact', 'date.hotel_fact as hotelFact',
|
||||
'date.region_fact as regionFact', 'date.services_included as servicesIncluded',
|
||||
'date.min_price as minPrice', 'date.nights as nights', 'date.available as available',
|
||||
'date.pseudo_price as pseudoPrice'
|
||||
)
|
||||
->from('tx_epproducts_domain_model_date', 'date')
|
||||
->where('date.product IN (:productUids)')
|
||||
@@ -89,16 +90,17 @@ class ProductRepository extends AbstractRepository
|
||||
$query = $qb
|
||||
->select(
|
||||
'date.concept as conceptUid', 'date.concept_name as conceptName', 'date.concept_code as conceptCode',
|
||||
'date.product as productUid', 'date.product_name as productName', 'date.product_detail_page as productDetailPage',
|
||||
'date.product_feature as productFeature', 'date.daytrip as daytrip',
|
||||
'date.country as countryUid','date.country_name as countryName', 'date.country_code as countryCode',
|
||||
'date.region as regionUid', 'date.region_name as regionName', 'date.region_feature as regionFeature',
|
||||
'date.date_start as dateStart', 'date.date_end as dateEnd',
|
||||
'date.product as productUid', 'date.product_name as productName',
|
||||
'date.product_detail_page as productDetailPage', 'date.product_feature as productFeature',
|
||||
'date.daytrip as daytrip', 'date.country as countryUid','date.country_name as countryName',
|
||||
'date.country_code as countryCode', 'date.region as regionUid', 'date.region_name as regionName',
|
||||
'date.region_feature as regionFeature', 'date.date_start as dateStart', 'date.date_end as dateEnd',
|
||||
'date.hotel as hotelUid', 'date.hotel_name as hotelName', 'date.hotel_category as hotelCategory',
|
||||
'date.earlybird as earlybird', 'date.low_contingent as lowContingent', 'date.board as board',
|
||||
'date.product_fact as productFact', 'date.hotel_fact as hotelFact', 'date.region_fact as regionFact',
|
||||
'date.services_included as servicesIncluded', 'date.min_price as minPrice', 'date.nights as nights',
|
||||
'date.available as available', 'date.pseudo_price as pseudoPrice'
|
||||
'date.earlybird as earlybird', 'date.new as new', 'date.low_contingent as lowContingent',
|
||||
'date.board as board', 'date.product_fact as productFact', 'date.hotel_fact as hotelFact',
|
||||
'date.region_fact as regionFact', 'date.services_included as servicesIncluded',
|
||||
'date.min_price as minPrice', 'date.nights as nights', 'date.available as available',
|
||||
'date.pseudo_price as pseudoPrice'
|
||||
)
|
||||
->from('tx_epproducts_domain_model_date', 'date')
|
||||
->leftJoin('date', 'tx_epproducts_domain_model_room', 'room', 'room.date = date.uid')
|
||||
@@ -144,13 +146,14 @@ class ProductRepository extends AbstractRepository
|
||||
->select(
|
||||
'product as productUid', 'product_name as productName', 'product_detail_page as productDetailPage',
|
||||
'product_feature as productFeature', 'product_teaser as productTeaser', 'product_fact as productFact',
|
||||
'hotel as hotelUid', 'hotel_fact as hotelFact', 'hotel_name as hotelName', 'hotel_category as hotelCategory',
|
||||
'region_fact as regionFact', 'region_name as regionName', 'region_feature as regionFeature',
|
||||
'hotel as hotelUid', 'hotel_fact as hotelFact', 'hotel_name as hotelName',
|
||||
'hotel_category as hotelCategory', 'region_fact as regionFact', 'region_name as regionName',
|
||||
'region_feature as regionFeature',
|
||||
'country_name as countryName', 'country_code as countryCode',
|
||||
'date_start as dateStart', 'date_end as dateEnd', 'uid as dateUid', 'min_price as minPrice',
|
||||
'pseudo_price as pseudoPrice', 'nights as nights', 'available as available',
|
||||
'skipass_included as skipassIncluded', 'bus_included as busIncluded',
|
||||
'earlybird', 'daytrip', 'low_contingent as lowContingent',
|
||||
'earlybird', 'new', 'daytrip', 'low_contingent as lowContingent',
|
||||
'concept_code as conceptCode', 'concept_name as conceptName',
|
||||
'board'
|
||||
)
|
||||
|
||||
@@ -510,6 +510,8 @@ class DateImportService implements SingletonInterface
|
||||
$date['hotel_category'] = $hotel['category'];
|
||||
$date['hotel_teaser'] = $hotel['teaser'];
|
||||
$date['hotel_detail_page'] = $hotel['detail_page'];
|
||||
$date['earlybird'] = $hotel['earlybird'];
|
||||
$date['new'] = $hotel['new'];
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -732,7 +734,7 @@ class DateImportService implements SingletonInterface
|
||||
{
|
||||
$sql = '
|
||||
SELECT u.code code, u.uid uid, h.name name, h.type type,
|
||||
h.earlybird earlybird, h.low_contingent low_contingent,
|
||||
h.earlybird earlybird, h.new new, h.low_contingent low_contingent,
|
||||
h.keywords keywords, h.header_title header_title,
|
||||
h.category category, h.teaser teaser, h.detail_page detail_page
|
||||
FROM (
|
||||
@@ -755,6 +757,7 @@ class DateImportService implements SingletonInterface
|
||||
'type' => $row['type'],
|
||||
'name' => $row['name'],
|
||||
'earlybird' => $row['earlybird'],
|
||||
'new' => $row['new'],
|
||||
'low_contingent' => $row['low_contingent'],
|
||||
'keywords' => $row['keywords'],
|
||||
'header_title' => $row['header_title'],
|
||||
|
||||
@@ -233,6 +233,7 @@ class HotelDataService implements SingletonInterface
|
||||
'available' => 0,
|
||||
'board' => $row['board'],
|
||||
'earlybird' => $row['earlybird'],
|
||||
'new' => $row['new'],
|
||||
'lowContingent' => $row['lowContingent'],
|
||||
'servicesIncluded' => unserialize($row['servicesIncluded']),
|
||||
'minDateStart' => null,
|
||||
|
||||
@@ -195,6 +195,7 @@ class ProductDataService implements SingletonInterface
|
||||
'pseudoPrice' => $teaserData['pseudoPrice'],
|
||||
'board' => $teaserData['board'],
|
||||
'earlybird' => $teaserData['earlybird'],
|
||||
'new' => $teaserData['new'],
|
||||
'daytrip' => $teaserData['daytrip'],
|
||||
'lowContingent' => $teaserData['lowContingent'],
|
||||
'servicesIncluded' => unserialize($teaserData['servicesIncluded']),
|
||||
|
||||
+11
-2
@@ -27,7 +27,8 @@ return [
|
||||
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, name, detail_page, keywords,
|
||||
address, longitude, latitude, headline, teaser, description, features, room_types, additional_information,
|
||||
teaser_images, header_images, images, reseller_images, code, type, category, country, region, city, facts,
|
||||
teamer, products, header_title,header_subtitle, earlybird, low_contingent, show_as_teaser, external_link',
|
||||
teamer, products, header_title,header_subtitle, earlybird, new, low_contingent, show_as_teaser,
|
||||
external_link',
|
||||
],
|
||||
'types' => [
|
||||
'1' => [
|
||||
@@ -39,7 +40,8 @@ return [
|
||||
],
|
||||
],
|
||||
'palettes' => [
|
||||
'top' => ['showitem' => 'hidden,earlybird,low_contingent,show_as_teaser,--linebreak--,groupsch_id,detail_page,--linebreak--,external_link'],
|
||||
'top' => ['showitem' => 'hidden,earlybird,new,low_contingent,show_as_teaser,
|
||||
--linebreak--,groupsch_id,detail_page,--linebreak--,external_link'],
|
||||
'geolocation' => ['showitem' => 'address, longitude, latitude'],
|
||||
'destinations' => ['showitem' => 'country,region,city'],
|
||||
'name' => ['showitem' => 'name,code,--linebreak--,header_title,header_subtitle'],
|
||||
@@ -134,6 +136,13 @@ return [
|
||||
],
|
||||
],
|
||||
|
||||
'new' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Neu',
|
||||
'config' => [
|
||||
'type' => 'check',
|
||||
],
|
||||
],
|
||||
'earlybird' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Frühbucher',
|
||||
|
||||
@@ -151,6 +151,7 @@ CREATE TABLE tx_epproducts_domain_model_date (
|
||||
hotel_teaser text NOT NULL,
|
||||
hotel_detail_page varchar(255) DEFAULT '' NOT NULL,
|
||||
earlybird tinyint(4) unsigned DEFAULT '0' NOT NULL,
|
||||
new tinyint(4) unsigned DEFAULT '0' NOT NULL,
|
||||
low_contingent tinyint(4) unsigned DEFAULT '0' NOT NULL,
|
||||
rooms int(11) unsigned DEFAULT '0',
|
||||
|
||||
@@ -195,6 +196,7 @@ CREATE TABLE tx_epproducts_domain_model_hotel (
|
||||
pid int(11) DEFAULT '0' NOT NULL,
|
||||
|
||||
earlybird tinyint(4) unsigned DEFAULT '0' NOT NULL,
|
||||
new tinyint(4) unsigned DEFAULT '0' NOT NULL,
|
||||
low_contingent tinyint(4) unsigned DEFAULT '0' NOT NULL,
|
||||
show_as_teaser tinyint(4) unsigned DEFAULT '0' NOT NULL,
|
||||
detail_page varchar(255) DEFAULT '' NOT NULL,
|
||||
|
||||
@@ -120,6 +120,10 @@
|
||||
text-transform: uppercase;
|
||||
white-space: nowrap;
|
||||
|
||||
&--new {
|
||||
color: $color-label-earlybird;
|
||||
}
|
||||
|
||||
&--earlybird {
|
||||
color: $color-label-earlybird;
|
||||
}
|
||||
|
||||
@@ -67,9 +67,9 @@
|
||||
<span class="product-teaser__price"><strong>ab {teaser.minPrice} €</strong>{f:if(condition: teaser.pseudoPrice, then: ' <s class="product-teaser__pseudo-price">{teaser.pseudoPrice} €</s>')}</span>
|
||||
<f:if condition="{date.pseudoPrice}">
|
||||
<f:else>
|
||||
<div class="product-teaser__labels{f:if(condition: '{0: teaser.date.earlybird, 1: teaser.date.lowContingent} == {0: 1, 1: 1}', then: ' product-teaser__labels--multiple')}">
|
||||
<f:if condition="{teaser.date.earlybird}">
|
||||
<span class="teaser-label teaser-label--earlybird">Frühbucher</span>
|
||||
<div class="product-teaser__labels{f:if(condition: '{teaser.new} == 1 && {teaser.date.lowContingent} == 1', then: ' product-teaser__labels--multiple')}">
|
||||
<f:if condition="{teaser.new}">
|
||||
<span class="teaser-label teaser-label--new">Neu</span>
|
||||
</f:if>
|
||||
<f:if condition="{teaser.date.lowContingent}">
|
||||
<span class="teaser-label teaser-label--low-contingent">Wenige Betten</span>
|
||||
|
||||
Reference in New Issue
Block a user