Support Spaces in Diffusion

Summary:
Ref T8493. Diffusion is probably the strongest upstream use case we have for Spaces right now, so I want to get us on it to kick the tires a bit.

Small amount of hackiness around the multi-page form thing but it shouldn't create any problems.

Test Plan:
  - Created a new repo.
  - Edited a repo.
  - Tried invalid edits, saw value preserved.
  - Viewed edit full detail screen, saw space info.
  - Viewed repo detail view, saw space.
  - Viewed repo list view, saw space.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8493

Differential Revision: https://secure.phabricator.com/D13414
This commit is contained in:
epriestley
2015-06-24 10:56:46 -07:00
parent c1dca8238f
commit fcb35a55fd
7 changed files with 64 additions and 18 deletions

View File

@@ -386,9 +386,17 @@ final class DiffusionRepositoryEditMainController
$viewer,
$repository);
$view_parts = array();
if (PhabricatorSpacesNamespaceQuery::getViewerSpacesExist($viewer)) {
$space_phid = PhabricatorSpacesNamespaceQuery::getObjectSpacePHID(
$repository);
$view_parts[] = $viewer->renderHandle($space_phid);
}
$view_parts[] = $descriptions[PhabricatorPolicyCapability::CAN_VIEW];
$view->addProperty(
pht('Visible To'),
$descriptions[PhabricatorPolicyCapability::CAN_VIEW]);
phutil_implode_html(" \xC2\xB7 ", $view_parts));
$view->addProperty(
pht('Editable By'),