2013-07-03 20:15:45 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
abstract class LegalpadController extends PhabricatorController {
|
|
|
|
|
|
|
|
public function buildSideNav($for_app = false) {
|
|
|
|
$user = $this->getRequest()->getUser();
|
|
|
|
|
|
|
|
$nav = new AphrontSideNavFilterView();
|
|
|
|
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
|
|
|
|
|
|
|
|
if ($for_app) {
|
2017-05-11 00:11:39 +02:00
|
|
|
$nav->addFilter('edit/', pht('Create Document'));
|
2013-07-03 20:15:45 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
id(new LegalpadDocumentSearchEngine())
|
|
|
|
->setViewer($user)
|
|
|
|
->addNavigationItems($nav->getMenu());
|
|
|
|
|
2014-06-29 01:37:36 +02:00
|
|
|
$nav->addLabel(pht('Signatures'));
|
|
|
|
$nav->addFilter('signatures/', pht('Find Signatures'));
|
|
|
|
|
2013-07-03 20:15:45 +02:00
|
|
|
return $nav;
|
|
|
|
}
|
|
|
|
|
2015-01-15 21:41:26 +01:00
|
|
|
public function buildApplicationMenu() {
|
2013-07-03 20:15:45 +02:00
|
|
|
return $this->buildSideNav(true)->getMenu();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|