1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 22:10:55 +01:00

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:
epriestley 2015-07-08 07:00:17 -07:00
parent 0036670329
commit 50491d2057
2 changed files with 5 additions and 21 deletions

View file

@ -227,17 +227,9 @@ final class DiffusionRepositoryController extends DiffusionController {
$actions = $this->buildActionList($repository);
$view = id(new PHUIPropertyListView())
->setObject($repository)
->setUser($user);
$project_phids = PhabricatorEdgeQuery::loadDestinationPHIDs(
$repository->getPHID(),
PhabricatorProjectObjectHasProjectEdgeType::EDGECONST);
if ($project_phids) {
$view->addProperty(
pht('Projects'),
$user->renderHandleList($project_phids));
}
if ($repository->isHosted()) {
$ssh_uri = $repository->getSSHCloneURIObject();
if ($ssh_uri) {
@ -290,6 +282,8 @@ final class DiffusionRepositoryController extends DiffusionController {
}
}
$view->invokeWillRenderEvent();
$description = $repository->getDetail('description');
if (strlen($description)) {
$description = PhabricatorMarkupEngine::renderOneObject(

View file

@ -264,6 +264,7 @@ final class DiffusionRepositoryEditMainController
$view = id(new PHUIPropertyListView())
->setUser($viewer)
->setObject($repository)
->setActionList($actions);
$type = PhabricatorRepositoryType::getNameForRepositoryType(
@ -272,7 +273,6 @@ final class DiffusionRepositoryEditMainController
$view->addProperty(pht('Type'), $type);
$view->addProperty(pht('Callsign'), $repository->getCallsign());
$clone_name = $repository->getDetail('clone-name');
if ($repository->isHosted()) {
@ -283,17 +283,7 @@ final class DiffusionRepositoryEditMainController
: phutil_tag('em', array(), $repository->getCloneName().'/'));
}
$project_phids = PhabricatorEdgeQuery::loadDestinationPHIDs(
$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->invokeWillRenderEvent();
$view->addProperty(
pht('Status'),