mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-13 18:32:41 +01:00
42af0d66d9
Summary: Ref T2625. This doesn't do anything fancy, but gives feed a little more flexibility. Test Plan: Viewed `/feed/`. Reviewers: btrahan, chad Reviewed By: chad CC: aran Maniphest Tasks: T2625 Differential Revision: https://secure.phabricator.com/D6681
44 lines
1.1 KiB
PHP
44 lines
1.1 KiB
PHP
<?php
|
|
|
|
abstract class PhabricatorFeedController extends PhabricatorController {
|
|
|
|
public function buildStandardPageResponse($view, array $data) {
|
|
$page = $this->buildStandardPageView();
|
|
|
|
$page->setApplicationName(pht('Feed'));
|
|
$page->setBaseURI('/feed/');
|
|
$page->setTitle(idx($data, 'title'));
|
|
$page->setGlyph("\xE2\x88\x9E");
|
|
$page->appendChild($view);
|
|
|
|
$response = new AphrontWebpageResponse();
|
|
|
|
if (!empty($data['public'])) {
|
|
$page->setFrameable(true);
|
|
$page->setShowChrome(false);
|
|
$response->setFrameable(true);
|
|
}
|
|
|
|
return $response->setContent($page->render());
|
|
}
|
|
|
|
protected function buildSideNavView() {
|
|
$user = $this->getRequest()->getUser();
|
|
|
|
$nav = new AphrontSideNavFilterView();
|
|
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
|
|
|
|
id(new PhabricatorFeedSearchEngine())
|
|
->setViewer($user)
|
|
->addNavigationItems($nav->getMenu());
|
|
|
|
$nav->selectFilter(null);
|
|
|
|
return $nav;
|
|
}
|
|
|
|
protected function buildApplicationMenu() {
|
|
return $this->buildSideNavView()->getMenu();
|
|
}
|
|
|
|
}
|