Add field 'short name' to hotels
This commit is contained in:
@@ -100,6 +100,11 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
|||||||
*/
|
*/
|
||||||
protected $name = '';
|
protected $name = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $shortName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
@@ -367,6 +372,26 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
|
|||||||
$this->name = $name;
|
$this->name = $name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getShortName()
|
||||||
|
{
|
||||||
|
if (empty($this->shortName)) {
|
||||||
|
return $this->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->shortName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $shortName
|
||||||
|
*/
|
||||||
|
public function setShortName($shortName)
|
||||||
|
{
|
||||||
|
$this->shortName = $shortName;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -361,7 +361,7 @@ class ProductRepository extends AbstractRepository
|
|||||||
'date.hotel_category as hotelCategory',
|
'date.hotel_category as hotelCategory',
|
||||||
'room.pax as roomPax', 'room.price as roomPrice', 'room.available as available',
|
'room.pax as roomPax', 'room.price as roomPrice', 'room.available as available',
|
||||||
'room.pax as roomPax', 'room.price as roomPrice', 'room.available as available',
|
'room.pax as roomPax', 'room.price as roomPrice', 'room.available as available',
|
||||||
'hotel.detail_page as hotelDetailPageUid'
|
'hotel.detail_page as hotelDetailPageUid', 'hotel.short_name as hotelShortName'
|
||||||
)
|
)
|
||||||
->from('tx_epproducts_domain_model_date', 'date')
|
->from('tx_epproducts_domain_model_date', 'date')
|
||||||
->innerJoin('date', 'tx_epproducts_domain_model_room', 'room', 'room.date = date.uid')
|
->innerJoin('date', 'tx_epproducts_domain_model_room', 'room', 'room.date = date.uid')
|
||||||
|
|||||||
@@ -396,6 +396,7 @@ class DateService implements SingletonInterface
|
|||||||
$priceTable[$categoryUid][$hotelUid] = [
|
$priceTable[$categoryUid][$hotelUid] = [
|
||||||
'category' => $categoryUid,
|
'category' => $categoryUid,
|
||||||
'hotelName' => $row['hotelName'],
|
'hotelName' => $row['hotelName'],
|
||||||
|
'hotelShortName' => $row['hotelShortName'],
|
||||||
'hotelTitle' => $row['hotelTitle'],
|
'hotelTitle' => $row['hotelTitle'],
|
||||||
'hotelUri' => $hotelUri,
|
'hotelUri' => $hotelUri,
|
||||||
'bookingUrl' => BookingUrlUtility::generateUrl([
|
'bookingUrl' => BookingUrlUtility::generateUrl([
|
||||||
|
|||||||
+12
-3
@@ -32,7 +32,7 @@ return [
|
|||||||
],
|
],
|
||||||
'types' => [
|
'types' => [
|
||||||
'1' => [
|
'1' => [
|
||||||
'showitem' => '--palette--;;top, --palette--;;name, headline, --palette--;;geolocation,
|
'showitem' => '--palette--;;top, --palette--;;name, --palette--;;geolocation,
|
||||||
--palette--;;destinations, --palette--;;categories, keywords,
|
--palette--;;destinations, --palette--;;categories, keywords,
|
||||||
--div--;Texte, teaser, description, features, room_types, additional_information,
|
--div--;Texte, teaser, description, features, room_types, additional_information,
|
||||||
--div--;Verknüpfungen, facts, teamer, additional_codes,
|
--div--;Verknüpfungen, facts, teamer, additional_codes,
|
||||||
@@ -41,10 +41,10 @@ return [
|
|||||||
],
|
],
|
||||||
'palettes' => [
|
'palettes' => [
|
||||||
'top' => ['showitem' => 'hidden,earlybird,new,low_contingent,show_as_teaser,
|
'top' => ['showitem' => 'hidden,earlybird,new,low_contingent,show_as_teaser,
|
||||||
--linebreak--,groupsch_id,detail_page,--linebreak--,external_link'],
|
--linebreak--,code,groupsch_id,detail_page,--linebreak--,external_link'],
|
||||||
'geolocation' => ['showitem' => 'address, longitude, latitude'],
|
'geolocation' => ['showitem' => 'address, longitude, latitude'],
|
||||||
'destinations' => ['showitem' => 'country,region,city'],
|
'destinations' => ['showitem' => 'country,region,city'],
|
||||||
'name' => ['showitem' => 'name,code,--linebreak--,header_title,header_subtitle'],
|
'name' => ['showitem' => 'name,short_name,--linebreak--,header_title,header_subtitle,--linebreak--,headline'],
|
||||||
'categories' => ['showitem' => 'type,category'],
|
'categories' => ['showitem' => 'type,category'],
|
||||||
],
|
],
|
||||||
'columns' => [
|
'columns' => [
|
||||||
@@ -183,6 +183,15 @@ return [
|
|||||||
'eval' => 'trim,required'
|
'eval' => 'trim,required'
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
'short_name' => [
|
||||||
|
'exclude' => 0,
|
||||||
|
'label' => 'Kurzname',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'input',
|
||||||
|
'size' => 30,
|
||||||
|
'eval' => 'trim'
|
||||||
|
],
|
||||||
|
],
|
||||||
'keywords' => [
|
'keywords' => [
|
||||||
'exclude' => 0,
|
'exclude' => 0,
|
||||||
'label' => 'Keywords für Suchschlitz',
|
'label' => 'Keywords für Suchschlitz',
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -22,9 +22,9 @@
|
|||||||
<f:for each="{v:variable.get(name: 'pricetable.{categoryKey}', useRawKeys: 1)}" as="row">
|
<f:for each="{v:variable.get(name: 'pricetable.{categoryKey}', useRawKeys: 1)}" as="row">
|
||||||
<tr>
|
<tr>
|
||||||
<td><a class="booking-link" href="{row.hotelUri}"
|
<td><a class="booking-link" href="{row.hotelUri}"
|
||||||
title="Infos zu {row.hotelTitle -> v:or(alternative: row.hotelName)}"
|
title="Infos zu {row.hotelShortName -> v:or(alternative: row.hotelTitle) -> v:or(alternative: row.hotelName)}"
|
||||||
target="_blank">
|
target="_blank">
|
||||||
{row.hotelTitle -> v:or(alternative: row.hotelName)}
|
{row.hotelShortName -> v:or(alternative: row.hotelTitle) -> v:or(alternative: row.hotelName)}
|
||||||
</a></td>
|
</a></td>
|
||||||
<f:for each="{roomTypesPax}" as="type">
|
<f:for each="{roomTypesPax}" as="type">
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
Reference in New Issue
Block a user