Merge: more tweaks to project page for when there is no description or no members.
This commit is contained in:
@@ -237,21 +237,31 @@ final class PhabricatorProjectProfileController
|
|||||||
->setObject($project)
|
->setObject($project)
|
||||||
->setActionList($actions);
|
->setActionList($actions);
|
||||||
|
|
||||||
$view->addCustomTextContent(
|
$blurb = $profile->getBlurb();
|
||||||
array(
|
$text = array();
|
||||||
PhabricatorMarkupEngine::renderOneObject(
|
|
||||||
|
if ($blurb) {
|
||||||
|
$text[] = PhabricatorMarkupEngine::renderOneObject(
|
||||||
id(new PhabricatorMarkupOneOff())
|
id(new PhabricatorMarkupOneOff())
|
||||||
->setPreserveLinebreaks(true)
|
->setPreserveLinebreaks(true)
|
||||||
->setContent($profile->getBlurb()),
|
->setContent($blurb),
|
||||||
'default',
|
'default',
|
||||||
$viewer),
|
$viewer);
|
||||||
|
} else {
|
||||||
|
$text[] = phutil_tag('div', array(), phutil_tag('em', array(), pht('No Description')));
|
||||||
|
}
|
||||||
|
|
||||||
phutil_tag('br'),
|
if($project->getMemberPHIDs()) {
|
||||||
phutil_tag('div', array('class' => 'phui-property-list-section-header'), pht('Members')),
|
$text[] = phutil_tag('br');
|
||||||
phutil_tag('div', array('class' => 'phui-property-list-text-content'),
|
$text[] = phutil_tag('div',
|
||||||
$project->getMemberPHIDs()
|
array('class' => 'phui-property-list-section-header'),
|
||||||
? $this->renderHandlesForPHIDs($project->getMemberPHIDs(), ',')
|
pht('Members'));
|
||||||
: phutil_tag('em', array(), pht('None')))));
|
$text[] = phutil_tag('div',
|
||||||
|
array('class' => 'phui-property-list-text-content'),
|
||||||
|
$this->renderHandlesForPHIDs($project->getMemberPHIDs(), ','));
|
||||||
|
}
|
||||||
|
|
||||||
|
$view->addCustomTextContent($text);
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user