mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-19 05:12:41 +01:00
Used Cards instead of States for Harbormaster Buildables
Summary: Switched to Obect Cards for better consistency with application search. Added Byline for colorblind/accessability (can move). Test Plan: Tested my Harbormaster build. Reviewers: epriestley Reviewed By: epriestley Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D8934
This commit is contained in:
parent
da5f22172c
commit
173fd49e67
1 changed files with 9 additions and 12 deletions
|
@ -32,7 +32,7 @@ final class HarbormasterBuildableListController
|
|||
$viewer = $this->getRequest()->getUser();
|
||||
|
||||
$list = new PHUIObjectItemListView();
|
||||
$list->setStates(true);
|
||||
$list->setCards(true);
|
||||
foreach ($buildables as $buildable) {
|
||||
$id = $buildable->getID();
|
||||
|
||||
|
@ -55,28 +55,25 @@ final class HarbormasterBuildableListController
|
|||
|
||||
switch ($buildable->getBuildableStatus()) {
|
||||
case HarbormasterBuildable::STATUS_PASSED:
|
||||
$item->setState(PHUIObjectItemView::STATE_SUCCESS);
|
||||
$item->setBarColor('green');
|
||||
$item->addByline(pht('Build Passed'));
|
||||
break;
|
||||
case HarbormasterBuildable::STATUS_FAILED:
|
||||
$item->setState(PHUIObjectItemView::STATE_FAIL);
|
||||
$item->setBarColor('red');
|
||||
$item->addByline(pht('Build Failed'));
|
||||
break;
|
||||
case HarbormasterBuildable::STATUS_BUILDING:
|
||||
$item->setState(PHUIObjectItemView::STATE_BUILD);
|
||||
break;
|
||||
default:
|
||||
$item->setState(PHUIObjectItemView::STATE_WARN);
|
||||
$item->setBarColor('red');
|
||||
$item->addByline(pht('Building'));
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
$list->addItem($item);
|
||||
|
||||
}
|
||||
|
||||
$box = id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Buildables'))
|
||||
->appendChild($list);
|
||||
|
||||
return $box;
|
||||
return $list;
|
||||
}
|
||||
|
||||
public function buildSideNavView($for_app = false) {
|
||||
|
|
Loading…
Reference in a new issue