-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'upmerge-7-1-x-latest' into 'master'
ref #63913 the redirect in the execute method triggers to late. It can't work... See merge request chameleon-system-oss/chameleon-base!87
- Loading branch information
Showing
88 changed files
with
43,804 additions
and
4,311 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
138 changes: 138 additions & 0 deletions
138
src/CoreBundle/Bridge/Chameleon/Migration/Script/update-1722946918.inc.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
<h1>Build #1722946918</h1> | ||
<h2>Date: 2024-08-06</h2> | ||
<div class="changelog"> | ||
- #64178: new field type "Geo-Koordinaten" with OpenStreetMap instead of Google Maps | ||
</div> | ||
<?php | ||
|
||
$data = TCMSLogChange::createMigrationQueryData('cms_field_type', 'de') | ||
->setFields([ | ||
'049_trans' => 'Geo-Koordinaten', | ||
'mysql_standard_value' => '', | ||
'force_auto_increment' => '0', | ||
'fieldclass' => '\ChameleonSystem\CoreBundle\Field\FieldGeoCoordinates', | ||
'indextype' => 'index', | ||
'constname' => 'CMSFIELD_GEO_COORD', | ||
'mysql_type' => 'VARCHAR', | ||
'length_set' => '255', | ||
'base_type' => 'standard', | ||
'help_text' => '<div class="field-name"><strong>Feldname:</strong> beliebig</div> | ||
<div class="php-class"><strong>PHP Klasse:</strong> FieldGeoCoordinates extends TCMSField</div> | ||
<div>Erzeugt zwei Textfelder für die Eingabe der Geo-Koordinaten Breitengrad (latitude) und Längengrad (longitude).</div> | ||
<div>Zusätzlich wird ein Button generiert, welcher ein PopUp mit OpenStreet Maps-Karte öffnet, in welchem dann gesucht werden kann.</div> | ||
<div> </div> | ||
<div>Ermöglicht die Angabe von Längen- und Breitengraden auf manuellem Wege oder über Suchen und Anklicken in einer OpenStreet Maps-Karte.</div> | ||
<div> </div> | ||
<div> | ||
<ul> | ||
<li class="parameter required head">Pflicht-Parameter:</li> | ||
<li> | ||
<ul> | ||
<li class="parameter required">n/a</li> | ||
</ul> | ||
</li> | ||
<li> </li> | ||
<li class="parameter optional head">Optionale Parameter:</li> | ||
<li> | ||
<ul> | ||
<li class="parameter optional">n/a</li> | ||
</ul> | ||
</li> | ||
<li> | ||
<ul> | ||
</ul> | ||
</li> | ||
</ul> | ||
</div> | ||
', | ||
'contains_images' => '0', | ||
'class_type' => 'Core', | ||
'class_subtype' => '', | ||
'id' => '343b02d4-f02c-c533-be6f-f063d62bc982', | ||
]) | ||
; | ||
TCMSLogChange::insert(__LINE__, $data); | ||
|
||
$data = TCMSLogChange::createMigrationQueryData('cms_field_type', 'en') | ||
->setFields([ | ||
'049_trans' => 'Geo Coordinates', | ||
'help_text' => '<div class="field-name"><strong>Field Name:</strong> arbitrary</div> | ||
<div class="php-class"><strong>PHP Class:</strong> FieldGeoCoordinates extends TCMSField</div> | ||
<div>Creates two text fields for entering the geo-coordinates latitude and longitude.</div> | ||
<div>Additionally, a button is generated that opens a popup with an OpenStreet Maps map, where a search can be performed.</div> | ||
<div> </div> | ||
<div>Allows the entry of latitude and longitude manually or by searching and clicking on an OpenStreet Maps map.</div> | ||
<div> </div> | ||
<div> | ||
<ul> | ||
<li class="parameter required head">Required Parameters:</li> | ||
<li> | ||
<ul> | ||
<li class="parameter required">n/a</li> | ||
</ul> | ||
</li> | ||
<li> </li> | ||
<li class="parameter optional head">Optional Parameters:</li> | ||
<li> | ||
<ul> | ||
<li class="parameter optional">n/a</li> | ||
</ul> | ||
</li> | ||
<li> | ||
<ul> | ||
</ul> | ||
</li> | ||
</ul> | ||
</div> | ||
', | ||
]) | ||
->setWhereEquals([ | ||
'id' => '343b02d4-f02c-c533-be6f-f063d62bc982', | ||
]) | ||
; | ||
TCMSLogChange::update(__LINE__, $data); | ||
|
||
|
||
$data = TCMSLogChange::createMigrationQueryData('cms_tpl_module', 'de') | ||
->setFields([ | ||
'classname' => 'chameleon_system_core.module.map_coordinates', | ||
'name' => 'Geo Koordinaten Backendmodul', | ||
'description' => '', | ||
'icon_font_css_class' => '', | ||
'view_mapper_config' => 'standard=MapCoordinates/standard.html.twig', | ||
'mapper_chain' => '', | ||
'view_mapping' => '', | ||
'revision_management_active' => '0', | ||
'is_copy_allowed' => '0', | ||
'show_in_template_engine' => '0', | ||
'is_restricted' => '0', | ||
'icon_list' => 'application.png', | ||
'position' => '0', | ||
'id' => 'a692affe-4283-2dd3-5a1d-1733d7b95dc8', | ||
]) | ||
; | ||
TCMSLogChange::insert(__LINE__, $data); | ||
|
||
$data = TCMSLogChange::createMigrationQueryData('cms_tpl_module', 'en') | ||
->setFields([ | ||
'name' => 'Geo Coordinates Backendmodul', | ||
]) | ||
->setWhereEquals([ | ||
'id' => 'a692affe-4283-2dd3-5a1d-1733d7b95dc8', | ||
]) | ||
; | ||
TCMSLogChange::update(__LINE__, $data); |
18 changes: 18 additions & 0 deletions
18
src/CoreBundle/Bridge/Chameleon/Migration/Script/update-1723198752.inc.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<h1>Build #1723198752</h1> | ||
<h2>Date: 2024-08-09</h2> | ||
<div class="changelog"> | ||
- #64178: Set all fields "Google Maps-Koordinaten" to new field "Maps-Koordinaten" with OpenStreetMap instead of Google Maps | ||
</div> | ||
<?php | ||
|
||
$data = TCMSLogChange::createMigrationQueryData('cms_field_conf', 'en') | ||
->setFields([ | ||
//set to Maps-Koordinaten (FieldGeoCoordinates) | ||
'cms_field_type_id' => '343b02d4-f02c-c533-be6f-f063d62bc982', | ||
]) | ||
->setWhereEquals([ | ||
//all Google Maps-Koordinaten (TCMSFieldGMapCoordinate) | ||
'cms_field_type_id' => '2659ecf0-e16c-3c3f-1ec8-eba7d8887417' | ||
]) | ||
; | ||
TCMSLogChange::update(__LINE__, $data); |
14 changes: 14 additions & 0 deletions
14
src/CoreBundle/Bridge/Chameleon/Migration/Script/update-1725870468.inc.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<h1>Build #1725870468</h1> | ||
<h2>Date: 2024-09-09</h2> | ||
<div class="changelog"> | ||
- #64178: Set all fields "Google Maps-Koordinaten" to new field "Maps-Koordinaten" with OpenStreetMap instead of Google Maps (SELECT BY OLD CLASSNAME) | ||
</div> | ||
<?php | ||
|
||
$query = "UPDATE `cms_field_conf` | ||
LEFT JOIN `cms_field_type` ON `cms_field_type`.`id` = `cms_field_conf`.`cms_field_type_id` | ||
SET `cms_field_conf`.`cms_field_type_id` = '343b02d4-f02c-c533-be6f-f063d62bc982' | ||
WHERE `cms_field_type`.`fieldclass` = 'TCMSFieldGMapCoordinate'"; | ||
|
||
$connection = TCMSLogChange::getDatabaseConnection(); | ||
$connection->executeQuery($query); |
57 changes: 57 additions & 0 deletions
57
src/CoreBundle/Bridge/Chameleon/Module/MapCoordinates/MapCoordinates.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Chameleon System (https://www.chameleonsystem.com). | ||
* | ||
* (c) ESONO AG (https://www.esono.de) | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace ChameleonSystem\CoreBundle\Bridge\Chameleon\Module\MapCoordinates; | ||
|
||
use ChameleonSystem\CoreBundle\Util\InputFilterUtilInterface; | ||
use MTPkgViewRendererAbstractModuleMapper; | ||
use ChameleonSystem\CoreBundle\ServiceLocator; | ||
|
||
|
||
class MapCoordinates extends MTPkgViewRendererAbstractModuleMapper | ||
{ | ||
public function __construct( | ||
private readonly InputFilterUtilInterface $inputFilterUtil | ||
) { | ||
} | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function Accept(\IMapperVisitorRestricted $visitor, $cachingEnabled, \IMapperCacheTriggerRestricted $cacheTriggerManager) | ||
{ | ||
$visitor->SetMappedValue('fieldname', $this->inputFilterUtil->getFilteredGetInput('sFieldName', '')); | ||
$visitor->SetMappedValue('lat', $this->inputFilterUtil->getFilteredGetInput('lat', '')); | ||
$visitor->SetMappedValue('lng', $this->inputFilterUtil->getFilteredGetInput('lng', '')); | ||
|
||
if (ServiceLocator::getParameter('chameleon_system_core.geocoding.attribution.show')) { | ||
$visitor->SetMappedValue('showGeocodingAttribution', true); | ||
$visitor->SetMappedValue('geocodingAttributionName', ServiceLocator::getParameter('chameleon_system_core.geocoding.attribution.name')); | ||
$visitor->SetMappedValue('geocodingAttributionUrl', ServiceLocator::getParameter('chameleon_system_core.geocoding.attribution.url')); | ||
} else { | ||
$visitor->SetMappedValue('showGeocodingAttribution', false); | ||
} | ||
} | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function GetHtmlHeadIncludes() | ||
{ | ||
$includes = parent::GetHtmlHeadIncludes(); | ||
$includes[] = '<link rel="stylesheet" href="'.$this->global->GetStaticUrlToWebLib('/fields/FieldGeoCoordinates/Leaflet-dist/leaflet.css').'" />'; | ||
$includes[] = '<script type="text/javascript" src="'.$this->global->GetStaticUrlToWebLib('/fields/FieldGeoCoordinates/Leaflet-dist/leaflet.js', false).'"></script>'; | ||
$includes[] = '<link rel="stylesheet" href="'.$this->global->GetStaticUrlToWebLib('/fields/FieldGeoCoordinates/Geocoder-dist/Control.Geocoder.css').'" />'; | ||
$includes[] = '<script type="text/javascript" src="'.$this->global->GetStaticUrlToWebLib('/fields/FieldGeoCoordinates/Geocoder-dist/Control.Geocoder.js', false).'"></script>'; | ||
$includes[] = '<link rel="stylesheet" href="'.$this->global->GetStaticUrlToWebLib('/fields/FieldGeoCoordinates/FieldGeoCoordinates.css?v2').'" />'; | ||
$includes[] = '<script type="text/javascript" src="'.$this->global->GetStaticURLToWebLib('/fields/FieldGeoCoordinates/FieldGeoCoordinates.js').'"></script>'; | ||
|
||
return $includes; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.