Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / legalpad / controller / LegalpadDocumentListController.php
blob852f71970d1be4f367f597eab16f5f8dab53b476
1 <?php
3 final class LegalpadDocumentListController extends LegalpadController {
5 public function shouldAllowPublic() {
6 return true;
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);
26 $crumbs->addAction(
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));
35 return $crumbs;