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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user