mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-28 01:32:42 +01:00
77ababadcb
Summary: Updates Legalpad for handleRequest instead of processRequest Test Plan: New Document, Sign Document, Add exemption, view signatures. Reviewers: epriestley Reviewed By: epriestley Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D13756
38 lines
1,011 B
PHP
38 lines
1,011 B
PHP
<?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('create/'))
|
|
->setIcon('fa-plus-square')
|
|
->setDisabled(!$can_create)
|
|
->setWorkflow(!$can_create));
|
|
|
|
|
|
return $crumbs;
|
|
}
|
|
|
|
}
|