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();
|
$viewer = $this->getRequest()->getUser();
|
||||||
|
|
||||||
$list = new PHUIObjectItemListView();
|
$list = new PHUIObjectItemListView();
|
||||||
$list->setStates(true);
|
$list->setCards(true);
|
||||||
foreach ($buildables as $buildable) {
|
foreach ($buildables as $buildable) {
|
||||||
$id = $buildable->getID();
|
$id = $buildable->getID();
|
||||||
|
|
||||||
|
@ -55,28 +55,25 @@ final class HarbormasterBuildableListController
|
||||||
|
|
||||||
switch ($buildable->getBuildableStatus()) {
|
switch ($buildable->getBuildableStatus()) {
|
||||||
case HarbormasterBuildable::STATUS_PASSED:
|
case HarbormasterBuildable::STATUS_PASSED:
|
||||||
$item->setState(PHUIObjectItemView::STATE_SUCCESS);
|
$item->setBarColor('green');
|
||||||
|
$item->addByline(pht('Build Passed'));
|
||||||
break;
|
break;
|
||||||
case HarbormasterBuildable::STATUS_FAILED:
|
case HarbormasterBuildable::STATUS_FAILED:
|
||||||
$item->setState(PHUIObjectItemView::STATE_FAIL);
|
$item->setBarColor('red');
|
||||||
|
$item->addByline(pht('Build Failed'));
|
||||||
break;
|
break;
|
||||||
case HarbormasterBuildable::STATUS_BUILDING:
|
case HarbormasterBuildable::STATUS_BUILDING:
|
||||||
$item->setState(PHUIObjectItemView::STATE_BUILD);
|
$item->setBarColor('red');
|
||||||
break;
|
$item->addByline(pht('Building'));
|
||||||
default:
|
|
||||||
$item->setState(PHUIObjectItemView::STATE_WARN);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$list->addItem($item);
|
$list->addItem($item);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$box = id(new PHUIObjectBoxView())
|
return $list;
|
||||||
->setHeaderText(pht('Buildables'))
|
|
||||||
->appendChild($list);
|
|
||||||
|
|
||||||
return $box;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildSideNavView($for_app = false) {
|
public function buildSideNavView($for_app = false) {
|
||||||
|
|
Loading…
Reference in a new issue