Merge: more tweaks to project page for when there is no description or no members.

This commit is contained in:
2014-02-03 13:19:26 +01:00
parent c12898b63a
commit e7242143a0

View File

@@ -237,21 +237,31 @@ final class PhabricatorProjectProfileController
->setObject($project)
->setActionList($actions);
$view->addCustomTextContent(
array(
PhabricatorMarkupEngine::renderOneObject(
id(new PhabricatorMarkupOneOff())
->setPreserveLinebreaks(true)
->setContent($profile->getBlurb()),
'default',
$viewer),
$blurb = $profile->getBlurb();
$text = array();
phutil_tag('br'),
phutil_tag('div', array('class' => 'phui-property-list-section-header'), pht('Members')),
phutil_tag('div', array('class' => 'phui-property-list-text-content'),
$project->getMemberPHIDs()
? $this->renderHandlesForPHIDs($project->getMemberPHIDs(), ',')
: phutil_tag('em', array(), pht('None')))));
if ($blurb) {
$text[] = PhabricatorMarkupEngine::renderOneObject(
id(new PhabricatorMarkupOneOff())
->setPreserveLinebreaks(true)
->setContent($blurb),
'default',
$viewer);
} else {
$text[] = phutil_tag('div', array(), phutil_tag('em', array(), pht('No Description')));
}
if($project->getMemberPHIDs()) {
$text[] = phutil_tag('br');
$text[] = phutil_tag('div',
array('class' => 'phui-property-list-section-header'),
pht('Members'));
$text[] = phutil_tag('div',
array('class' => 'phui-property-list-text-content'),
$this->renderHandlesForPHIDs($project->getMemberPHIDs(), ','));
}
$view->addCustomTextContent($text);
return $view;
}