Merge pull request #6197 from annando/hide-short-groups

Don't show the group filter where there is only one
This commit is contained in:
Hypolite Petovan 2018-11-24 08:22:43 -05:00 committed by GitHub
commit 6b845b35d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -400,6 +400,11 @@ class Group extends BaseObject
];
}
// Don't show the groups when there is only one
if (count($display_groups) <= 2) {
return '';
}
$tpl = Renderer::getMarkupTemplate('group_side.tpl');
$o = Renderer::replaceMacros($tpl, [
'$add' => L10n::t('add'),