Summary: Refreshes feed's design a bit, adds app icons, works nicer on mobile. Test Plan: Tested many feed stories, not sure I got them all, but seems fine. Reviewers: epriestley, btrahan Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5673
41 lines
1 KiB
PHP
41 lines
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() {
|
|
$nav = new AphrontSideNavFilterView();
|
|
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
|
|
|
|
$nav->addLabel(pht('Feed'));
|
|
$nav->addFilter('all', pht('All Activity'));
|
|
$nav->addFilter('projects', pht('My Projects'));
|
|
|
|
return $nav;
|
|
}
|
|
|
|
protected function buildApplicationMenu() {
|
|
return $this->buildSideNavView()->getMenu();
|
|
}
|
|
|
|
}
|