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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user