2011-06-13 01:06:17 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
abstract class PhabricatorCountdownController extends PhabricatorController {
|
|
|
|
|
2013-07-23 15:16:19 +02:00
|
|
|
public function buildSideNavView($for_app = false) {
|
2013-02-25 21:48:55 +01:00
|
|
|
$user = $this->getRequest()->getUser();
|
2011-06-13 01:06:17 +02:00
|
|
|
|
2013-02-25 21:48:55 +01:00
|
|
|
$nav = new AphrontSideNavFilterView();
|
|
|
|
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
|
2011-06-13 01:06:17 +02:00
|
|
|
|
2013-07-23 15:16:19 +02:00
|
|
|
if ($for_app) {
|
|
|
|
$nav->addFilter('create', pht('Create Countdown'));
|
|
|
|
}
|
|
|
|
|
|
|
|
id(new PhabricatorCountdownSearchEngine())
|
|
|
|
->setViewer($user)
|
|
|
|
->addNavigationItems($nav->getMenu());
|
|
|
|
|
|
|
|
$nav->selectFilter(null);
|
2011-06-13 01:06:17 +02:00
|
|
|
|
2013-02-25 21:48:55 +01:00
|
|
|
return $nav;
|
|
|
|
}
|
|
|
|
|
2015-01-06 21:34:58 +01:00
|
|
|
protected function buildApplicationMenu() {
|
2013-07-23 15:16:19 +02:00
|
|
|
return $this->buildSideNavView($for_app = true)->getMenu();
|
2013-02-25 21:48:55 +01:00
|
|
|
}
|
|
|
|
|
2015-01-06 21:34:58 +01:00
|
|
|
protected function buildApplicationCrumbs() {
|
2013-02-25 21:48:55 +01:00
|
|
|
$crumbs = parent::buildApplicationCrumbs();
|
2011-06-13 01:06:17 +02:00
|
|
|
|
2013-02-25 21:48:55 +01:00
|
|
|
$crumbs->addAction(
|
2013-06-05 17:41:43 +02:00
|
|
|
id(new PHUIListItemView())
|
2013-05-04 00:49:29 +02:00
|
|
|
->setName(pht('Create Countdown'))
|
2013-02-25 21:48:55 +01:00
|
|
|
->setHref($this->getApplicationURI('edit/'))
|
2014-05-12 19:08:32 +02:00
|
|
|
->setIcon('fa-plus-square'));
|
2011-06-13 01:06:17 +02:00
|
|
|
|
2013-02-25 21:48:55 +01:00
|
|
|
return $crumbs;
|
2011-06-13 01:06:17 +02:00
|
|
|
}
|
2014-07-10 00:12:48 +02:00
|
|
|
|
2011-06-13 01:06:17 +02:00
|
|
|
}
|