mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-02 03:32:42 +01:00
Only show member/watcher notes on Members page in Projects
Summary: Restricts the view of the membership privileges to just the Members page itself, and not other pages like Home/Details. Test Plan: Test Home, Test Members, see correct layouts. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D17896
This commit is contained in:
parent
1e47ba2481
commit
ef839192aa
2 changed files with 17 additions and 7 deletions
|
@ -26,13 +26,15 @@ final class PhabricatorProjectMembersViewController
|
||||||
->setUser($viewer)
|
->setUser($viewer)
|
||||||
->setProject($project)
|
->setProject($project)
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->setUserPHIDs($project->getMemberPHIDs());
|
->setUserPHIDs($project->getMemberPHIDs())
|
||||||
|
->setShowNote(true);
|
||||||
|
|
||||||
$watcher_list = id(new PhabricatorProjectWatcherListView())
|
$watcher_list = id(new PhabricatorProjectWatcherListView())
|
||||||
->setUser($viewer)
|
->setUser($viewer)
|
||||||
->setProject($project)
|
->setProject($project)
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||||
->setUserPHIDs($project->getWatcherPHIDs());
|
->setUserPHIDs($project->getWatcherPHIDs())
|
||||||
|
->setShowNote(true);
|
||||||
|
|
||||||
$nav = $this->getProfileMenu();
|
$nav = $this->getProfileMenu();
|
||||||
$nav->selectFilter(PhabricatorProject::ITEM_MEMBERS);
|
$nav->selectFilter(PhabricatorProject::ITEM_MEMBERS);
|
||||||
|
|
|
@ -6,6 +6,7 @@ abstract class PhabricatorProjectUserListView extends AphrontView {
|
||||||
private $userPHIDs;
|
private $userPHIDs;
|
||||||
private $limit;
|
private $limit;
|
||||||
private $background;
|
private $background;
|
||||||
|
private $showNote;
|
||||||
|
|
||||||
public function setProject(PhabricatorProject $project) {
|
public function setProject(PhabricatorProject $project) {
|
||||||
$this->project = $project;
|
$this->project = $project;
|
||||||
|
@ -39,6 +40,11 @@ abstract class PhabricatorProjectUserListView extends AphrontView {
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setShowNote($show) {
|
||||||
|
$this->showNote = $show;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
abstract protected function canEditList();
|
abstract protected function canEditList();
|
||||||
abstract protected function getNoDataString();
|
abstract protected function getNoDataString();
|
||||||
abstract protected function getRemoveURI($phid);
|
abstract protected function getRemoveURI($phid);
|
||||||
|
@ -136,11 +142,13 @@ abstract class PhabricatorProjectUserListView extends AphrontView {
|
||||||
->setHeader($header)
|
->setHeader($header)
|
||||||
->setObjectList($list);
|
->setObjectList($list);
|
||||||
|
|
||||||
if ($this->getMembershipNote()) {
|
if ($this->showNote) {
|
||||||
$info = id(new PHUIInfoView())
|
if ($this->getMembershipNote()) {
|
||||||
->setSeverity(PHUIInfoView::SEVERITY_PLAIN)
|
$info = id(new PHUIInfoView())
|
||||||
->appendChild($this->getMembershipNote());
|
->setSeverity(PHUIInfoView::SEVERITY_PLAIN)
|
||||||
$box->setInfoView($info);
|
->appendChild($this->getMembershipNote());
|
||||||
|
$box->setInfoView($info);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->background) {
|
if ($this->background) {
|
||||||
|
|
Loading…
Reference in a new issue