-
Notifications
You must be signed in to change notification settings - Fork 275
/
resource.phtml
68 lines (68 loc) · 2.4 KB
/
resource.phtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<div class="controls">
<?= $tabs ?>
</div>
<div class="content" data-base-target="_next">
<a href="<?= $this->href('config/createresource') ?>">
<?= $this->icon('plus') ?> <?= $this->translate('Create A New Resource') ?>
</a>
<table class="action-table listing-table">
<thead>
<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>
<center>
<?= $this->qlink(
'',
'config/removeresource',
array('resource' => $name),
array(
'class' => 'action-link',
'icon' => 'cancel',
'title' => sprintf($this->translate('Remove resource %s'), $name)
)
) ?>
</center>
</td>
</tr>
<?php endforeach ?>
</tbody>
</table>
</div>