Show group memberships in a tooltip

This commit is contained in:
Manfred Hoffmann
2020-04-05 20:20:12 +02:00
committed by GitHub
parent 1ee17e995a
commit b442c52acb
39 changed files with 114 additions and 10 deletions

View File

@@ -11,7 +11,11 @@
<span><a href="mailto:<?= $this->text->e($user['email']) ?>"><?= $this->text->e($user['email']) ?></a></span>
<?php endif ?>
<?php if (! empty($this->user->getGroupNames($user['id'])) ): ?>
<span><i class="fa fa-fw fa-group aria-hidden="true"></i> <?= $this->user->getGroupNames($user['id']) ?></span>
<?php if ( SHOW_GROUP_MEMBERSHIPS_IN_USERLIST ): ?>
<?php $users_group_names = $this->user->getUsersGroupNames($user['id']); ?>
<?php $groups_list_tooltip = t('%s is a member of the following group(s):', $user['name']) . '&#10;' . $users_group_names['full_list']; ?>
<?php if ($users_group_names['has_groups']): ?>
<span><i class="fa fa-fw fa-group aria-hidden="true" title="<?= $groups_list_tooltip ?>"></i> <?= $users_group_names['limited_list'] ?></span>
<?php endif ?>
<?php endif ?>
</div>