mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 14:00:56 +01:00
Add basic Watching filter to /projects/
Summary: Ref T12707. Adds a simple filter for the viewer if logged in. Test Plan: Watch a project, click on watching list, see project I'm watching. Reviewers: epriestley Reviewed By: epriestley Subscribers: epriestley Maniphest Tasks: T12707 Differential Revision: https://secure.phabricator.com/D17873
This commit is contained in:
parent
74d86f0902
commit
db631b423f
1 changed files with 8 additions and 0 deletions
|
@ -128,6 +128,10 @@ final class PhabricatorProjectSearchEngine
|
|||
$names['joined'] = pht('Joined');
|
||||
}
|
||||
|
||||
if ($this->requireViewer()->isLoggedIn()) {
|
||||
$names['watching'] = pht('Watching');
|
||||
}
|
||||
|
||||
$names['active'] = pht('Active');
|
||||
$names['all'] = pht('All');
|
||||
|
||||
|
@ -153,6 +157,10 @@ final class PhabricatorProjectSearchEngine
|
|||
return $query
|
||||
->setParameter('memberPHIDs', array($viewer_phid))
|
||||
->setParameter('status', 'active');
|
||||
case 'watching':
|
||||
return $query
|
||||
->setParameter('watcherPHIDs', array($viewer_phid))
|
||||
->setParameter('status', 'active');
|
||||
}
|
||||
|
||||
return parent::buildSavedQueryFromBuiltin($query_key);
|
||||
|
|
Loading…
Reference in a new issue