mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 19:40:55 +01:00
b32a00dbac
Summary: Updates Legalpad to use EditEngine, paving the way for //transaction comments//. Spooky. Test Plan: - New Document - Require signing, Corp - see fail - Require signing, Noone - see fail - Require signing, Ind - get asked to sign - Edit Document Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D17862
38 lines
1,009 B
PHP
38 lines
1,009 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('edit/'))
|
|
->setIcon('fa-plus-square')
|
|
->setDisabled(!$can_create)
|
|
->setWorkflow(!$can_create));
|
|
|
|
|
|
return $crumbs;
|
|
}
|
|
|
|
}
|