Fix markup in role/list

refs #5543
This commit is contained in:
Eric Lippmann 2015-09-30 11:37:21 +02:00
parent d5c82a6c82
commit 0af652bd56

View File

@ -12,31 +12,30 @@
'title' => $this->translate('Create a new role') 'title' => $this->translate('Create a new role')
) )
) ?> ) ?>
<div> <?php /** @var \Icinga\Application\Config $roles */ if ($roles->isEmpty()): ?>
<?php /** @var \Icinga\Application\Config $roles */ if ($roles->isEmpty()): ?> <p><?= $this->translate('No roles found.') ?></p>
<?= $this->translate('No roles found.') ?> <?php return; endif ?>
<?php else: ?> <table class="action-table listing-table" data-base-target="_next">
<table class="action-table listing-table" data-base-target="_next"> <thead>
<thead> <tr>
<tr> <th><?= $this->translate('Name') ?></th>
<th><?= $this->translate('Name') ?></th>
<!-- <th>--><?//= $this->translate('Permissions') ?><!--</th>--> <!-- <th>--><?//= $this->translate('Permissions') ?><!--</th>-->
<!-- <th>--><?//= $this->translate('Restrictions') ?><!--</th>--> <!-- <th>--><?//= $this->translate('Restrictions') ?><!--</th>-->
<th><?= $this->translate('Users') ?></th> <th><?= $this->translate('Users') ?></th>
<th><?= $this->translate('Groups') ?></th> <th><?= $this->translate('Groups') ?></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php foreach ($roles as $name => $role): /** @var object $role */ ?> <?php foreach ($roles as $name => $role): /** @var object $role */ ?>
<tr> <tr>
<td> <td>
<?= $this->qlink( <?= $this->qlink(
$name, $name,
'role/edit', 'role/edit',
array('role' => $name), array('role' => $name),
array('title' => sprintf($this->translate('Edit role %s'), $name)) array('title' => sprintf($this->translate('Edit role %s'), $name))
); ?> ); ?>
</td> </td>
<!-- <td>--><?//= $this->escape($role->permissions, 0, 50) ?><!--</td>--> <!-- <td>--><?//= $this->escape($role->permissions, 0, 50) ?><!--</td>-->
<!-- <td>--> <!-- <td>-->
<!-- --><?php <!-- --><?php
@ -59,23 +58,21 @@
<!-- </table>--> <!-- </table>-->
<!-- --><?php //endif ?> <!-- --><?php //endif ?>
<!-- </td>--> <!-- </td>-->
<td><?= $this->escape($role->users) ?></td> <td><?= $this->escape($role->users) ?></td>
<td><?= $this->escape($role->groups) ?></td> <td><?= $this->escape($role->groups) ?></td>
<td> <td>
<?= $this->qlink( <?= $this->qlink(
'', '',
'role/remove', 'role/remove',
array('role' => $name), array('role' => $name),
array( array(
'icon' => 'trash', 'icon' => 'trash',
'title' => sprintf($this->translate('Remove role %s'), $name) 'title' => sprintf($this->translate('Remove role %s'), $name)
) )
); ?> ); ?>
</td> </td>
</tr> </tr>
<?php endforeach ?> <?php endforeach ?>
</tbody> </tbody>
</table> </table>
<?php endif ?>
</div>
</div> </div>