mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
parent
331822ad15
commit
2168839349
@ -24,35 +24,35 @@ if ($this->hasPermission('config/authentication/users/edit') && $backend instanc
|
|||||||
?>
|
?>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<?php if (! $this->compact): ?>
|
<?php if (! $this->compact): ?>
|
||||||
<?= $tabs; ?>
|
<?= $tabs; ?>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<h2 class="clearfix"><?= $this->escape($user->user_name) ?><span class="pull-right"><?= $editLink ?></span></h2>
|
<h2 class="clearfix"><?= $this->escape($user->user_name) ?><span class="pull-right"><?= $editLink ?></span></h2>
|
||||||
<table class="name-value-table">
|
<table class="name-value-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= $this->translate('State'); ?></th>
|
<th><?= $this->translate('State'); ?></th>
|
||||||
<td><?= $user->is_active === null ? '-' : ($user->is_active ? $this->translate('Active') : $this->translate('Inactive')); ?></td>
|
<td><?= $user->is_active === null ? '-' : ($user->is_active ? $this->translate('Active') : $this->translate('Inactive')); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= $this->translate('Created at'); ?></th>
|
<th><?= $this->translate('Created at'); ?></th>
|
||||||
<td><?= $user->created_at === null ? '-' : $this->formatDateTime($user->created_at); ?></td>
|
<td><?= $user->created_at === null ? '-' : $this->formatDateTime($user->created_at); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= $this->translate('Last modified'); ?></th>
|
<th><?= $this->translate('Last modified'); ?></th>
|
||||||
<td><?= $user->last_modified === null ? '-' : $this->formatDateTime($user->last_modified); ?></td>
|
<td><?= $user->last_modified === null ? '-' : $this->formatDateTime($user->last_modified); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<h2><?= $this->translate('Group Memberships'); ?></h2>
|
<h2><?= $this->translate('Group Memberships'); ?></h2>
|
||||||
<?php if (! $this->compact): ?>
|
<?php if (! $this->compact): ?>
|
||||||
<?= $this->sortBox; ?>
|
<?= $this->sortBox; ?>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<?= $this->limiter; ?>
|
<?= $this->limiter; ?>
|
||||||
<?= $this->paginator; ?>
|
<?= $this->paginator; ?>
|
||||||
<?php if (! $this->compact): ?>
|
<?php if (! $this->compact): ?>
|
||||||
<?= $this->filterEditor; ?>
|
<?= $this->filterEditor; ?>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="content memberships">
|
<div class="content memberships">
|
||||||
<?php if ($showCreateMembershipLink): ?>
|
<?php if ($showCreateMembershipLink): ?>
|
||||||
<?= $this->qlink(
|
<?= $this->qlink(
|
||||||
$this->translate('Add User to Group') ,
|
$this->translate('Add User to Group') ,
|
||||||
'user/createmembership',
|
'user/createmembership',
|
||||||
@ -64,51 +64,47 @@ if ($this->hasPermission('config/authentication/users/edit') && $backend instanc
|
|||||||
'title' => $this->translate('Add user to user group')
|
'title' => $this->translate('Add user to user group')
|
||||||
)
|
)
|
||||||
) ?>
|
) ?>
|
||||||
<?php endif ?>
|
|
||||||
<?php
|
|
||||||
// @TODO(el): Remove that $firstRow thingy
|
|
||||||
$firstRow = true;
|
|
||||||
foreach ($memberships as $membership): ?>
|
|
||||||
<?php if ($firstRow): ?>
|
|
||||||
<?php $firstRow = false; ?>
|
|
||||||
<table data-base-target="_next" class="action-table listing-table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th class="membership-group"><?= $this->translate('Group'); ?></th>
|
|
||||||
<th class="membership-cancel"><?= $this->translate('Cancel', 'group.membership'); ?></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<?php endif ?>
|
|
||||||
<tr>
|
|
||||||
<td class="membership-group">
|
|
||||||
<?php if ($this->hasPermission('config/authentication/groups/show') && $membership->backend instanceof Selectable): ?>
|
|
||||||
<?= $this->qlink($membership->group_name, 'group/show', array(
|
|
||||||
'backend' => $membership->backend->getName(),
|
|
||||||
'group' => $membership->group_name
|
|
||||||
), array(
|
|
||||||
'title' => sprintf($this->translate('Show detailed information for group %s'), $membership->group_name)
|
|
||||||
)); ?>
|
|
||||||
<?php else: ?>
|
|
||||||
<?= $this->escape($membership->group_name); ?>
|
|
||||||
<?php endif ?>
|
|
||||||
</td>
|
|
||||||
<td class="membership-cancel" data-base-target="_self">
|
|
||||||
<?php if (isset($removeForm) && $membership->backend instanceof Reducible): ?>
|
|
||||||
<?= $removeForm->setAction($this->url('group/removemember', array(
|
|
||||||
'backend' => $membership->backend->getName(),
|
|
||||||
'group' => $membership->group_name
|
|
||||||
))); ?>
|
|
||||||
<?php else: ?>
|
|
||||||
-
|
|
||||||
<?php endif ?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php endforeach ?>
|
|
||||||
<?php if ($memberships->hasResult()): ?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<?php else: ?>
|
|
||||||
<p><?= $this->translate('No memberships found matching the filter'); ?></p>
|
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
|
<?php if (! $memberships->hasResult()): ?>
|
||||||
|
<p><?= $this->translate('No memberships found matching the filter'); ?></p>
|
||||||
</div>
|
</div>
|
||||||
|
<?php return; endif ?>
|
||||||
|
|
||||||
|
<table data-base-target="_next" class="action-table listing-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="membership-group"><?= $this->translate('Group'); ?></th>
|
||||||
|
<th class="membership-cancel"><?= $this->translate('Cancel', 'group.membership'); ?></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php foreach ($memberships as $membership): ?>
|
||||||
|
<tr>
|
||||||
|
<td class="membership-group">
|
||||||
|
<?php if ($this->hasPermission('config/authentication/groups/show') && $membership->backend instanceof Selectable): ?>
|
||||||
|
<?= $this->qlink($membership->group_name, 'group/show', array(
|
||||||
|
'backend' => $membership->backend->getName(),
|
||||||
|
'group' => $membership->group_name
|
||||||
|
), array(
|
||||||
|
'title' => sprintf($this->translate('Show detailed information for group %s'), $membership->group_name)
|
||||||
|
)); ?>
|
||||||
|
<?php else: ?>
|
||||||
|
<?= $this->escape($membership->group_name); ?>
|
||||||
|
<?php endif ?>
|
||||||
|
</td>
|
||||||
|
<td class="membership-cancel" data-base-target="_self">
|
||||||
|
<?php if (isset($removeForm) && $membership->backend instanceof Reducible): ?>
|
||||||
|
<?= $removeForm->setAction($this->url('group/removemember', array(
|
||||||
|
'backend' => $membership->backend->getName(),
|
||||||
|
'group' => $membership->group_name
|
||||||
|
))); ?>
|
||||||
|
<?php else: ?>
|
||||||
|
-
|
||||||
|
<?php endif ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
Loading…
x
Reference in New Issue
Block a user