Commit 3f47c7dc authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Fixes #5270 ACL assignment list is now bigger, and member list is abbreviated if too long

parent f6355a8e
...@@ -178,11 +178,18 @@ class ACLsAssignmentAttribute extends DialogOrderedArrayAttribute ...@@ -178,11 +178,18 @@ class ACLsAssignmentAttribute extends DialogOrderedArrayAttribute
{ {
protected $order = TRUE; protected $order = TRUE;
protected $dialogClass = 'ACLsAssignmentDialog'; protected $dialogClass = 'ACLsAssignmentDialog';
protected $height = 300;
protected function getAttributeArrayValue($key, $value) protected function getAttributeArrayValue($key, $value)
{ {
/* Convert text value to displayable array value */ /* Convert text value to displayable array value */
$value['members'] = join(', ', $value['members']); sort($value['members']);
static $nbShown = 4;
$members = join(', ', array_slice($value['members'], 0, $nbShown));
if (count($value['members']) > $nbShown) {
$members .= sprintf(_(', and %d others'), (count($value['members']) - $nbShown));
}
$value['members'] = $members;
return $value; return $value;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment