Fix config/resource markup

refs #5543
This commit is contained in:
Eric Lippmann 2015-09-30 23:20:17 +02:00
parent 22718f158d
commit aec74659f0
1 changed files with 62 additions and 59 deletions

View File

@ -1,73 +1,76 @@
<div class="controls">
<?= $tabs ?>
</div>
<div class="content" data-base-target="_next">
<div class="content">
<?= $this->qlink(
$this->translate('Create A New Resource') ,
'config/createresource',
null,
array(
'class' => 'button action-link',
'icon' => 'plus',
'title' => $this->translate('Create a new resource')
'class' => 'button-link',
'data-base-target' => '_next',
'icon' => 'plus',
'title' => $this->translate('Create a new resource')
)
) ?>
<table class="action-table listing-table">
<thead>
<table class="action-table listing-table" data-base-target="_next">
<thead>
<tr>
<th><?= $this->translate('Resource') ?></th>
<th></th>
</thead>
<tbody>
<?php foreach ($this->resources as $name => $value): ?>
<tr>
<td>
<?php
switch ($value->type) {
case 'db':
$icon = 'database';
break;
case 'ldap':
$icon = 'sitemap';
break;
case 'livestatus':
$icon = 'flash';
break;
case 'ssh':
$icon = 'user';
break;
case 'file':
case 'ini':
$icon = 'doc-text';
break;
default:
$icon = 'edit';
break;
}
?>
<?= $this->qlink(
$name,
'config/editresource',
array('resource' => $name),
array(
'icon' => $icon,
'title' => sprintf($this->translate('Edit resource %s'), $name)
)
) ?>
</td>
<td class="text-right">
<?= $this->qlink(
'',
'config/removeresource',
array('resource' => $name),
array(
'class' => 'action-link',
'icon' => 'cancel',
'title' => sprintf($this->translate('Remove resource %s'), $name)
)
) ?>
</td>
</tr>
<?php endforeach ?>
</tbody>
</tr>
</thead>
<tbody>
<?php foreach ($this->resources as $name => $value): ?>
<tr>
<td>
<?php
switch ($value->type) {
case 'db':
$icon = 'database';
break;
case 'ldap':
$icon = 'sitemap';
break;
case 'livestatus':
$icon = 'flash';
break;
case 'ssh':
$icon = 'user';
break;
case 'file':
case 'ini':
$icon = 'doc-text';
break;
default:
$icon = 'edit';
break;
}
?>
<?= $this->qlink(
$name,
'config/editresource',
array('resource' => $name),
array(
'icon' => $icon,
'title' => sprintf($this->translate('Edit resource %s'), $name)
)
) ?>
</td>
<td class="icon-col text-right">
<?= $this->qlink(
'',
'config/removeresource',
array('resource' => $name),
array(
'class' => 'action-link',
'icon' => 'cancel',
'title' => sprintf($this->translate('Remove resource %s'), $name)
)
) ?>
</td>
</tr>
<?php endforeach ?>
</tbody>
</table>
</div>