Don't render anything on project homepages if there are no properties at all

Summary: Ref T10054.

Test Plan:
{F1068420}

Also looked at a project which did have stuff to make sure the stuff still worked.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15102
This commit is contained in:
epriestley
2016-01-23 17:14:26 -08:00
parent 8c25f0e7a2
commit 710fc0ce7f
2 changed files with 15 additions and 0 deletions

View File

@@ -31,6 +31,7 @@ final class PhabricatorProjectProfileController
}
$properties = $this->buildPropertyListView($project);
$watch_action = $this->renderWatchAction($project);
$header->addActionLink($watch_action);
@@ -119,6 +120,10 @@ final class PhabricatorProjectProfileController
PhabricatorCustomField::ROLE_VIEW);
$field_list->appendFieldsToPropertyList($project, $viewer, $view);
if ($view->isEmpty()) {
return null;
}
$view = id(new PHUIBoxView())
->setColor(PHUIBoxView::GREY)
->appendChild($view)