mirror of
https://github.com/werkraum-media/events.git
synced 2024-11-22 11:16: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 = '';
|
||||
|
||||
/**
|
||||
* web
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $phone = '';
|
||||
|
||||
/**
|
||||
* web
|
||||
*
|
||||
|
@ -357,6 +364,22 @@ class Event extends AbstractEntity
|
|||
$this->zip = $zip;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getPhone()
|
||||
{
|
||||
return $this->phone;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $phone
|
||||
*/
|
||||
public function setPhone($phone)
|
||||
{
|
||||
$this->phone = $phone;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string $web
|
||||
*/
|
||||
|
|
|
@ -275,8 +275,8 @@ class DestinationDataImportService {
|
|||
$this->setTexts($event['texts']);
|
||||
|
||||
// Set address and geo data
|
||||
if($event['street'] && $event['city'] && $event['zip'] && $event['country'])
|
||||
$this->setAddress($event['street'], $event['city'], $event['zip'], $event['country']);
|
||||
if($event['street'] || $event['city'] || $event['zip'] || $event['country'])
|
||||
$this->setAddress($event);
|
||||
|
||||
// Set LatLng
|
||||
if($event['geo']['main']['latitude'] && $event['geo']['main']['longitude'])
|
||||
|
@ -454,16 +454,21 @@ class DestinationDataImportService {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param string $street
|
||||
* @param string $city
|
||||
* @param string $zip
|
||||
* @param string $country
|
||||
* @param array $event
|
||||
*/
|
||||
protected function setAddress(String $street, String $city, String $zip, String $country) {
|
||||
$this->tmpCurrentEvent->setStreet($street);
|
||||
$this->tmpCurrentEvent->setCity($city);
|
||||
$this->tmpCurrentEvent->setZip($zip);
|
||||
$this->tmpCurrentEvent->setCountry($country);
|
||||
protected function setAddress(Array $event) {
|
||||
if (!empty($event['street']))
|
||||
$this->tmpCurrentEvent->setStreet($event['street']);
|
||||
if (!empty($event['city']))
|
||||
$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'
|
||||
],
|
||||
'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' => [
|
||||
'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' => [
|
||||
'sys_language_uid' => [
|
||||
|
@ -257,6 +257,15 @@ return [
|
|||
'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' => [
|
||||
'exclude' => true,
|
||||
'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">
|
||||
<source>Web</source>
|
||||
</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">
|
||||
<source>Booking</source>
|
||||
</trans-unit>
|
||||
|
|
|
@ -51,6 +51,9 @@
|
|||
<trans-unit id="tx_events_domain_model_event.web">
|
||||
<source>Web</source>
|
||||
</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">
|
||||
<source>Booking</source>
|
||||
</trans-unit>
|
||||
|
|
|
@ -23,15 +23,47 @@
|
|||
<f:format.html>{date.event.details}</f:format.html>
|
||||
<p>{event.price_info}</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col mt-3 mb-3">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<p>Veranstaltungsort:<br>
|
||||
<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>
|
||||
|
||||
<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>
|
||||
|
|
|
@ -16,6 +16,7 @@ CREATE TABLE tx_events_domain_model_event (
|
|||
zip varchar(255) DEFAULT '' NOT NULL,
|
||||
country varchar(255) DEFAULT '' NOT NULL,
|
||||
web varchar(255) DEFAULT '' NOT NULL,
|
||||
phone varchar(255) DEFAULT '' NOT NULL,
|
||||
booking varchar(255) DEFAULT '' NOT NULL,
|
||||
ticket varchar(255) DEFAULT '' NOT NULL,
|
||||
facebook varchar(255) DEFAULT '' NOT NULL,
|
||||
|
|
Loading…
Reference in a new issue