Page MenuHomePhabricator

D14701.id.diff
No OneTemporary

D14701.id.diff

diff --git a/src/applications/phame/controller/PhameHomeController.php b/src/applications/phame/controller/PhameHomeController.php
--- a/src/applications/phame/controller/PhameHomeController.php
+++ b/src/applications/phame/controller/PhameHomeController.php
@@ -9,20 +9,28 @@
public function handleRequest(AphrontRequest $request) {
$viewer = $request->getViewer();
+ $blogs = id(new PhameBlogQuery())
+ ->setViewer($viewer)
+ ->withStatuses(array(PhameBlog::STATUS_ACTIVE))
+ ->execute();
+
+ $blog_phids = mpull($blogs, 'getPHID');
+
$pager = id(new AphrontCursorPagerView())
->readFromRequest($request);
$posts = id(new PhamePostQuery())
->setViewer($viewer)
+ ->withBlogPHIDs($blog_phids)
->withVisibility(PhameConstants::VISIBILITY_PUBLISHED)
->executeWithCursorPager($pager);
$actions = $this->renderActions($viewer);
$action_button = id(new PHUIButtonView())
->setTag('a')
- ->setText(pht('Search'))
+ ->setText(pht('Actions'))
->setHref('#')
- ->setIconFont('fa-search')
+ ->setIconFont('fa-bars')
->addClass('phui-mobile-menu')
->setDropdownMenu($actions);
@@ -65,15 +73,21 @@
$actions->addAction(
id(new PhabricatorActionView())
+ ->setIcon('fa-pencil')
+ ->setHref($this->getApplicationURI('post/query/draft/'))
+ ->setName(pht('My Drafts')));
+
+ $actions->addAction(
+ id(new PhabricatorActionView())
->setIcon('fa-pencil-square-o')
->setHref($this->getApplicationURI('post/'))
- ->setName(pht('Find Posts')));
+ ->setName(pht('All Posts')));
$actions->addAction(
id(new PhabricatorActionView())
->setIcon('fa-star')
->setHref($this->getApplicationURI('blog/'))
- ->setName(pht('Find Blogs')));
+ ->setName(pht('Active Blogs')));
return $actions;
}

File Metadata

Mime Type
text/plain
Expires
Mar 14 2025, 8:50 PM (5 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7227936
Default Alt Text
D14701.id.diff (1 KB)

Event Timeline