1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-20 12:30:56 +01:00

Modernize Badges

Summary: Ref T9690, updates Badges in various ways.

Test Plan: View List, View Badge, Create Badge, Assign Badge

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9690

Differential Revision: https://secure.phabricator.com/D14591
This commit is contained in:
Chad Little 2015-11-28 14:57:04 -08:00
parent 0d7b59e323
commit 760655aa09
5 changed files with 29 additions and 51 deletions

View file

@ -199,13 +199,12 @@ final class PhabricatorBadgesEditController
->setHeaderText($title) ->setHeaderText($title)
->appendChild($form); ->appendChild($form);
return $this->buildApplicationPage( return $this->newPage()
->setTitle($title)
->setCrumbs($crumbs)
->appendChild(
array( array(
$crumbs,
$box, $box,
),
array(
'title' => $title,
)); ));
} }

View file

@ -106,14 +106,13 @@ final class PhabricatorBadgesEditRecipientsController
$crumbs->addTextCrumb($badge->getName(), $badge_url); $crumbs->addTextCrumb($badge->getName(), $badge_url);
$crumbs->addTextCrumb(pht('Recipients')); $crumbs->addTextCrumb(pht('Recipients'));
return $this->buildApplicationPage( return $this->newPage()
->setTitle($title)
->setCrumbs($crumbs)
->appendChild(
array( array(
$crumbs,
$form_box, $form_box,
$recipient_list, $recipient_list,
),
array(
'title' => $title,
)); ));
} }

View file

@ -8,28 +8,9 @@ final class PhabricatorBadgesListController
} }
public function handleRequest(AphrontRequest $request) { public function handleRequest(AphrontRequest $request) {
$query_key = $request->getURIData('queryKey'); return id(new PhabricatorBadgesSearchEngine())
$controller = id(new PhabricatorApplicationSearchController()) ->setController($this)
->setQueryKey($query_key) ->buildResponse();
->setSearchEngine(new PhabricatorBadgesSearchEngine())
->setNavigation($this->buildSideNavView());
return $this->delegateToController($controller);
}
public function buildSideNavView() {
$user = $this->getRequest()->getUser();
$nav = new AphrontSideNavFilterView();
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
id(new PhabricatorBadgesSearchEngine())
->setViewer($user)
->addNavigationItems($nav->getMenu());
$nav->selectFilter(null);
return $nav;
} }
protected function buildApplicationCrumbs() { protected function buildApplicationCrumbs() {

View file

@ -64,17 +64,16 @@ final class PhabricatorBadgesViewController
$add_comment = $this->buildCommentForm($badge); $add_comment = $this->buildCommentForm($badge);
return $this->buildApplicationPage( return $this->newPage()
->setTitle($title)
->setCrumbs($crumbs)
->setPageObjectPHIDs(array($badge->getPHID()))
->appendChild(
array( array(
$crumbs,
$box, $box,
$recipient_list, $recipient_list,
$timeline, $timeline,
$add_comment, $add_comment,
),
array(
'title' => $title,
'pageObjects' => array($badge->getPHID()),
)); ));
} }