summaryrefslogtreecommitdiffstats
path: root/application/modules/dev/views/scripts/pool/index.phtml
diff options
context:
space:
mode:
authorSimon2011-03-14 16:09:03 +0100
committerSimon2011-03-14 16:09:03 +0100
commitb5cbdd6b400aa1ec77c9846e9cc8d4257f437e3c (patch)
treefcef50ad1ddf831f457d6aecd83e7fdc63297a1c /application/modules/dev/views/scripts/pool/index.phtml
parentfooter bleibt am fensterbottom (diff)
downloadpbs2-b5cbdd6b400aa1ec77c9846e9cc8d4257f437e3c.tar.gz
pbs2-b5cbdd6b400aa1ec77c9846e9cc8d4257f437e3c.tar.xz
pbs2-b5cbdd6b400aa1ec77c9846e9cc8d4257f437e3c.zip
Application in 3 Modules gesplittet, Dev = unsere entwicklungsumgebung, user = die weboberfläche fr anwender mit acl etc, fbgui = für die fbgui truppe - links in dev müssen noch angepasst werden
Diffstat (limited to 'application/modules/dev/views/scripts/pool/index.phtml')
-rw-r--r--application/modules/dev/views/scripts/pool/index.phtml126
1 files changed, 126 insertions, 0 deletions
diff --git a/application/modules/dev/views/scripts/pool/index.phtml b/application/modules/dev/views/scripts/pool/index.phtml
new file mode 100644
index 0000000..2c6ba16
--- /dev/null
+++ b/application/modules/dev/views/scripts/pool/index.phtml
@@ -0,0 +1,126 @@
+<h1>Pools</h1>
+<?php echo $this->formButton('createconfig', 'Create Pool', array(
+ 'onclick' => 'self.location="/pool/createpool"',
+ 'class' => 'addbutton'))?>
+
+<?php if ($this->pools): ?>
+ <table >
+ <tr>
+ <th>ID</th>
+ <th>Title</th>
+ <th>Description</th>
+ <th>Location</th>
+ <th colspan=3>Actions</th>
+ </tr>
+ <?php foreach ($this->pools as $pool): ?>
+ <tr class=entry>
+ <td><?php echo $this->escape($pool->getID()) ?></td>
+ <td><?php echo $this->escape($pool->getTitle()) ?></td>
+ <td><?php echo $this->escape($pool->getDescription()) ?></td>
+ <td><?php echo $this->escape($pool->getLocation()) ?></td>
+ <td class='action'><a href="<?php echo $this->url(
+ array(
+ 'controller' => 'pool',
+ 'action' => 'editpool',
+ 'poolID' => $pool->getID()
+ ),
+ 'default',
+ true) ?>"><img src='/media/img/edit.png' alt='Edit Pool'/></a></td>
+ <td class='action'><a href="<?php echo $this->url(
+ array(
+ 'controller' => 'pool',
+ 'action' => 'deletepool',
+ 'poolID' => $pool->getID()
+ ),
+ 'default',
+ true) ?>"><img src='/media/img/delete.png' alt='Delete Pool'/></a></td>
+ <td class='action'><a href="<?php echo $this->url(
+ array(
+ 'controller' => 'pool',
+ 'action' => 'linkclient',
+ 'poolID' => $pool->getID()
+ ),
+ 'default',
+ true) ?>"><img src='/media/img/add.png' alt='Link Client'/></a></td>
+ </tr>
+ <?php
+ $poolentriesMapper = new Application_Model_PoolEntriesMapper();
+ $clients = $poolentriesMapper->findBy('poolID',$pool->getID());
+ ?>
+ <?php if (count($clients)>0): ?>
+ <tr class=detail>
+ <td class=arrowtop>↳</td>
+ <td colspan=6>
+ <table>
+ <tr>
+ <th>ClientID</th>
+ <th>Mac</th>
+ <th>Hardwarehash</th>
+ <th>Actions</th>
+ </tr>
+ <?php
+ 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 class='action'><a href="<?php echo $this->url(
+ array(
+ 'controller' => 'pool',
+ 'action' => 'unlinkclient',
+ 'poolentriesID' => $client['poolentriesID']
+ ),
+ 'default',
+ true) ?>"><img src='/media/img/delete.png' alt='Unlink Client'/></a></td>
+ </tr>
+ <?php endforeach ?>
+ </table>
+ </td>
+ </tr>
+ <?php endif;?>
+ <?php endforeach ?>
+ </table>
+<h2>Free clients</h2>
+<table >
+<tr>
+<th>ClientID</th>
+<th>MacAdress</th>
+<th>Hardwarehash</th>
+<th>Actions</th>
+</tr>
+<?php
+foreach ($this->freeclients as $client): ?>
+ <tr>
+ <td><?php echo $client['clientID']; ?></td>
+ <td><?php echo $client['macadress']; ?></td>
+ <td><?php echo $client['hardwarehash']; ?></td>
+ <td><select onChange="location.href=this.options[this.selectedIndex].value">
+ <option></option>
+ <?php foreach ($this->pools as $pool): ?>
+ <option value="<?php echo $this->url(
+ array(
+ 'controller' => 'pool',
+ 'action' => 'linkclient',
+ 'clientID' => $client['clientID'],
+ 'poolID' => $pool->getID(),
+ ),
+ 'default',
+ true) ?>"><?php echo $pool->getTitle(); ?></option>
+ <?php //<img src='/media/img/add.png' alt='Link to Pool'/></a></td> ?>
+ <?php endforeach ?>
+ </select>
+ </td>
+ </tr>
+<?php endforeach ?>
+</table>
+<?php else: ?>
+
+
+ <p>There are no pools to display.</p>
+
+<?php endif;?>