1
0
Fork 0
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:
Chad Little 2017-05-14 12:13:59 -04:00
parent 74d86f0902
commit db631b423f

View file

@ -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);