Modernize Phame
Summary: Adds crumbs, mobile layouts, mobile navs, phts Test Plan: Tested Phame in iOS and Chrome Reviewers: epriestley, btrahan Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5684
This commit is contained in:
@@ -12,18 +12,18 @@ abstract class PhameController extends PhabricatorController {
|
||||
$nav = new AphrontSideNavFilterView();
|
||||
$nav->setBaseURI($base_uri);
|
||||
|
||||
$nav->addLabel('Create');
|
||||
$nav->addFilter('post/new', 'New Post');
|
||||
$nav->addFilter('blog/new', 'New Blog');
|
||||
$nav->addLabel(pht('Create'));
|
||||
$nav->addFilter('post/new', pht('New Post'));
|
||||
$nav->addFilter('blog/new', pht('New Blog'));
|
||||
|
||||
$nav->addLabel('Posts');
|
||||
$nav->addFilter('post/draft', 'My Drafts');
|
||||
$nav->addFilter('post', 'My Posts');
|
||||
$nav->addFilter('post/all', 'All Posts');
|
||||
$nav->addLabel(pht('Posts'));
|
||||
$nav->addFilter('post/draft', pht('My Drafts'));
|
||||
$nav->addFilter('post', pht('My Posts'));
|
||||
$nav->addFilter('post/all', pht('All Posts'));
|
||||
|
||||
$nav->addLabel('Blogs');
|
||||
$nav->addFilter('blog/user', 'Joinable Blogs');
|
||||
$nav->addFilter('blog/all', 'All Blogs');
|
||||
$nav->addLabel(pht('Blogs'));
|
||||
$nav->addFilter('blog/user', pht('Joinable Blogs'));
|
||||
$nav->addFilter('blog/all', pht('All Blogs'));
|
||||
|
||||
$nav->selectFilter(null);
|
||||
|
||||
@@ -70,10 +70,28 @@ abstract class PhameController extends PhabricatorController {
|
||||
$desc = pht('Published on %s by %s', $published, $blogger);
|
||||
}
|
||||
$item->addAttribute($desc);
|
||||
|
||||
$list->addItem($item);
|
||||
}
|
||||
|
||||
return $list;
|
||||
}
|
||||
|
||||
public function buildApplicationMenu() {
|
||||
return $this->renderSideNavFilterView()->getMenu();
|
||||
}
|
||||
|
||||
protected function buildApplicationCrumbs() {
|
||||
$crumbs = parent::buildApplicationCrumbs();
|
||||
$crumbs->addAction(
|
||||
id(new PhabricatorMenuItemView())
|
||||
->setName(pht('New Blog'))
|
||||
->setHref($this->getApplicationURI('/blog/new'))
|
||||
->setIcon('create'));
|
||||
$crumbs->addAction(
|
||||
id(new PhabricatorMenuItemView())
|
||||
->setName(pht('New Post'))
|
||||
->setHref($this->getApplicationURI('/post/new'))
|
||||
->setIcon('new'));
|
||||
return $crumbs;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user