Differential D8608 Diff 20398 src/applications/harbormaster/controller/HarbormasterBuildableListController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/harbormaster/controller/HarbormasterBuildableListController.php
| Show All 31 Lines | public function renderResultsList( | ||||
| $viewer = $this->getRequest()->getUser(); | $viewer = $this->getRequest()->getUser(); | ||||
| $list = new PHUIObjectItemListView(); | $list = new PHUIObjectItemListView(); | ||||
| foreach ($buildables as $buildable) { | foreach ($buildables as $buildable) { | ||||
| $id = $buildable->getID(); | $id = $buildable->getID(); | ||||
| $item = id(new PHUIObjectItemView()) | $item = id(new PHUIObjectItemView()) | ||||
| ->setHeader(pht('Buildable %d', $buildable->getID())); | ->setHeader(pht('Buildable %d', $buildable->getID())); | ||||
| if ($buildable->getContainerHandle() !== null) { | |||||
| $item->addAttribute($buildable->getContainerHandle()->getName()); | $item->addAttribute($buildable->getContainerHandle()->getName()); | ||||
| } | |||||
| if ($buildable->getBuildableHandle() !== null) { | |||||
| $item->addAttribute($buildable->getBuildableHandle()->getFullName()); | $item->addAttribute($buildable->getBuildableHandle()->getFullName()); | ||||
| } | |||||
| if ($id) { | if ($id) { | ||||
| $item->setHref("/B{$id}"); | $item->setHref("/B{$id}"); | ||||
| } | } | ||||
| if ($buildable->getIsManualBuildable()) { | if ($buildable->getIsManualBuildable()) { | ||||
| $item->addIcon('wrench-grey', pht('Manual')); | $item->addIcon('wrench-grey', pht('Manual')); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines | |||||