1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 05:50:55 +01:00

Projects: Filter out archived projects from all project view

Summary: Adds an "allactive" filter in addition to the all projects filter.

Test Plan:
visit All Active view (/project/filter/allactive/) and
 see that it lists all projects except those which have been archived.
 Visit other filter views to be sure nothing else got broken.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D2010
This commit is contained in:
20after4 2012-03-25 09:33:26 -07:00 committed by epriestley
parent 7e519e026a
commit d7fc229691

View file

@ -36,7 +36,8 @@ final class PhabricatorProjectListController
->addFilter('owned', 'Owned')
->addSpacer()
->addLabel('All')
->addFilter('all', 'All Projects');
->addFilter('all', 'All Projects')
->addFilter('allactive','Active Projects');
$this->filter = $nav->selectFilter($this->filter, 'active');
$pager = new AphrontPagerView();
@ -54,7 +55,7 @@ final class PhabricatorProjectListController
switch ($this->filter) {
case 'active':
$table_header = 'Active Projects';
$table_header = 'Your Projects';
$query->setMembers(array($view_phid));
$query->withStatus(PhabricatorProjectQuery::STATUS_ACTIVE);
break;
@ -63,6 +64,10 @@ final class PhabricatorProjectListController
$query->setOwners(array($view_phid));
$query->withStatus($status_filter);
break;
case 'allactive':
$status_filter = PhabricatorProjectQuery::STATUS_ACTIVE;
$table_header = 'Active Projects';
// fallthrough
case 'all':
$table_header = 'All Projects';
$query->withStatus($status_filter);