Skip to content

Commit

Permalink
Fix config/resource markup
Browse files Browse the repository at this point in the history
refs #5543
  • Loading branch information
lippserd committed Sep 30, 2015
1 parent 22718f1 commit aec7465
Showing 1 changed file with 62 additions and 59 deletions.
121 changes: 62 additions & 59 deletions application/views/scripts/config/resource.phtml
@@ -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>

0 comments on commit aec7465

Please sign in to comment.