diff --git a/src/applications/drydock/controller/DrydockLeaseViewController.php b/src/applications/drydock/controller/DrydockLeaseViewController.php --- a/src/applications/drydock/controller/DrydockLeaseViewController.php +++ b/src/applications/drydock/controller/DrydockLeaseViewController.php @@ -130,9 +130,20 @@ pht('Resource Type'), $lease->getResourceType()); - $view->addProperty( - pht('Resource'), - $lease->getResourceID()); + $resource = id(new DrydockResourceQuery()) + ->setViewer($this->getViewer()) + ->withIDs(array($lease->getResourceID())) + ->executeOne(); + + if ($resource !== null) { + $view->addProperty( + pht('Resource'), + $this->getViewer()->renderHandle($resource->getPHID())); + } else { + $view->addProperty( + pht('Resource'), + pht('No Resource')); + } $attributes = $lease->getAttributes(); if ($attributes) { diff --git a/src/applications/drydock/phid/DrydockResourcePHIDType.php b/src/applications/drydock/phid/DrydockResourcePHIDType.php --- a/src/applications/drydock/phid/DrydockResourcePHIDType.php +++ b/src/applications/drydock/phid/DrydockResourcePHIDType.php @@ -29,7 +29,12 @@ $resource = $objects[$phid]; $id = $resource->getID(); - $handle->setName($resource->getName()); + $handle->setName( + pht( + 'Resource %d: %s', + $id, + $resource->getName())); + $handle->setURI("/drydock/resource/{$id}/"); } }