mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-25 00:02:41 +01:00
c026152833
Summary: Poked through the Drydock controllers and updated the codes. Test Plan: Built random fake stuff in Drydock Reviewers: epriestley Reviewed By: epriestley Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D13731
36 lines
1 KiB
PHP
36 lines
1 KiB
PHP
<?php
|
|
|
|
final class DrydockBlueprintListController extends DrydockBlueprintController {
|
|
|
|
public function shouldAllowPublic() {
|
|
return true;
|
|
}
|
|
|
|
public function handleRequest(AphrontRequest $request) {
|
|
$querykey = $request->getURIData('queryKey');
|
|
|
|
$request = $this->getRequest();
|
|
$controller = id(new PhabricatorApplicationSearchController())
|
|
->setQueryKey($querykey)
|
|
->setSearchEngine(new DrydockBlueprintSearchEngine())
|
|
->setNavigation($this->buildSideNavView());
|
|
|
|
return $this->delegateToController($controller);
|
|
}
|
|
|
|
protected function buildApplicationCrumbs() {
|
|
$can_create = $this->hasApplicationCapability(
|
|
DrydockCreateBlueprintsCapability::CAPABILITY);
|
|
|
|
$crumbs = parent::buildApplicationCrumbs();
|
|
$crumbs->addAction(
|
|
id(new PHUIListItemView())
|
|
->setName(pht('New Blueprint'))
|
|
->setHref($this->getApplicationURI('/blueprint/create/'))
|
|
->setDisabled(!$can_create)
|
|
->setWorkflow(!$can_create)
|
|
->setIcon('fa-plus-square'));
|
|
return $crumbs;
|
|
}
|
|
|
|
}
|