Restore Maniphest to use comma-style lists for subscribers, projects
Summary: D4153 made these render with newlines between items; use commas instead.
Test Plan: {F26950}
Reviewers: btrahan, chad, vrana
Reviewed By: chad
CC: aran
Differential Revision: https://secure.phabricator.com/D4162
This commit is contained in:
@@ -235,12 +235,31 @@ abstract class PhabricatorController extends AphrontController {
|
||||
->loadHandles();
|
||||
}
|
||||
|
||||
protected function renderHandlesForPHIDs(array $phids) {
|
||||
|
||||
/**
|
||||
* Render a list of links to handles, identified by PHIDs. The handles must
|
||||
* already be loaded.
|
||||
*
|
||||
* @param list<phid> List of PHIDs to render links to.
|
||||
* @param string Style, one of "\n" (to put each item on its own line)
|
||||
* or "," (to list items inline, separated by commas).
|
||||
* @return string Rendered list of handle links.
|
||||
*/
|
||||
protected function renderHandlesForPHIDs(array $phids, $style = "\n") {
|
||||
$style_map = array(
|
||||
"\n" => '<br />',
|
||||
',' => ', ',
|
||||
);
|
||||
|
||||
if (empty($style_map[$style])) {
|
||||
throw new Exception("Unknown handle list style '{$style}'!");
|
||||
}
|
||||
|
||||
$items = array();
|
||||
foreach ($phids as $phid) {
|
||||
$items[] = $this->getHandle($phid)->renderLink();
|
||||
}
|
||||
return implode('<br />', $items);
|
||||
return implode($style_map[$style], $items);
|
||||
}
|
||||
|
||||
protected function buildApplicationMenu() {
|
||||
|
||||
Reference in New Issue
Block a user