Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15410933
D17883.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D17883.diff
View Options
diff --git a/src/applications/project/controller/PhabricatorProjectProfileController.php b/src/applications/project/controller/PhabricatorProjectProfileController.php
--- a/src/applications/project/controller/PhabricatorProjectProfileController.php
+++ b/src/applications/project/controller/PhabricatorProjectProfileController.php
@@ -259,8 +259,6 @@
->setViewer($viewer)
->withParentProjectPHIDs(array($project->getPHID()))
->needImages(true)
- ->needMembers(true)
- ->needWatchers(true)
->withStatuses(
array(
PhabricatorProjectStatus::STATUS_ACTIVE,
diff --git a/src/applications/project/controller/PhabricatorProjectSubprojectsController.php b/src/applications/project/controller/PhabricatorProjectSubprojectsController.php
--- a/src/applications/project/controller/PhabricatorProjectSubprojectsController.php
+++ b/src/applications/project/controller/PhabricatorProjectSubprojectsController.php
@@ -31,8 +31,6 @@
->setViewer($viewer)
->withParentProjectPHIDs(array($project->getPHID()))
->needImages(true)
- ->needMembers(true)
- ->needWatchers(true)
->withIsMilestone(false)
->execute();
} else {
@@ -44,8 +42,6 @@
->setViewer($viewer)
->withParentProjectPHIDs(array($project->getPHID()))
->needImages(true)
- ->needMembers(true)
- ->needWatchers(true)
->withIsMilestone(true)
->setOrderVector(array('milestoneNumber', 'id'))
->execute();
diff --git a/src/applications/project/query/PhabricatorProjectSearchEngine.php b/src/applications/project/query/PhabricatorProjectSearchEngine.php
--- a/src/applications/project/query/PhabricatorProjectSearchEngine.php
+++ b/src/applications/project/query/PhabricatorProjectSearchEngine.php
@@ -229,6 +229,8 @@
$list = id(new PhabricatorProjectListView())
->setUser($viewer)
->setProjects($projects)
+ ->setShowWatching(true)
+ ->setShowMember(true)
->renderList();
return id(new PhabricatorApplicationSearchResultView())
diff --git a/src/applications/project/view/PhabricatorProjectListView.php b/src/applications/project/view/PhabricatorProjectListView.php
--- a/src/applications/project/view/PhabricatorProjectListView.php
+++ b/src/applications/project/view/PhabricatorProjectListView.php
@@ -3,6 +3,8 @@
final class PhabricatorProjectListView extends AphrontView {
private $projects;
+ private $showMember;
+ private $showWatching;
public function setProjects(array $projects) {
$this->projects = $projects;
@@ -13,6 +15,16 @@
return $this->projects;
}
+ public function setShowWatching($watching) {
+ $this->showWatching = $watching;
+ return $this;
+ }
+
+ public function setShowMember($member) {
+ $this->showMember = $member;
+ return $this;
+ }
+
public function renderList() {
$viewer = $this->getUser();
$viewer_phid = $viewer->getPHID();
@@ -48,15 +60,18 @@
$item->setDisabled(true);
}
- $is_member = $project->isUserMember($viewer_phid);
- $is_watcher = $project->isUserWatcher($viewer_phid);
-
- if ($is_member) {
- $item->addIcon('fa-user', pht('Member'));
+ if ($this->showMember) {
+ $is_member = $project->isUserMember($viewer_phid);
+ if ($is_member) {
+ $item->addIcon('fa-user', pht('Member'));
+ }
}
- if ($is_watcher) {
- $item->addIcon('fa-eye', pht('Watching'));
+ if ($this->showWatching) {
+ $is_watcher = $project->isUserWatcher($viewer_phid);
+ if ($is_watcher) {
+ $item->addIcon('fa-eye', pht('Watching'));
+ }
}
$list->addItem($item);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 20, 8:43 AM (1 d, 2 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7705003
Default Alt Text
D17883.diff (3 KB)
Attached To
Mode
D17883: Restrict watching and member project display better
Attached
Detach File
Event Timeline
Log In to Comment