Something went wrong. Try again.
@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
Something went wrong. Try again.
1.0 kB · 38 lines
PHP
123456789101112131415161718192021222324252627282930313233343536373839<?php
final class LegalpadDocumentListController extends LegalpadController {
public function shouldAllowPublic() { return true; }
public function handleRequest(AphrontRequest $request) { $querykey = $request->getURIData('queryKey');
$controller = id(new PhabricatorApplicationSearchController()) ->setQueryKey($querykey) ->setSearchEngine(new LegalpadDocumentSearchEngine()) ->setNavigation($this->buildSideNav());
return $this->delegateToController($controller); }
protected function buildApplicationCrumbs() { $crumbs = parent::buildApplicationCrumbs();
$can_create = $this->hasApplicationCapability( LegalpadCreateDocumentsCapability::CAPABILITY);
$crumbs->addAction( id(new PHUIListItemView()) ->setName(pht('Create Document')) ->setHref($this->getApplicationURI('edit/')) ->setIcon('fa-plus-square') ->setDisabled(!$can_create) ->setWorkflow(!$can_create));
return $crumbs; }
}