From bb9085dce265874db4b43a8c1b34cbb8cbe4e775 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8Bmma?= Date: Thu, 18 Mar 2021 10:09:29 +1300 Subject: [PATCH] fix config line not commented out, template folder rename, missing class include --- _config/config.yml | 2 +- src/SearchPage.php | 1 + src/SearchPageController.php | 8 ++++---- .../{Jaedb => PlasticStudio}/Search/Layout/SearchPage.ss | 1 - 4 files changed, 6 insertions(+), 6 deletions(-) rename templates/{Jaedb => PlasticStudio}/Search/Layout/SearchPage.ss (99%) mode change 100755 => 100644 diff --git a/_config/config.yml b/_config/config.yml index 32fd984..2ce2f7f 100755 --- a/_config/config.yml +++ b/_config/config.yml @@ -6,7 +6,7 @@ Before: SilverStripe\Control\Controller: extensions: - PlasticStudio\Search\SearchControllerExtension -PlasticStudio\Search\SearchPageController: +# PlasticStudio\Search\SearchPageController: # types: # docs: # Label: 'Documents' diff --git a/src/SearchPage.php b/src/SearchPage.php index 44d4908..ccef5db 100755 --- a/src/SearchPage.php +++ b/src/SearchPage.php @@ -3,6 +3,7 @@ namespace PlasticStudio\Search; use Page; +use SilverStripe\ORM\DB; class SearchPage extends Page { private static $description = "Search engine and results page. You only need one of these page types."; diff --git a/src/SearchPageController.php b/src/SearchPageController.php index 6ef1c50..800ae76 100755 --- a/src/SearchPageController.php +++ b/src/SearchPageController.php @@ -23,11 +23,11 @@ class SearchPageController extends PageController { public function index($request){ if (Director::isLive()){ - Requirements::css('/resources/plasticstudio/search/client/Search.min.css'); - Requirements::javascript('/resources/plasticstudio/search/client/Search.min.js'); + Requirements::css('plasticstudio/search:client/Search.min.css'); + Requirements::javascript('plasticstudio/search:client/Search.min.js'); } else { - Requirements::css('/resources/plasticstudio/search/client/Search.css'); - Requirements::javascript('/resources/plasticstudio/search/client/Search.js'); + Requirements::css('plasticstudio/search:client/Search.css'); + Requirements::javascript('plasticstudio/search:client/Search.js'); } // get the parameters and variables of this request (ie the query and filters) diff --git a/templates/Jaedb/Search/Layout/SearchPage.ss b/templates/PlasticStudio/Search/Layout/SearchPage.ss old mode 100755 new mode 100644 similarity index 99% rename from templates/Jaedb/Search/Layout/SearchPage.ss rename to templates/PlasticStudio/Search/Layout/SearchPage.ss index e596c04..426d767 --- a/templates/Jaedb/Search/Layout/SearchPage.ss +++ b/templates/PlasticStudio/Search/Layout/SearchPage.ss @@ -1,4 +1,3 @@ -
$AdvancedSearchForm