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',
+67 -33
View File
@@ -2,7 +2,8 @@
#
# Table structure for table 'tx_epproducts_domain_model_product'
#
CREATE TABLE tx_epproducts_domain_model_product (
CREATE TABLE tx_epproducts_domain_model_product
(
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
@@ -89,7 +90,8 @@ CREATE TABLE tx_epproducts_domain_model_product (
#
# Table structure for table 'tx_epproducts_domain_model_date'
#
CREATE TABLE tx_epproducts_domain_model_date (
CREATE TABLE tx_epproducts_domain_model_date
(
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
@@ -191,7 +193,8 @@ CREATE TABLE tx_epproducts_domain_model_date (
#
# Table structure for table 'tx_epproducts_domain_model_hotel'
#
CREATE TABLE tx_epproducts_domain_model_hotel (
CREATE TABLE tx_epproducts_domain_model_hotel
(
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
@@ -202,6 +205,7 @@ CREATE TABLE tx_epproducts_domain_model_hotel (
show_as_teaser tinyint(4) unsigned DEFAULT '0' NOT NULL,
detail_page varchar(255) DEFAULT '' NOT NULL,
name varchar(255) DEFAULT '' NOT NULL,
short_name varchar(255) DEFAULT '' NOT NULL,
headline varchar(255) DEFAULT '' NOT NULL,
description text NOT NULL,
keywords text NOT NULL,
@@ -264,7 +268,8 @@ CREATE TABLE tx_epproducts_domain_model_hotel (
#
# Table structure for table 'tx_epproducts_domain_model_room'
#
CREATE TABLE tx_epproducts_domain_model_room (
CREATE TABLE tx_epproducts_domain_model_room
(
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
@@ -314,7 +319,8 @@ CREATE TABLE tx_epproducts_domain_model_room (
#
# Table structure for table 'tx_epproducts_domain_model_roommapping'
#
CREATE TABLE tx_epproducts_domain_model_roommapping (
CREATE TABLE tx_epproducts_domain_model_roommapping
(
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
@@ -354,7 +360,8 @@ CREATE TABLE tx_epproducts_domain_model_roommapping (
#
# Table structure for table 'tx_epproducts_domain_model_concept'
#
CREATE TABLE tx_epproducts_domain_model_concept (
CREATE TABLE tx_epproducts_domain_model_concept
(
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
@@ -406,7 +413,8 @@ CREATE TABLE tx_epproducts_domain_model_concept (
#
# Table structure for table 'tx_epproducts_domain_model_country'
#
CREATE TABLE tx_epproducts_domain_model_country (
CREATE TABLE tx_epproducts_domain_model_country
(
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
@@ -464,7 +472,8 @@ CREATE TABLE tx_epproducts_domain_model_country (
#
# Table structure for table 'tx_epproducts_domain_model_region'
#
CREATE TABLE tx_epproducts_domain_model_region (
CREATE TABLE tx_epproducts_domain_model_region
(
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
@@ -538,7 +547,8 @@ CREATE TABLE tx_epproducts_domain_model_region (
#
# Table structure for table 'tx_epproducts_domain_model_city'
#
CREATE TABLE tx_epproducts_domain_model_city (
CREATE TABLE tx_epproducts_domain_model_city
(
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
@@ -598,7 +608,8 @@ CREATE TABLE tx_epproducts_domain_model_city (
#
# Table structure for table 'tx_epproducts_domain_model_fact'
#
CREATE TABLE tx_epproducts_domain_model_fact (
CREATE TABLE tx_epproducts_domain_model_fact
(
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
@@ -639,7 +650,8 @@ CREATE TABLE tx_epproducts_domain_model_fact (
#
# Table structure for table 'tx_epproducts_domain_model_matchcode'
#
CREATE TABLE tx_epproducts_domain_model_matchcode (
CREATE TABLE tx_epproducts_domain_model_matchcode
(
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
@@ -680,7 +692,8 @@ CREATE TABLE tx_epproducts_domain_model_matchcode (
#
# Table structure for table 'tx_epproducts_domain_model_faq'
#
CREATE TABLE tx_epproducts_domain_model_faq (
CREATE TABLE tx_epproducts_domain_model_faq
(
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
@@ -721,7 +734,8 @@ CREATE TABLE tx_epproducts_domain_model_faq (
#
# Table structure for table 'tx_epproducts_domain_model_officetip'
#
CREATE TABLE tx_epproducts_domain_model_officetip (
CREATE TABLE tx_epproducts_domain_model_officetip
(
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
@@ -762,7 +776,8 @@ CREATE TABLE tx_epproducts_domain_model_officetip (
#
# Table structure for table 'tx_epproducts_domain_model_teammember'
#
CREATE TABLE tx_epproducts_domain_model_teammember (
CREATE TABLE tx_epproducts_domain_model_teammember
(
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
@@ -808,7 +823,8 @@ CREATE TABLE tx_epproducts_domain_model_teammember (
#
# Table structure for table 'tx_epproducts_domain_model_journey'
#
CREATE TABLE tx_epproducts_domain_model_journey (
CREATE TABLE tx_epproducts_domain_model_journey
(
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
@@ -850,7 +866,8 @@ CREATE TABLE tx_epproducts_domain_model_journey (
#
# Table structure for table 'tx_epproducts_domain_model_snowreport'
#
CREATE TABLE tx_epproducts_domain_model_snowreport (
CREATE TABLE tx_epproducts_domain_model_snowreport
(
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
@@ -905,7 +922,8 @@ CREATE TABLE tx_epproducts_domain_model_snowreport (
#
# Table structure for table 'tx_epproducts_domain_model_webcam'
#
CREATE TABLE tx_epproducts_domain_model_webcam (
CREATE TABLE tx_epproducts_domain_model_webcam
(
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
@@ -948,7 +966,8 @@ CREATE TABLE tx_epproducts_domain_model_webcam (
#
# Table structure for table 'tx_epproducts_domain_model_contingent'
#
CREATE TABLE tx_epproducts_domain_model_contingent (
CREATE TABLE tx_epproducts_domain_model_contingent
(
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
@@ -1001,7 +1020,8 @@ CREATE TABLE tx_epproducts_domain_model_contingent (
#
# Table structure for table 'tx_epproducts_domain_model_badge'
#
CREATE TABLE tx_epproducts_domain_model_badge (
CREATE TABLE tx_epproducts_domain_model_badge
(
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
@@ -1043,7 +1063,8 @@ CREATE TABLE tx_epproducts_domain_model_badge (
#
# Table structure for table 'tx_epproducts_domain_model_staticsearchparams'
#
CREATE TABLE tx_epproducts_domain_model_staticsearchparams (
CREATE TABLE tx_epproducts_domain_model_staticsearchparams
(
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
@@ -1093,7 +1114,8 @@ CREATE TABLE tx_epproducts_domain_model_staticsearchparams (
#
# Table structure for table 'tx_epproducts_domain_model_reseller'
#
CREATE TABLE tx_epproducts_domain_model_reseller (
CREATE TABLE tx_epproducts_domain_model_reseller
(
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
@@ -1135,14 +1157,16 @@ CREATE TABLE tx_epproducts_domain_model_reseller (
#
# Table structure for table 'sys_domain'
#
CREATE TABLE sys_domain (
CREATE TABLE sys_domain
(
tx_epproducts_reseller int(11) unsigned DEFAULT '0'
);
#
# Table structure for table 'tx_epproducts_product_hotel_mm'
#
CREATE TABLE tx_epproducts_product_hotel_mm (
CREATE TABLE tx_epproducts_product_hotel_mm
(
uid_local int(11) unsigned DEFAULT '0' NOT NULL,
uid_foreign int(11) unsigned DEFAULT '0' NOT NULL,
sorting int(11) unsigned DEFAULT '0' NOT NULL,
@@ -1155,7 +1179,8 @@ CREATE TABLE tx_epproducts_product_hotel_mm (
#
# Table structure for table 'tx_epproducts_product_region_mm'
#
CREATE TABLE tx_epproducts_product_region_mm (
CREATE TABLE tx_epproducts_product_region_mm
(
uid_local int(11) unsigned DEFAULT '0' NOT NULL,
uid_foreign int(11) unsigned DEFAULT '0' NOT NULL,
sorting int(11) unsigned DEFAULT '0' NOT NULL,
@@ -1168,7 +1193,8 @@ CREATE TABLE tx_epproducts_product_region_mm (
#
# Table structure for table 'tx_epproducts_hotel_teammember_mm'
#
CREATE TABLE tx_epproducts_hotel_teammember_mm (
CREATE TABLE tx_epproducts_hotel_teammember_mm
(
uid_local int(11) unsigned DEFAULT '0' NOT NULL,
uid_foreign int(11) unsigned DEFAULT '0' NOT NULL,
sorting int(11) unsigned DEFAULT '0' NOT NULL,
@@ -1181,7 +1207,8 @@ CREATE TABLE tx_epproducts_hotel_teammember_mm (
#
# Table structure for table 'tx_epproducts_product_faq_mm'
#
CREATE TABLE tx_epproducts_product_faq_mm (
CREATE TABLE tx_epproducts_product_faq_mm
(
uid_local int(11) unsigned DEFAULT '0' NOT NULL,
uid_foreign int(11) unsigned DEFAULT '0' NOT NULL,
sorting int(11) unsigned DEFAULT '0' NOT NULL,
@@ -1194,7 +1221,8 @@ CREATE TABLE tx_epproducts_product_faq_mm (
#
# Table structure for table 'tx_epproducts_product_fact_mm'
#
CREATE TABLE tx_epproducts_product_fact_mm (
CREATE TABLE tx_epproducts_product_fact_mm
(
uid_local int(11) unsigned DEFAULT '0' NOT NULL,
uid_foreign int(11) unsigned DEFAULT '0' NOT NULL,
sorting int(11) unsigned DEFAULT '0' NOT NULL,
@@ -1207,7 +1235,8 @@ CREATE TABLE tx_epproducts_product_fact_mm (
#
# Table structure for table 'tx_epproducts_hotel_fact_mm'
#
CREATE TABLE tx_epproducts_hotel_fact_mm (
CREATE TABLE tx_epproducts_hotel_fact_mm
(
uid_local int(11) unsigned DEFAULT '0' NOT NULL,
uid_foreign int(11) unsigned DEFAULT '0' NOT NULL,
sorting int(11) unsigned DEFAULT '0' NOT NULL,
@@ -1220,7 +1249,8 @@ CREATE TABLE tx_epproducts_hotel_fact_mm (
#
# Table structure for table 'tx_epproducts_country_fact_mm'
#
CREATE TABLE tx_epproducts_country_fact_mm (
CREATE TABLE tx_epproducts_country_fact_mm
(
uid_local int(11) unsigned DEFAULT '0' NOT NULL,
uid_foreign int(11) unsigned DEFAULT '0' NOT NULL,
sorting int(11) unsigned DEFAULT '0' NOT NULL,
@@ -1233,7 +1263,8 @@ CREATE TABLE tx_epproducts_country_fact_mm (
#
# Table structure for table 'tx_epproducts_region_fact_mm'
#
CREATE TABLE tx_epproducts_region_fact_mm (
CREATE TABLE tx_epproducts_region_fact_mm
(
uid_local int(11) unsigned DEFAULT '0' NOT NULL,
uid_foreign int(11) unsigned DEFAULT '0' NOT NULL,
sorting int(11) unsigned DEFAULT '0' NOT NULL,
@@ -1246,7 +1277,8 @@ CREATE TABLE tx_epproducts_region_fact_mm (
#
# Table structure for table 'tx_epproducts_city_fact_mm'
#
CREATE TABLE tx_epproducts_city_fact_mm (
CREATE TABLE tx_epproducts_city_fact_mm
(
uid_local int(11) unsigned DEFAULT '0' NOT NULL,
uid_foreign int(11) unsigned DEFAULT '0' NOT NULL,
sorting int(11) unsigned DEFAULT '0' NOT NULL,
@@ -1259,7 +1291,8 @@ CREATE TABLE tx_epproducts_city_fact_mm (
#
# Table structure for table 'tx_epproducts_reseller_product_mm'
#
CREATE TABLE tx_epproducts_reseller_product_mm (
CREATE TABLE tx_epproducts_reseller_product_mm
(
uid_local int(11) unsigned DEFAULT '0' NOT NULL,
uid_foreign int(11) unsigned DEFAULT '0' NOT NULL,
sorting int(11) unsigned DEFAULT '0' NOT NULL,
@@ -1272,7 +1305,8 @@ CREATE TABLE tx_epproducts_reseller_product_mm (
#
# Table structure for table 'tx_epproducts_log'
#
CREATE TABLE tx_epproducts_log (
CREATE TABLE tx_epproducts_log
(
request_id varchar(13) DEFAULT '' NOT NULL,
time_micro double(16, 4) NOT NULL default '0.0000',
component varchar(255) DEFAULT '' NOT NULL,
@@ -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>