diff --git a/code/objects/Location.php b/code/objects/Location.php index e5b68d7..6ed0358 100644 --- a/code/objects/Location.php +++ b/code/objects/Location.php @@ -141,6 +141,7 @@ public function fieldLabels($includerelations = true) $labels['Email'] = 'Email'; $labels['Featured.NiceAsBoolean'] = 'Featured'; $labels['Coords'] = 'Coords'; + $labels['Import_ID'] = 'Import_ID'; return $labels; } diff --git a/code/pages/Locator.php b/code/pages/Locator.php index eb49c6b..fecc6a1 100644 --- a/code/pages/Locator.php +++ b/code/pages/Locator.php @@ -242,8 +242,8 @@ public function init() $load = 'autoGeocode: false, fullMapStart: true, storeLimit: 1000, maxDistance: true,'; } - $listTemplatePath = Config::inst()->get('Locator', 'list_template_path'); - $infowindowTemplatePath = Config::inst()->get('Locator', 'info_window_template_path'); + $listTemplatePath = Config::inst()->get('Locator_Controller', 'list_template_path'); + $infowindowTemplatePath = Config::inst()->get('Locator_Controller', 'info_window_template_path'); // in page or modal $modal = ($this->data()->ModalWindow) ? 'modalWindow: true' : 'modalWindow: false'; diff --git a/tests/LocationTest.php b/tests/LocationTest.php index c9843a2..e899fa1 100644 --- a/tests/LocationTest.php +++ b/tests/LocationTest.php @@ -52,6 +52,7 @@ public function testFieldLabels() 'Featured.NiceAsBoolean' => 'Featured', 'Coords' => 'Coords', 'Import_ID' => 'Import_ID', + 'LatLngOverride' => 'Lat Lng Override', ); $this->assertEquals($expected, $labels); } diff --git a/tests/LocatorTest.php b/tests/LocatorTest.php index 91b551a..65bd31d 100644 --- a/tests/LocatorTest.php +++ b/tests/LocatorTest.php @@ -110,4 +110,13 @@ public function testLocationSearch() $this->assertInstanceOf('FieldList', $fields); } + /** + * + */ + public function testLocationInfoTemplates() + { + $this->assertEquals('locator/templates/location-list-description.html', Config::inst()->get('Locator_Controller', 'list_template_path')); + $this->assertEquals('locator/templates/infowindow-description.html', Config::inst()->get('Locator_Controller', 'info_window_template_path')); + } + }