diff options
Diffstat (limited to 'application/views/scripts')
| -rw-r--r-- | application/views/scripts/filter/index.phtml | 27 | ||||
| -rw-r--r-- | application/views/scripts/pool/createpool.phtml | 3 | ||||
| -rw-r--r-- | application/views/scripts/pool/editpool.phtml | 5 | ||||
| -rw-r--r-- | application/views/scripts/pool/index.phtml | 56 | ||||
| -rw-r--r-- | application/views/scripts/pool/linkclient.phtml | 3 | ||||
| -rw-r--r-- | application/views/scripts/pool/unlinkclient.phtml | 1 |
6 files changed, 79 insertions, 16 deletions
diff --git a/application/views/scripts/filter/index.phtml b/application/views/scripts/filter/index.phtml index bbc7374..a3e6f25 100644 --- a/application/views/scripts/filter/index.phtml +++ b/application/views/scripts/filter/index.phtml @@ -57,30 +57,33 @@ tr.filter{background-color:#DDD;} </tr> <tr><td></td> <td colspan=6> + <?php + $fe = new Application_Model_FilterEntriesMapper(); + # print_a($erg = $fe->findBy('filterID',$filter->getID())); + $erg = $fe->findBy('filterID',$filter->getID()); + ?> <table style='width:100%;'> - <?php foreach ($this->filterentries as $filterentry): ?> - <?php - // TODO: Quick and dirty - // hier wird die gesamte liste durchgegangen... unperformant - if($filterentry->filterID == $filter->getID()): ?> + <?php foreach ($erg as $filterentry): ?> + <tr> <td><?php + $filter2 = new Application_Model_FilterTypeMapper(); $erg = new Application_Model_FilterType(); - $filter2->find($filterentry->getFiltertypeID(),$erg); + $filter2->find($filterentry['filtertypeID'],$erg); //name zur ID finden - echo "[".$filterentry->getFiltertypeID()."] "; + echo "[".$filterentry['filtertypeID']."] "; echo $erg->getFiltertypename(); ?></td> - <td><?php echo $filterentry->getFiltervalue();?></td> - <td><?php echo $filterentry->getFiltervalue2();?></td> + <td><?php echo $filterentry['filtervalue'];?></td> + <td><?php echo $filterentry['filtervalue2'];?></td> <td><a href="<?php echo $this->url( array( 'controller' => 'filter', 'action' => 'editfilterentry', - 'filterentriesID' => $filterentry->getID() + 'filterentriesID' => $filterentry['filtertypeID'] ), 'default', true) ?>">edit filterentry</a> @@ -88,12 +91,12 @@ tr.filter{background-color:#DDD;} array( 'controller' => 'filter', 'action' => 'removefilterentry', - 'filterentriesID' => $filterentry->getID() + 'filterentriesID' => $filterentry['filtertypeID'] ), 'default', true) ?>">remove filterentry</a> </tr> - <?php endif; ?> + <?php endforeach ?> </table> </td> diff --git a/application/views/scripts/pool/createpool.phtml b/application/views/scripts/pool/createpool.phtml index 3d7f8ca..305b36e 100644 --- a/application/views/scripts/pool/createpool.phtml +++ b/application/views/scripts/pool/createpool.phtml @@ -1 +1,2 @@ -<br /><br /><center>View script for controller <b>Pool</b> and script/action name <b>createpool</b></center>
\ No newline at end of file +<?php +echo $this->addpool; diff --git a/application/views/scripts/pool/editpool.phtml b/application/views/scripts/pool/editpool.phtml index c70464e..359a5f9 100644 --- a/application/views/scripts/pool/editpool.phtml +++ b/application/views/scripts/pool/editpool.phtml @@ -1 +1,4 @@ -<br /><br /><center>View script for controller <b>Pool</b> and script/action name <b>editpool</b></center>
\ No newline at end of file +<h1>Edit Pool</h1> +<?php + +echo $this->editpoolform; 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> diff --git a/application/views/scripts/pool/linkclient.phtml b/application/views/scripts/pool/linkclient.phtml new file mode 100644 index 0000000..cbd2dd4 --- /dev/null +++ b/application/views/scripts/pool/linkclient.phtml @@ -0,0 +1,3 @@ +<h1>Link Clients</h1> +<?php +echo $this->poolclient; diff --git a/application/views/scripts/pool/unlinkclient.phtml b/application/views/scripts/pool/unlinkclient.phtml new file mode 100644 index 0000000..35aa9c5 --- /dev/null +++ b/application/views/scripts/pool/unlinkclient.phtml @@ -0,0 +1 @@ +<br /><br /><center>View script for controller <b>Pool</b> and script/action name <b>unlinkclient</b></center>
\ No newline at end of file |
