@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Minor updates to PhameBlogSearch

Summary: Use Profile Image, remove skin, show domain info better, add New Post button. Ref T9897

Test Plan: Test new buttons, see new images.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9897

Differential Revision: https://secure.phabricator.com/D14671

+18 -11
+18 -11
src/applications/phame/query/PhameBlogSearchEngine.php
··· 12 12 } 13 13 14 14 public function newQuery() { 15 - return new PhameBlogQuery(); 15 + return id(new PhameBlogQuery()) 16 + ->needProfileImage(true); 16 17 } 17 18 18 19 protected function buildQueryFromParameters(array $map) { ··· 78 79 $list->setUser($viewer); 79 80 80 81 foreach ($blogs as $blog) { 81 - $archived = false; 82 - $icon = 'fa-star'; 83 - if ($blog->isArchived()) { 84 - $archived = true; 85 - $icon = 'fa-ban'; 82 + $id = $blog->getID(); 83 + if ($blog->getDomain()) { 84 + $domain = $blog->getDomain(); 85 + } else { 86 + $domain = pht('Local Blog'); 86 87 } 87 - $id = $blog->getID(); 88 88 $item = id(new PHUIObjectItemView()) 89 89 ->setUser($viewer) 90 90 ->setObject($blog) 91 91 ->setHeader($blog->getName()) 92 - ->setStatusIcon($icon) 93 - ->setDisabled($archived) 92 + ->setImageURI($blog->getProfileImageURI()) 93 + ->setDisabled($blog->isArchived()) 94 94 ->setHref($this->getApplicationURI("/blog/view/{$id}/")) 95 - ->addAttribute($blog->getSkin()) 96 - ->addAttribute($blog->getDomain()); 95 + ->addAttribute($domain); 96 + if (!$blog->isArchived()) { 97 + $button = id(new PHUIButtonView()) 98 + ->setTag('a') 99 + ->setText('New Post') 100 + ->setHref($this->getApplicationURI('/post/edit/?blog='.$id)); 101 + $item->setLaunchButton($button); 102 + } 103 + 97 104 $list->addItem($item); 98 105 } 99 106