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

feat(management) Add sorting on group members column

issue #5135
parent e4b0ab95
......@@ -23,22 +23,12 @@
*/
class GroupContentColumn extends Column
{
function isSortable()
{
return FALSE;
}
function fillNeededAttributes(array &$attrs)
{
$attrs['gosaGroupObjects'] = '1';
}
function renderCell(ListingEntry $entry)
{
global $config;
if (strtolower($entry->getTemplatedType()) == 'ogroup') {
$types = preg_replace('/[^a-z]/i', '', $entry['gosaGroupObjects']);
$types = preg_replace('/[^a-z]/i', '', $entry[$this->attribute]);
} else {
$types = 'U';
}
......
......@@ -25,9 +25,9 @@ class groupManagement extends management
public static $columns = array(
array('ObjectTypeColumn', array()),
array('LinkColumn', array('attribute' => 'cn', 'label' => 'Name')),
array('LinkColumn', array('attribute' => 'description', 'label' => 'Description')),
array('GroupContentColumn', array('label' => 'Members')),
array('LinkColumn', array('attribute' => 'cn', 'label' => 'Name')),
array('LinkColumn', array('attribute' => 'description', 'label' => 'Description')),
array('GroupContentColumn', array('attribute' => 'gosaGroupObjects', 'label' => 'Members')),
array('PropertiesColumn', array('label' => 'Properties')),
array('ActionsColumn', array('label' => 'Actions')),
);
......
  • SonarQube analysis reported 2 issues

    • 1 major
    • 🔽 1 minor

    Note: The following issues were found on lines that were not modified in the commit. Because these issues can't be reported as line comments, they are summarized here:

    1. Rename "$tabs" which has the same name as the field declared at line 26. 📘
    2. 🔽 Remove this empty statement. 📘
Markdown is supported
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