update PR based on the feedback
This commit is contained in:
parent
564fb8c320
commit
aac860b118
|
@ -43,10 +43,10 @@ use Icinga\Data\Selectable;
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= $this->translate('Role Memberships'); ?></th>
|
<th><?= $this->translate('Role Memberships'); ?></th>
|
||||||
<td>
|
<td>
|
||||||
<?php $roleObj = $userObj->getRoles(); ?>
|
<?php $roles = $userObj->getRoles(); ?>
|
||||||
<?php if (! empty($roleObj)): ?>
|
<?php if (! empty($roles)): ?>
|
||||||
<ul class="role-memberships">
|
<ul class="role-memberships">
|
||||||
<?php foreach($roleObj as $role): ?>
|
<?php foreach($roles as $role): ?>
|
||||||
<li>
|
<li>
|
||||||
<?php if ($this->allowedToEditRoles): ?>
|
<?php if ($this->allowedToEditRoles): ?>
|
||||||
<?= $this->qlink(
|
<?= $this->qlink(
|
||||||
|
@ -54,7 +54,8 @@ use Icinga\Data\Selectable;
|
||||||
'role/edit',
|
'role/edit',
|
||||||
['role' => $role->getName()],
|
['role' => $role->getName()],
|
||||||
['title' => sprintf($this->translate('Edit role %s'), $role->getName())]
|
['title' => sprintf($this->translate('Edit role %s'), $role->getName())]
|
||||||
) ?>
|
);
|
||||||
|
$role === end($roles) ? print '' : print ', '; ?>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<?= $role->getName() ?>
|
<?= $role->getName() ?>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
Loading…
Reference in New Issue