mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-03 04:02:43 +01:00
7ab7783ad3
Summary: Crumbs, phts, and mobile layouts for Countdown. Test Plan: Tested new, edit and delete timer. Verified timer works. Unable to get 'remove chrome' to work, will investigate. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5101
34 lines
873 B
PHP
34 lines
873 B
PHP
<?php
|
|
|
|
abstract class PhabricatorCountdownController extends PhabricatorController {
|
|
|
|
public function buildSideNavView() {
|
|
$user = $this->getRequest()->getUser();
|
|
|
|
$nav = new AphrontSideNavFilterView();
|
|
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
|
|
|
|
$nav->addFilter('', pht('All Timers'),
|
|
$this->getApplicationURI(''));
|
|
$nav->addFilter('', pht('Create Timer'),
|
|
$this->getApplicationURI('edit/'));
|
|
|
|
return $nav;
|
|
}
|
|
|
|
public function buildApplicationMenu() {
|
|
return $this->buildSideNavView()->getMenu();
|
|
}
|
|
|
|
public function buildApplicationCrumbs() {
|
|
$crumbs = parent::buildApplicationCrumbs();
|
|
|
|
$crumbs->addAction(
|
|
id(new PhabricatorMenuItemView())
|
|
->setName(pht('Create Timer'))
|
|
->setHref($this->getApplicationURI('edit/'))
|
|
->setIcon('create'));
|
|
|
|
return $crumbs;
|
|
}
|
|
}
|