@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.

Add Member/Watcher info to search results

Summary: Fixes T12707 Adds additional information to search results for if user is a member or a watcher of a project. Also removed the icon colors, which I'll find a better way to denote in future.

Test Plan: Join a project, watch a project, view results list in /projects/

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T12707

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

+16 -4
+3 -1
src/applications/project/query/PhabricatorProjectSearchEngine.php
··· 13 13 14 14 public function newQuery() { 15 15 return id(new PhabricatorProjectQuery()) 16 - ->needImages(true); 16 + ->needImages(true) 17 + ->needMembers(true) 18 + ->needWatchers(true); 17 19 } 18 20 19 21 protected function buildCustomSearchFields() {
+13 -3
src/applications/project/view/PhabricatorProjectListView.php
··· 15 15 16 16 public function renderList() { 17 17 $viewer = $this->getUser(); 18 + $viewer_phid = $viewer->getPHID(); 18 19 $projects = $this->getProjects(); 19 20 20 21 $handles = $viewer->loadHandles(mpull($projects, 'getPHID')); ··· 26 27 $id = $project->getID(); 27 28 28 29 $icon = $project->getDisplayIconIcon(); 29 - $color = $project->getColor(); 30 - 31 30 $icon_icon = id(new PHUIIconView()) 32 - ->setIcon("{$icon} {$color}"); 31 + ->setIcon($icon); 33 32 34 33 $icon_name = $project->getDisplayIconName(); 35 34 ··· 47 46 if ($project->getStatus() == PhabricatorProjectStatus::STATUS_ARCHIVED) { 48 47 $item->addIcon('delete-grey', pht('Archived')); 49 48 $item->setDisabled(true); 49 + } 50 + 51 + $is_member = $project->isUserMember($viewer_phid); 52 + $is_watcher = $project->isUserWatcher($viewer_phid); 53 + 54 + if ($is_member) { 55 + $item->addIcon('fa-user', pht('Member')); 56 + } 57 + 58 + if ($is_watcher) { 59 + $item->addIcon('fa-eye', pht('Watching')); 50 60 } 51 61 52 62 $list->addItem($item);