1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-20 04:20:55 +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

@ -62,9 +62,9 @@ final class AlmanacServiceViewController
->appendChild( ->appendChild(
array( array(
$box, $box,
$bindings, $bindings,
$this->buildAlmanacPropertiesTable($service), $this->buildAlmanacPropertiesTable($service),
$timeline, $timeline,
)); ));
} }

View file

@ -199,13 +199,12 @@ final class PhabricatorBadgesEditController
->setHeaderText($title) ->setHeaderText($title)
->appendChild($form); ->appendChild($form);
return $this->buildApplicationPage( return $this->newPage()
array( ->setTitle($title)
$crumbs, ->setCrumbs($crumbs)
$box, ->appendChild(
), array(
array( $box,
'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()
array( ->setTitle($title)
$crumbs, ->setCrumbs($crumbs)
$form_box, ->appendChild(
$recipient_list, array(
), $form_box,
array( $recipient_list,
'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()
array( ->setTitle($title)
$crumbs, ->setCrumbs($crumbs)
$box, ->setPageObjectPHIDs(array($badge->getPHID()))
$recipient_list, ->appendChild(
$timeline, array(
$add_comment, $box,
), $recipient_list,
array( $timeline,
'title' => $title, $add_comment,
'pageObjects' => array($badge->getPHID()),
)); ));
} }