Add field 'short name' to hotels

This commit is contained in:
Björn Fromme
2019-06-06 17:48:40 +02:00
parent af1afc80fc
commit 9ba1ed0d45
6 changed files with 1039 additions and 970 deletions
@@ -100,6 +100,11 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
*/
protected $name = '';
/**
* @var string
*/
protected $shortName;
/**
* @var string
*/
@@ -367,6 +372,26 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
$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
*/
@@ -361,7 +361,7 @@ class ProductRepository extends AbstractRepository
'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',
'hotel.detail_page as hotelDetailPageUid'
'hotel.detail_page as hotelDetailPageUid', 'hotel.short_name as hotelShortName'
)
->from('tx_epproducts_domain_model_date', 'date')
->innerJoin('date', 'tx_epproducts_domain_model_room', 'room', 'room.date = date.uid')
@@ -396,6 +396,7 @@ class DateService implements SingletonInterface
$priceTable[$categoryUid][$hotelUid] = [
'category' => $categoryUid,
'hotelName' => $row['hotelName'],
'hotelShortName' => $row['hotelShortName'],
'hotelTitle' => $row['hotelTitle'],
'hotelUri' => $hotelUri,
'bookingUrl' => BookingUrlUtility::generateUrl([
@@ -32,7 +32,7 @@ return [
],
'types' => [
'1' => [
'showitem' => '--palette--;;top, --palette--;;name, headline, --palette--;;geolocation,
'showitem' => '--palette--;;top, --palette--;;name, --palette--;;geolocation,
--palette--;;destinations, --palette--;;categories, keywords,
--div--;Texte, teaser, description, features, room_types, additional_information,
--div--;Verknüpfungen, facts, teamer, additional_codes,
@@ -41,10 +41,10 @@ return [
],
'palettes' => [
'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'],
'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'],
],
'columns' => [
@@ -183,6 +183,15 @@ return [
'eval' => 'trim,required'
],
],
'short_name' => [
'exclude' => 0,
'label' => 'Kurzname',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'keywords' => [
'exclude' => 0,
'label' => 'Keywords für Suchschlitz',
File diff suppressed because it is too large Load Diff
@@ -22,9 +22,9 @@
<f:for each="{v:variable.get(name: 'pricetable.{categoryKey}', useRawKeys: 1)}" as="row">
<tr>
<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">
{row.hotelTitle -> v:or(alternative: row.hotelName)}
{row.hotelShortName -> v:or(alternative: row.hotelTitle) -> v:or(alternative: row.hotelName)}
</a></td>
<f:for each="{roomTypesPax}" as="type">
<td>