2011-06-13 01:06:17 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
abstract class PhabricatorCountdownController extends PhabricatorController {
|
|
|
|
|
2013-02-25 21:48:55 +01:00
|
|
|
public function buildSideNavView() {
|
|
|
|
$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-05-04 00:49:29 +02:00
|
|
|
$nav->addFilter('', pht('All Countdowns'),
|
2013-02-25 21:48:55 +01:00
|
|
|
$this->getApplicationURI(''));
|
2013-05-04 00:49:29 +02:00
|
|
|
$nav->addFilter('', pht('Create Countdown'),
|
2013-02-25 21:48:55 +01:00
|
|
|
$this->getApplicationURI('edit/'));
|
2011-06-13 01:06:17 +02:00
|
|
|
|
2013-02-25 21:48:55 +01:00
|
|
|
return $nav;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function buildApplicationMenu() {
|
|
|
|
return $this->buildSideNavView()->getMenu();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function buildApplicationCrumbs() {
|
|
|
|
$crumbs = parent::buildApplicationCrumbs();
|
2011-06-13 01:06:17 +02:00
|
|
|
|
2013-02-25 21:48:55 +01:00
|
|
|
$crumbs->addAction(
|
|
|
|
id(new PhabricatorMenuItemView())
|
2013-05-04 00:49:29 +02:00
|
|
|
->setName(pht('Create Countdown'))
|
2013-02-25 21:48:55 +01:00
|
|
|
->setHref($this->getApplicationURI('edit/'))
|
|
|
|
->setIcon('create'));
|
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
|
|
|
}
|
|
|
|
}
|