3 final class LegalpadDocumentListController
extends LegalpadController
{
5 public function shouldAllowPublic() {
9 public function handleRequest(AphrontRequest
$request) {
10 $querykey = $request->getURIData('queryKey');
12 $controller = id(new PhabricatorApplicationSearchController())
13 ->setQueryKey($querykey)
14 ->setSearchEngine(new LegalpadDocumentSearchEngine())
15 ->setNavigation($this->buildSideNav());
17 return $this->delegateToController($controller);
20 protected function buildApplicationCrumbs() {
21 $crumbs = parent
::buildApplicationCrumbs();
23 $can_create = $this->hasApplicationCapability(
24 LegalpadCreateDocumentsCapability
::CAPABILITY
);
27 id(new PHUIListItemView())
28 ->setName(pht('Create Document'))
29 ->setHref($this->getApplicationURI('edit/'))
30 ->setIcon('fa-plus-square')
31 ->setDisabled(!$can_create)
32 ->setWorkflow(!$can_create));