mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 22:10: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:
parent
7e519e026a
commit
d7fc229691
1 changed files with 7 additions and 2 deletions
|
@ -36,7 +36,8 @@ final class PhabricatorProjectListController
|
||||||
->addFilter('owned', 'Owned')
|
->addFilter('owned', 'Owned')
|
||||||
->addSpacer()
|
->addSpacer()
|
||||||
->addLabel('All')
|
->addLabel('All')
|
||||||
->addFilter('all', 'All Projects');
|
->addFilter('all', 'All Projects')
|
||||||
|
->addFilter('allactive','Active Projects');
|
||||||
$this->filter = $nav->selectFilter($this->filter, 'active');
|
$this->filter = $nav->selectFilter($this->filter, 'active');
|
||||||
|
|
||||||
$pager = new AphrontPagerView();
|
$pager = new AphrontPagerView();
|
||||||
|
@ -54,7 +55,7 @@ final class PhabricatorProjectListController
|
||||||
|
|
||||||
switch ($this->filter) {
|
switch ($this->filter) {
|
||||||
case 'active':
|
case 'active':
|
||||||
$table_header = 'Active Projects';
|
$table_header = 'Your Projects';
|
||||||
$query->setMembers(array($view_phid));
|
$query->setMembers(array($view_phid));
|
||||||
$query->withStatus(PhabricatorProjectQuery::STATUS_ACTIVE);
|
$query->withStatus(PhabricatorProjectQuery::STATUS_ACTIVE);
|
||||||
break;
|
break;
|
||||||
|
@ -63,6 +64,10 @@ final class PhabricatorProjectListController
|
||||||
$query->setOwners(array($view_phid));
|
$query->setOwners(array($view_phid));
|
||||||
$query->withStatus($status_filter);
|
$query->withStatus($status_filter);
|
||||||
break;
|
break;
|
||||||
|
case 'allactive':
|
||||||
|
$status_filter = PhabricatorProjectQuery::STATUS_ACTIVE;
|
||||||
|
$table_header = 'Active Projects';
|
||||||
|
// fallthrough
|
||||||
case 'all':
|
case 'all':
|
||||||
$table_header = 'All Projects';
|
$table_header = 'All Projects';
|
||||||
$query->withStatus($status_filter);
|
$query->withStatus($status_filter);
|
||||||
|
|
Loading…
Reference in a new issue