Use standard project rendering in Diffusion
Summary: Fixes T8791.
Test Plan: {F599915}
Reviewers: btrahan, chad
Reviewed By: chad
Subscribers: epriestley
Maniphest Tasks: T8791
Differential Revision: https://secure.phabricator.com/D13603
This commit is contained in:
@@ -227,17 +227,9 @@ final class DiffusionRepositoryController extends DiffusionController {
|
|||||||
$actions = $this->buildActionList($repository);
|
$actions = $this->buildActionList($repository);
|
||||||
|
|
||||||
$view = id(new PHUIPropertyListView())
|
$view = id(new PHUIPropertyListView())
|
||||||
|
->setObject($repository)
|
||||||
->setUser($user);
|
->setUser($user);
|
||||||
|
|
||||||
$project_phids = PhabricatorEdgeQuery::loadDestinationPHIDs(
|
|
||||||
$repository->getPHID(),
|
|
||||||
PhabricatorProjectObjectHasProjectEdgeType::EDGECONST);
|
|
||||||
if ($project_phids) {
|
|
||||||
$view->addProperty(
|
|
||||||
pht('Projects'),
|
|
||||||
$user->renderHandleList($project_phids));
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($repository->isHosted()) {
|
if ($repository->isHosted()) {
|
||||||
$ssh_uri = $repository->getSSHCloneURIObject();
|
$ssh_uri = $repository->getSSHCloneURIObject();
|
||||||
if ($ssh_uri) {
|
if ($ssh_uri) {
|
||||||
@@ -290,6 +282,8 @@ final class DiffusionRepositoryController extends DiffusionController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$view->invokeWillRenderEvent();
|
||||||
|
|
||||||
$description = $repository->getDetail('description');
|
$description = $repository->getDetail('description');
|
||||||
if (strlen($description)) {
|
if (strlen($description)) {
|
||||||
$description = PhabricatorMarkupEngine::renderOneObject(
|
$description = PhabricatorMarkupEngine::renderOneObject(
|
||||||
|
|||||||
@@ -264,6 +264,7 @@ final class DiffusionRepositoryEditMainController
|
|||||||
|
|
||||||
$view = id(new PHUIPropertyListView())
|
$view = id(new PHUIPropertyListView())
|
||||||
->setUser($viewer)
|
->setUser($viewer)
|
||||||
|
->setObject($repository)
|
||||||
->setActionList($actions);
|
->setActionList($actions);
|
||||||
|
|
||||||
$type = PhabricatorRepositoryType::getNameForRepositoryType(
|
$type = PhabricatorRepositoryType::getNameForRepositoryType(
|
||||||
@@ -272,7 +273,6 @@ final class DiffusionRepositoryEditMainController
|
|||||||
$view->addProperty(pht('Type'), $type);
|
$view->addProperty(pht('Type'), $type);
|
||||||
$view->addProperty(pht('Callsign'), $repository->getCallsign());
|
$view->addProperty(pht('Callsign'), $repository->getCallsign());
|
||||||
|
|
||||||
|
|
||||||
$clone_name = $repository->getDetail('clone-name');
|
$clone_name = $repository->getDetail('clone-name');
|
||||||
|
|
||||||
if ($repository->isHosted()) {
|
if ($repository->isHosted()) {
|
||||||
@@ -283,17 +283,7 @@ final class DiffusionRepositoryEditMainController
|
|||||||
: phutil_tag('em', array(), $repository->getCloneName().'/'));
|
: phutil_tag('em', array(), $repository->getCloneName().'/'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$project_phids = PhabricatorEdgeQuery::loadDestinationPHIDs(
|
$view->invokeWillRenderEvent();
|
||||||
$repository->getPHID(),
|
|
||||||
PhabricatorProjectObjectHasProjectEdgeType::EDGECONST);
|
|
||||||
if ($project_phids) {
|
|
||||||
$project_text = $viewer->renderHandleList($project_phids);
|
|
||||||
} else {
|
|
||||||
$project_text = phutil_tag('em', array(), pht('None'));
|
|
||||||
}
|
|
||||||
$view->addProperty(
|
|
||||||
pht('Projects'),
|
|
||||||
$project_text);
|
|
||||||
|
|
||||||
$view->addProperty(
|
$view->addProperty(
|
||||||
pht('Status'),
|
pht('Status'),
|
||||||
|
|||||||
Reference in New Issue
Block a user