1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00

Add 'My Mocks' filter to Pholio

Summary: Add the ability to filter Pholio on Mocks I added.

Test Plan: Went to test user account, no mocks, went to my account, saw mocks.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4974
This commit is contained in:
Chad Little 2013-02-15 10:52:41 -08:00
parent b80f5e9105
commit 9da0a460b6
3 changed files with 8 additions and 2 deletions

View file

@ -10,7 +10,7 @@ final class PhabricatorApplicationPholio extends PhabricatorApplication {
}
public function getShortDescription() {
return 'Design Review';
return pht('Design Review');
}
public function getIconName() {

View file

@ -11,6 +11,7 @@ abstract class PholioController extends PhabricatorController {
$nav->addLabel('Mocks');
$nav->addFilter('view/all', pht('All Mocks'));
$nav->addFilter('view/my', pht('My Mocks'));
if ($for_app) {
$nav->addFilter('new/', pht('Create Mock'));

View file

@ -14,6 +14,7 @@ final class PholioMockListController extends PholioController {
public function processRequest() {
$request = $this->getRequest();
$user = $request->getUser();
$viewer_phid = $user->getPHID();
$query = id(new PholioMockQuery())
->setViewer($user)
@ -26,7 +27,11 @@ final class PholioMockListController extends PholioController {
case 'view/all':
default:
$title = pht('All Mocks');
break;
break;
case 'view/my':
$title = pht('My Mocks');
$query->withAuthorPHIDs(array($viewer_phid));
break;
}
$pager = new AphrontCursorPagerView();