1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 20:10: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(
array(
$box,
$bindings,
$this->buildAlmanacPropertiesTable($service),
$timeline,
$bindings,
$this->buildAlmanacPropertiesTable($service),
$timeline,
));
}

View file

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

View file

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

View file

@ -8,28 +8,9 @@ final class PhabricatorBadgesListController
}
public function handleRequest(AphrontRequest $request) {
$query_key = $request->getURIData('queryKey');
$controller = id(new PhabricatorApplicationSearchController())
->setQueryKey($query_key)
->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;
return id(new PhabricatorBadgesSearchEngine())
->setController($this)
->buildResponse();
}
protected function buildApplicationCrumbs() {

View file

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