Commit 7084b44b 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

Showing with 8 additions and 1 deletion
+8 -1
...@@ -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;
} }
......
  • bmortier @bmortier

    mentioned in issue #1674

    By tbp on 2017-09-02T15:34:30 (imported from GitLab)

    ·

    mentioned in issue #1674

    By tbp on 2017-09-02T15:34:30 (imported from GitLab)

    Toggle commit list
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