From d7fc2296913f571217f9febbeec8f0fc1bc5aace Mon Sep 17 00:00:00 2001 From: 20after4 <20after4@deviantart.com> Date: Sun, 25 Mar 2012 09:33:26 -0700 Subject: [PATCH] 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 --- .../controller/list/PhabricatorProjectListController.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/applications/project/controller/list/PhabricatorProjectListController.php b/src/applications/project/controller/list/PhabricatorProjectListController.php index 35f53abf17..535f62e9e5 100644 --- a/src/applications/project/controller/list/PhabricatorProjectListController.php +++ b/src/applications/project/controller/list/PhabricatorProjectListController.php @@ -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);