@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[drydock/core] Show blueprints / resources as links in Drydock view controllers

Summary: Ref T2015. This updates the blueprint / resource references in the Drydock view controllers to render as handles.

Test Plan: Viewed the controllers, saw links.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: devurandom, joshuaspence, Korvin, epriestley

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D10873

+20 -4
+14 -3
src/applications/drydock/controller/DrydockLeaseViewController.php
··· 130 130 pht('Resource Type'), 131 131 $lease->getResourceType()); 132 132 133 - $view->addProperty( 134 - pht('Resource'), 135 - $lease->getResourceID()); 133 + $resource = id(new DrydockResourceQuery()) 134 + ->setViewer($this->getViewer()) 135 + ->withIDs(array($lease->getResourceID())) 136 + ->executeOne(); 137 + 138 + if ($resource !== null) { 139 + $view->addProperty( 140 + pht('Resource'), 141 + $this->getViewer()->renderHandle($resource->getPHID())); 142 + } else { 143 + $view->addProperty( 144 + pht('Resource'), 145 + pht('No Resource')); 146 + } 136 147 137 148 $attributes = $lease->getAttributes(); 138 149 if ($attributes) {
+6 -1
src/applications/drydock/phid/DrydockResourcePHIDType.php
··· 29 29 $resource = $objects[$phid]; 30 30 $id = $resource->getID(); 31 31 32 - $handle->setName($resource->getName()); 32 + $handle->setName( 33 + pht( 34 + 'Resource %d: %s', 35 + $id, 36 + $resource->getName())); 37 + 33 38 $handle->setURI("/drydock/resource/{$id}/"); 34 39 } 35 40 }