diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 42b6975c02..2678885909 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -1433,6 +1433,7 @@ phutil_register_library_map(array( 'NuancePhabricatorFormSourceDefinition' => 'applications/nuance/source/NuancePhabricatorFormSourceDefinition.php', 'NuanceQuery' => 'applications/nuance/query/NuanceQuery.php', 'NuanceQueue' => 'applications/nuance/storage/NuanceQueue.php', + 'NuanceQueueController' => 'applications/nuance/controller/NuanceQueueController.php', 'NuanceQueueDatasource' => 'applications/nuance/typeahead/NuanceQueueDatasource.php', 'NuanceQueueEditController' => 'applications/nuance/controller/NuanceQueueEditController.php', 'NuanceQueueEditor' => 'applications/nuance/editor/NuanceQueueEditor.php', @@ -1457,6 +1458,7 @@ phutil_register_library_map(array( 'NuanceSchemaSpec' => 'applications/nuance/storage/NuanceSchemaSpec.php', 'NuanceSource' => 'applications/nuance/storage/NuanceSource.php', 'NuanceSourceActionController' => 'applications/nuance/controller/NuanceSourceActionController.php', + 'NuanceSourceController' => 'applications/nuance/controller/NuanceSourceController.php', 'NuanceSourceCreateController' => 'applications/nuance/controller/NuanceSourceCreateController.php', 'NuanceSourceDefaultEditCapability' => 'applications/nuance/capability/NuanceSourceDefaultEditCapability.php', 'NuanceSourceDefaultViewCapability' => 'applications/nuance/capability/NuanceSourceDefaultViewCapability.php', @@ -5678,17 +5680,18 @@ phutil_register_library_map(array( 'PhabricatorPolicyInterface', 'PhabricatorApplicationTransactionInterface', ), + 'NuanceQueueController' => 'NuanceController', 'NuanceQueueDatasource' => 'PhabricatorTypeaheadDatasource', - 'NuanceQueueEditController' => 'NuanceController', + 'NuanceQueueEditController' => 'NuanceQueueController', 'NuanceQueueEditor' => 'PhabricatorApplicationTransactionEditor', - 'NuanceQueueListController' => 'NuanceController', + 'NuanceQueueListController' => 'NuanceQueueController', 'NuanceQueuePHIDType' => 'PhabricatorPHIDType', 'NuanceQueueQuery' => 'NuanceQuery', 'NuanceQueueSearchEngine' => 'PhabricatorApplicationSearchEngine', 'NuanceQueueTransaction' => 'NuanceTransaction', 'NuanceQueueTransactionComment' => 'PhabricatorApplicationTransactionComment', 'NuanceQueueTransactionQuery' => 'PhabricatorApplicationTransactionQuery', - 'NuanceQueueViewController' => 'NuanceController', + 'NuanceQueueViewController' => 'NuanceQueueController', 'NuanceRequestor' => array( 'NuanceDAO', 'PhabricatorPolicyInterface', @@ -5710,14 +5713,15 @@ phutil_register_library_map(array( 'PhabricatorPolicyInterface', ), 'NuanceSourceActionController' => 'NuanceController', - 'NuanceSourceCreateController' => 'NuanceController', + 'NuanceSourceController' => 'NuanceController', + 'NuanceSourceCreateController' => 'NuanceSourceController', 'NuanceSourceDefaultEditCapability' => 'PhabricatorPolicyCapability', 'NuanceSourceDefaultViewCapability' => 'PhabricatorPolicyCapability', 'NuanceSourceDefinition' => 'Phobject', 'NuanceSourceDefinitionTestCase' => 'PhabricatorTestCase', - 'NuanceSourceEditController' => 'NuanceController', + 'NuanceSourceEditController' => 'NuanceSourceController', 'NuanceSourceEditor' => 'PhabricatorApplicationTransactionEditor', - 'NuanceSourceListController' => 'NuanceController', + 'NuanceSourceListController' => 'NuanceSourceController', 'NuanceSourceManageCapability' => 'PhabricatorPolicyCapability', 'NuanceSourcePHIDType' => 'PhabricatorPHIDType', 'NuanceSourceQuery' => 'NuanceQuery', @@ -5725,7 +5729,7 @@ phutil_register_library_map(array( 'NuanceSourceTransaction' => 'NuanceTransaction', 'NuanceSourceTransactionComment' => 'PhabricatorApplicationTransactionComment', 'NuanceSourceTransactionQuery' => 'PhabricatorApplicationTransactionQuery', - 'NuanceSourceViewController' => 'NuanceController', + 'NuanceSourceViewController' => 'NuanceSourceController', 'NuanceTransaction' => 'PhabricatorApplicationTransaction', 'OwnersConduitAPIMethod' => 'ConduitAPIMethod', 'OwnersEditConduitAPIMethod' => 'PhabricatorEditEngineAPIMethod', diff --git a/src/applications/nuance/controller/NuanceQueueController.php b/src/applications/nuance/controller/NuanceQueueController.php new file mode 100644 index 0000000000..5736c9a234 --- /dev/null +++ b/src/applications/nuance/controller/NuanceQueueController.php @@ -0,0 +1,11 @@ +newApplicationMenu() + ->setSearchEngine(new NuanceQueueSearchEngine()); + } + +} diff --git a/src/applications/nuance/controller/NuanceQueueEditController.php b/src/applications/nuance/controller/NuanceQueueEditController.php index cfb657615d..3091cf384d 100644 --- a/src/applications/nuance/controller/NuanceQueueEditController.php +++ b/src/applications/nuance/controller/NuanceQueueEditController.php @@ -1,6 +1,7 @@ getViewer(); diff --git a/src/applications/nuance/controller/NuanceQueueListController.php b/src/applications/nuance/controller/NuanceQueueListController.php index e139386bdf..d2372dbe3a 100644 --- a/src/applications/nuance/controller/NuanceQueueListController.php +++ b/src/applications/nuance/controller/NuanceQueueListController.php @@ -1,31 +1,12 @@ getRequest(); - $controller = id(new PhabricatorApplicationSearchController($request)) - ->setQueryKey($request->getURIData('queryKey')) - ->setSearchEngine(new NuanceQueueSearchEngine()) - ->setNavigation($this->buildSideNavView()); - - return $this->delegateToController($controller); - } - - public function buildSideNavView($for_app = false) { - $user = $this->getRequest()->getUser(); - - $nav = new AphrontSideNavFilterView(); - $nav->setBaseURI(new PhutilURI($this->getApplicationURI())); - - id(new NuanceQueueSearchEngine()) - ->setViewer($user) - ->addNavigationItems($nav->getMenu()); - - $nav->selectFilter(null); - - return $nav; + return id(new NuanceQueueSearchEngine()) + ->setController($this) + ->buildResponse(); } protected function buildApplicationCrumbs() { diff --git a/src/applications/nuance/controller/NuanceQueueViewController.php b/src/applications/nuance/controller/NuanceQueueViewController.php index 71e5e04ce7..a5fa908c4a 100644 --- a/src/applications/nuance/controller/NuanceQueueViewController.php +++ b/src/applications/nuance/controller/NuanceQueueViewController.php @@ -1,6 +1,7 @@ getViewer(); diff --git a/src/applications/nuance/controller/NuanceSourceController.php b/src/applications/nuance/controller/NuanceSourceController.php new file mode 100644 index 0000000000..c3b73376b5 --- /dev/null +++ b/src/applications/nuance/controller/NuanceSourceController.php @@ -0,0 +1,11 @@ +newApplicationMenu() + ->setSearchEngine(new NuanceSourceSearchEngine()); + } + +} diff --git a/src/applications/nuance/controller/NuanceSourceCreateController.php b/src/applications/nuance/controller/NuanceSourceCreateController.php index 22dd41024c..fb02fe6bbd 100644 --- a/src/applications/nuance/controller/NuanceSourceCreateController.php +++ b/src/applications/nuance/controller/NuanceSourceCreateController.php @@ -1,6 +1,7 @@ requireApplicationCapability( diff --git a/src/applications/nuance/controller/NuanceSourceEditController.php b/src/applications/nuance/controller/NuanceSourceEditController.php index 18234bc778..b4dff7fc48 100644 --- a/src/applications/nuance/controller/NuanceSourceEditController.php +++ b/src/applications/nuance/controller/NuanceSourceEditController.php @@ -1,6 +1,7 @@ requireApplicationCapability( diff --git a/src/applications/nuance/controller/NuanceSourceListController.php b/src/applications/nuance/controller/NuanceSourceListController.php index 1d906dc3d3..f18ed66706 100644 --- a/src/applications/nuance/controller/NuanceSourceListController.php +++ b/src/applications/nuance/controller/NuanceSourceListController.php @@ -1,31 +1,12 @@ getRequest(); - $controller = id(new PhabricatorApplicationSearchController($request)) - ->setQueryKey($request->getURIData('queryKey')) - ->setSearchEngine(new NuanceSourceSearchEngine()) - ->setNavigation($this->buildSideNavView()); - - return $this->delegateToController($controller); - } - - public function buildSideNavView($for_app = false) { - $user = $this->getRequest()->getUser(); - - $nav = new AphrontSideNavFilterView(); - $nav->setBaseURI(new PhutilURI($this->getApplicationURI())); - - id(new NuanceSourceSearchEngine()) - ->setViewer($user) - ->addNavigationItems($nav->getMenu()); - - $nav->selectFilter(null); - - return $nav; + return id(new NuanceSourceSearchEngine()) + ->setController($this) + ->buildResponse(); } protected function buildApplicationCrumbs() { diff --git a/src/applications/nuance/controller/NuanceSourceViewController.php b/src/applications/nuance/controller/NuanceSourceViewController.php index 78d6949455..90eaea8046 100644 --- a/src/applications/nuance/controller/NuanceSourceViewController.php +++ b/src/applications/nuance/controller/NuanceSourceViewController.php @@ -1,6 +1,7 @@ getViewer();