summaryrefslogtreecommitdiffstats
path: root/application/views/scripts/pool/index.phtml
diff options
context:
space:
mode:
Diffstat (limited to 'application/views/scripts/pool/index.phtml')
-rw-r--r--application/views/scripts/pool/index.phtml56
1 files changed, 54 insertions, 2 deletions
diff --git a/application/views/scripts/pool/index.phtml b/application/views/scripts/pool/index.phtml
index 989cf41..25f1528 100644
--- a/application/views/scripts/pool/index.phtml
+++ b/application/views/scripts/pool/index.phtml
@@ -1,5 +1,13 @@
<h1>Pools</h1>
+<a href="<?php echo $this->url(
+ array(
+ 'controller' => 'pool',
+ 'action' => 'createpool'
+ ),
+ 'default',
+ true) ?>">create pool</a>
+
<?php if ($this->pools): ?>
<!-- A table of filters. -->
@@ -19,12 +27,56 @@
<td><a href="<?php echo $this->url(
array(
'controller' => 'pool',
- 'action' => 'removepool',
+ 'action' => 'editpool',
'poolID' => $pool->getID()
),
'default',
- true) ?>">remove pool</a></td>
+ true) ?>">edit pool</a></td>
+ <td><a href="<?php echo $this->url(
+ array(
+ 'controller' => 'pool',
+ 'action' => 'deletepool',
+ 'poolID' => $pool->getID()
+ ),
+ 'default',
+ true) ?>">delete pool</a></td>
+ <td><a href="<?php echo $this->url(
+ array(
+ 'controller' => 'pool',
+ 'action' => 'linkclient',
+ 'poolID' => $pool->getID()
+ ),
+ 'default',
+ true) ?>">link client</a></td>
+ </tr>
+ <tr>
+ <td>
+ </td>
+ <td colspan=6><table border=1><tr><th>clientID</th><th>mac</th><th>hardwarehash</th></th>
+ <?php
+ $poolentriesMapper = new Application_Model_PoolEntriesMapper();
+ $clients = $poolentriesMapper->findBy('poolID',$pool->getID());
+ foreach ($clients as $client): ?>
+ <tr>
+ <td><?php echo $client['clientID'];?></td>
+ <?php
+ $cli = new Application_Model_Client();
+ $clientMapper = new Application_Model_ClientMapper();
+ $clientMapper->find($client['clientID'],$cli);
+ ?>
+ <td><?php echo ($cli->macAdress); ?></td>
+ <td><?php echo ($cli->hardwarehash); ?></td>
+ <td><a href="<?php echo $this->url(
+ array(
+ 'controller' => 'pool',
+ 'action' => 'unlinkclient',
+ 'poolentriesID' => $client['poolentriesID']
+ ),
+ 'default',
+ true) ?>">unlink client</a></td>
</tr>
+ <?php endforeach ?>
+ </table>
<?php endforeach ?>
</table>