mirror of
https://github.com/werkraum-media/events.git
synced 2024-11-22 16:56:10 +01:00
Change address import
This commit is contained in:
parent
b5d89ce7c4
commit
93545bd171
7 changed files with 100 additions and 24 deletions
|
@ -98,6 +98,13 @@ class Event extends AbstractEntity
|
||||||
*/
|
*/
|
||||||
protected $country = '';
|
protected $country = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $phone = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* web
|
* web
|
||||||
*
|
*
|
||||||
|
@ -357,6 +364,22 @@ class Event extends AbstractEntity
|
||||||
$this->zip = $zip;
|
$this->zip = $zip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getPhone()
|
||||||
|
{
|
||||||
|
return $this->phone;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $phone
|
||||||
|
*/
|
||||||
|
public function setPhone($phone)
|
||||||
|
{
|
||||||
|
$this->phone = $phone;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string $web
|
* @return string $web
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -275,8 +275,8 @@ class DestinationDataImportService {
|
||||||
$this->setTexts($event['texts']);
|
$this->setTexts($event['texts']);
|
||||||
|
|
||||||
// Set address and geo data
|
// Set address and geo data
|
||||||
if($event['street'] && $event['city'] && $event['zip'] && $event['country'])
|
if($event['street'] || $event['city'] || $event['zip'] || $event['country'])
|
||||||
$this->setAddress($event['street'], $event['city'], $event['zip'], $event['country']);
|
$this->setAddress($event);
|
||||||
|
|
||||||
// Set LatLng
|
// Set LatLng
|
||||||
if($event['geo']['main']['latitude'] && $event['geo']['main']['longitude'])
|
if($event['geo']['main']['latitude'] && $event['geo']['main']['longitude'])
|
||||||
|
@ -454,16 +454,21 @@ class DestinationDataImportService {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $street
|
* @param array $event
|
||||||
* @param string $city
|
|
||||||
* @param string $zip
|
|
||||||
* @param string $country
|
|
||||||
*/
|
*/
|
||||||
protected function setAddress(String $street, String $city, String $zip, String $country) {
|
protected function setAddress(Array $event) {
|
||||||
$this->tmpCurrentEvent->setStreet($street);
|
if (!empty($event['street']))
|
||||||
$this->tmpCurrentEvent->setCity($city);
|
$this->tmpCurrentEvent->setStreet($event['street']);
|
||||||
$this->tmpCurrentEvent->setZip($zip);
|
if (!empty($event['city']))
|
||||||
$this->tmpCurrentEvent->setCountry($country);
|
$this->tmpCurrentEvent->setCity($event['city']);
|
||||||
|
if (!empty($event['zip']))
|
||||||
|
$this->tmpCurrentEvent->setZip($event['zip']);
|
||||||
|
if (!empty($event['country']))
|
||||||
|
$this->tmpCurrentEvent->setCountry($event['country']);
|
||||||
|
if (!empty($event['phone']))
|
||||||
|
$this->tmpCurrentEvent->setPhone($event['phone']);
|
||||||
|
if (!empty($event['web']))
|
||||||
|
$this->tmpCurrentEvent->setWeb($event['web']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -20,10 +20,10 @@ return [
|
||||||
'iconfile' => 'EXT:events/Resources/Public/Icons/tx_events_domain_model_event.gif'
|
'iconfile' => 'EXT:events/Resources/Public/Icons/tx_events_domain_model_event.gif'
|
||||||
],
|
],
|
||||||
'interface' => [
|
'interface' => [
|
||||||
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, global_id, slug, highlight, teaser, details, price_info, street, district, city, zip, country, web, booking, ticket, facebook, youtube, latitude, longitude, images, categories, dates, organizer, region',
|
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, global_id, slug, highlight, teaser, details, price_info, street, district, city, zip, country, phone, web, booking, ticket, facebook, youtube, latitude, longitude, images, categories, dates, organizer, region',
|
||||||
],
|
],
|
||||||
'types' => [
|
'types' => [
|
||||||
'1' => ['showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, global_id, slug, highlight, teaser, details, price_info, street, district, city, zip, country, web, booking, ticket, facebook, youtube, latitude, longitude, images, categories, dates, organizer, region, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'],
|
'1' => ['showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, global_id, slug, highlight, teaser, details, price_info, street, district, city, zip, country, phone, web, booking, ticket, facebook, youtube, latitude, longitude, images, categories, dates, organizer, region, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'],
|
||||||
],
|
],
|
||||||
'columns' => [
|
'columns' => [
|
||||||
'sys_language_uid' => [
|
'sys_language_uid' => [
|
||||||
|
@ -257,6 +257,15 @@ return [
|
||||||
'eval' => 'trim'
|
'eval' => 'trim'
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
'phone' => [
|
||||||
|
'exclude' => true,
|
||||||
|
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_db.xlf:tx_events_domain_model_event.phone',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'input',
|
||||||
|
'size' => 30,
|
||||||
|
'eval' => 'trim'
|
||||||
|
],
|
||||||
|
],
|
||||||
'web' => [
|
'web' => [
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_db.xlf:tx_events_domain_model_event.web',
|
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_db.xlf:tx_events_domain_model_event.web',
|
||||||
|
|
|
@ -45,6 +45,9 @@
|
||||||
<trans-unit id="tx_events_domain_model_event.web">
|
<trans-unit id="tx_events_domain_model_event.web">
|
||||||
<source>Web</source>
|
<source>Web</source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
<trans-unit id="tx_events_domain_model_event.phone">
|
||||||
|
<source>Phone</source>
|
||||||
|
</trans-unit>
|
||||||
<trans-unit id="tx_events_domain_model_event.booking">
|
<trans-unit id="tx_events_domain_model_event.booking">
|
||||||
<source>Booking</source>
|
<source>Booking</source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
|
|
@ -51,6 +51,9 @@
|
||||||
<trans-unit id="tx_events_domain_model_event.web">
|
<trans-unit id="tx_events_domain_model_event.web">
|
||||||
<source>Web</source>
|
<source>Web</source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
<trans-unit id="tx_events_domain_model_event.phone">
|
||||||
|
<source>Phone</source>
|
||||||
|
</trans-unit>
|
||||||
<trans-unit id="tx_events_domain_model_event.booking">
|
<trans-unit id="tx_events_domain_model_event.booking">
|
||||||
<source>Booking</source>
|
<source>Booking</source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
|
|
@ -23,16 +23,48 @@
|
||||||
<f:format.html>{date.event.details}</f:format.html>
|
<f:format.html>{date.event.details}</f:format.html>
|
||||||
<p>{event.price_info}</p>
|
<p>{event.price_info}</p>
|
||||||
|
|
||||||
<div class="row">
|
</div>
|
||||||
<div class="col-4">
|
</div>
|
||||||
<p>Veranstaltungsort:<br>
|
<div class="row">
|
||||||
{date.event.street}<br>
|
<div class="col mt-3 mb-3">
|
||||||
{date.event.zip} {date.event.city}<br>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-4">
|
||||||
|
<p><b>Preis:</b><br>
|
||||||
|
<f:if condition="{date.event.priceInfo}">
|
||||||
|
<f:then>
|
||||||
|
{date.event.priceInfo}
|
||||||
|
</f:then>
|
||||||
|
<f:else>
|
||||||
|
Keine Information
|
||||||
|
</f:else>
|
||||||
|
</f:if>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<f:if condition="{date.event.web}">
|
||||||
|
<p><b>Weitere Informationen:</b><br>
|
||||||
|
<a href="{date.event.web}" target="_blank">Website</a>
|
||||||
|
</p>
|
||||||
|
</f:if>
|
||||||
|
</div>
|
||||||
|
<div class="col-4">
|
||||||
|
<p><b>Veranstaltungsort:</b><br>
|
||||||
|
{date.event.street}<br>
|
||||||
|
{date.event.zip} {date.event.city}<br>
|
||||||
|
{date.event.phone}<br>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-4">
|
||||||
|
<p><b>Veranstalter:</b><br>
|
||||||
|
{date.event.organizer.name}<br>
|
||||||
|
{date.event.organizer.street}<br>
|
||||||
|
{date.event.organizer.zip} {date.event.organizer.city}<br>
|
||||||
|
{date.event.organizer.phone}<br>
|
||||||
|
<a href="{date.event.organizer.web}" target="_blank">Website</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</f:section>
|
</f:section>
|
||||||
</html>
|
</html>
|
|
@ -16,6 +16,7 @@ CREATE TABLE tx_events_domain_model_event (
|
||||||
zip varchar(255) DEFAULT '' NOT NULL,
|
zip varchar(255) DEFAULT '' NOT NULL,
|
||||||
country varchar(255) DEFAULT '' NOT NULL,
|
country varchar(255) DEFAULT '' NOT NULL,
|
||||||
web varchar(255) DEFAULT '' NOT NULL,
|
web varchar(255) DEFAULT '' NOT NULL,
|
||||||
|
phone varchar(255) DEFAULT '' NOT NULL,
|
||||||
booking varchar(255) DEFAULT '' NOT NULL,
|
booking varchar(255) DEFAULT '' NOT NULL,
|
||||||
ticket varchar(255) DEFAULT '' NOT NULL,
|
ticket varchar(255) DEFAULT '' NOT NULL,
|
||||||
facebook varchar(255) DEFAULT '' NOT NULL,
|
facebook varchar(255) DEFAULT '' NOT NULL,
|
||||||
|
|
Loading…
Reference in a new issue