summaryrefslogtreecommitdiffstats
path: root/application/views/scripts
diff options
context:
space:
mode:
authormichael pereira2011-03-09 20:54:27 +0100
committermichael pereira2011-03-09 20:54:27 +0100
commitfbff9df0469ee998389fa263d8638cc3bf3618b5 (patch)
tree04adfd6a021e574055469ce6d0469988cb4684bd /application/views/scripts
parentKCL und BootMenuFilter (diff)
parentFilterController Evaluate funktioniert (diff)
downloadpbs2-fbff9df0469ee998389fa263d8638cc3bf3618b5.tar.gz
pbs2-fbff9df0469ee998389fa263d8638cc3bf3618b5.tar.xz
pbs2-fbff9df0469ee998389fa263d8638cc3bf3618b5.zip
Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2
Diffstat (limited to 'application/views/scripts')
-rw-r--r--application/views/scripts/bootiso/index.phtml8
-rw-r--r--application/views/scripts/bootmenu/index.phtml22
-rw-r--r--application/views/scripts/bootos/index.phtml8
-rw-r--r--application/views/scripts/client/index.phtml8
-rw-r--r--application/views/scripts/config/index.phtml8
-rw-r--r--application/views/scripts/filter/index.phtml42
-rw-r--r--application/views/scripts/filter/testevaluate.phtml4
-rw-r--r--application/views/scripts/pool/index.phtml50
-rw-r--r--application/views/scripts/session/index.phtml10
9 files changed, 93 insertions, 67 deletions
diff --git a/application/views/scripts/bootiso/index.phtml b/application/views/scripts/bootiso/index.phtml
index 20de6a1..5e7da1e 100644
--- a/application/views/scripts/bootiso/index.phtml
+++ b/application/views/scripts/bootiso/index.phtml
@@ -28,22 +28,22 @@
<td><?php echo $this->escape(date('Y-m-d H:i:s', $bootiso->getCreated())); ?></td>
<td><?php echo $this->escape($bootiso->getExpires()); ?></td>
<td><?php echo $this->escape($bootiso->getPublic()); ?></td>
- <td><a href="<?php echo $this->url(
+ <td class='action'><a href="<?php echo $this->url(
array(
'controller' => 'bootiso',
'action' => 'editbootiso',
'bootisoID' => $bootiso->getID()
),
'default',
- true, false) ?>">Edit BootISO</a></td>
- <td><a href="<?php echo $this->url(
+ true, false) ?>"><img src='/media/img/edit.png' alt='Edit BootISO' /></a></td>
+ <td class='action'><a href="<?php echo $this->url(
array(
'controller' => 'bootiso',
'action' => 'deletebootiso',
'bootisoID' => $bootiso->getID()
),
'default',
- true) ?>">Delete BootISO</a></td>
+ true) ?>"><img src='/media/img/delete.png' alt='Delete BootISO'/></a></td>
</tr>
<?php endforeach; ?>
</table>
diff --git a/application/views/scripts/bootmenu/index.phtml b/application/views/scripts/bootmenu/index.phtml
index 019a799..6fb55e4 100644
--- a/application/views/scripts/bootmenu/index.phtml
+++ b/application/views/scripts/bootmenu/index.phtml
@@ -22,23 +22,23 @@
<td><?php echo $this->escape($bootmenu->getGroupID()); ?></td>
<td><?php echo $this->escape($bootmenu->getMembershipID()); ?></td>
<td><?php echo $this->escape(date('Y-m-d H:i:s', $bootmenu->getCreated())); ?></td>
- <td><a href="<?php echo $this->url(
+ <td class='action'><a href="<?php echo $this->url(
array(
'controller' => 'bootmenu',
'action' => 'editbootmenu',
'bootmenuID' => $bootmenu->getID()
),
'default',
- true, false) ?>">Edit Bootmenu</a></td>
- <td><a href="<?php echo $this->url(
+ true, false) ?>"><img src='/media/img/edit.png' alt='Edit Bootmenu'/></a></td>
+ <td class='action'><a href="<?php echo $this->url(
array(
'controller' => 'bootmenu',
'action' => 'deletebootmenu',
'bootmenuID' => $bootmenu->getID()
),
'default',
- true) ?>">Delete Bootmenu</a></td>
- <td><a href="<?php echo $this->url(
+ true) ?>"><img src='/media/img/delete.png' alt='Delete Bootmenu'/></a></td>
+ <td class='action'><a href="<?php echo $this->url(
array(
'controller' => 'bootmenu',
'action' => 'addbootmenuentry',
@@ -46,12 +46,12 @@
'maxorder' => count($this->bootmenuentrylist[$bootmenu->getID()])
),
'default',
- true) ?>">Add Entry</a></td>
+ true) ?>"><img src='/media/img/add.png' alt='Add Entry'/></a></td>
</tr>
<?php if(count($this->bootmenuentrylist[$bootmenu->getID()]) > 0):?>
<tr class=detail>
- <td></td>
+ <td class=arrowtop>↳</td>
<td colspan=7>
<table>
<tr>
@@ -78,7 +78,7 @@
<td><?php echo $this->escape($bootmenuentry->getkcl()); ?></td>
<td><?php echo "[".$this->escape($bootmenuentry->getConfigID()."] ". $config->getTitle()); ?></td>
<td><?php echo $this->escape($bootmenuentry->getOrder() + 1); ?></td>
- <td><a href="<?php echo $this->url(
+ <td class='action'><a href="<?php echo $this->url(
array(
'controller' => 'bootmenu',
'action' => 'editbootmenuentry',
@@ -88,15 +88,15 @@
'oldorder' => $bootmenuentry->getOrder()
),
'default',
- true, false) ?>">Edit Entry</a></td>
- <td><a href="<?php echo $this->url(
+ true, false) ?>"><img src='/media/img/edit.png' alt='Edit Entry'/></a></td>
+ <td class='action'><a href="<?php echo $this->url(
array(
'controller' => 'bootmenu',
'action' => 'removebootmenuentry',
'bootmenuentryID' => $bootmenuentry->getID()
),
'default',
- true) ?>">Remove Entry</a></td>
+ true) ?>"><img src='/media/img/delete.png' alt='Remove Entry'/></a></td>
</tr>
<?php endforeach; ?>
</table>
diff --git a/application/views/scripts/bootos/index.phtml b/application/views/scripts/bootos/index.phtml
index df4f072..6da7a16 100644
--- a/application/views/scripts/bootos/index.phtml
+++ b/application/views/scripts/bootos/index.phtml
@@ -35,22 +35,22 @@
<td><?php echo $this->escape(date('Y-m-d H:i:s', $bootos->getCreated())); ?></td>
<td><?php echo $this->escape($bootos->getExpires()); ?></td>
<td><?php echo $this->escape($bootos->getPublic()); ?></td>
- <td><a href="<?php echo $this->url(
+ <td class='action'><a href="<?php echo $this->url(
array(
'controller' => 'bootos',
'action' => 'editbootos',
'bootosID' => $bootos->getID()
),
'default',
- true, false) ?>">Edit BootOS</a></td>
- <td><a href="<?php echo $this->url(
+ true, false) ?>"><img src='/media/img/edit.png' alt='Edit BootOS'/></a></td>
+ <td class='action'><a href="<?php echo $this->url(
array(
'controller' => 'bootos',
'action' => 'deletebootos',
'bootosID' => $bootos->getID()
),
'default',
- true) ?>">Delete BootOS</a></td>
+ true) ?>"><img src='/media/img/delete.png' alt='Delete BootOS'/></a></td>
</tr>
<?php endforeach; ?>
</table>
diff --git a/application/views/scripts/client/index.phtml b/application/views/scripts/client/index.phtml
index 9ef344b..fd7725c 100644
--- a/application/views/scripts/client/index.phtml
+++ b/application/views/scripts/client/index.phtml
@@ -16,22 +16,22 @@
<td><?php echo $this->escape($client->getID()) ?></td>
<td class='monospace'><?php echo $this->escape($client->getMacadress()) ?></td>
<td class='monospace'><?php echo $this->escape($client->getHardwarehash()) ?></td>
- <td><a href="<?php echo $this->url(
+ <td class='action'><a href="<?php echo $this->url(
array(
'controller' => 'client',
'action' => 'editclient',
'clientID' => $client->getID()
),
'default',
- true) ?>">edit client</a></td>
- <td><a href="<?php echo $this->url(
+ true) ?>"><img src='/media/img/edit.png' alt='Edit Client'/></a></td>
+ <td class='action'><a href="<?php echo $this->url(
array(
'controller' => 'client',
'action' => 'removeclient',
'clientID' => $client->getID()
),
'default',
- true) ?>">remove client</a></td>
+ true) ?>"><img src='/media/img/delete.png' alt='Delete Client'/></a></td>
</tr>
<?php endforeach ?>
</table>
diff --git a/application/views/scripts/config/index.phtml b/application/views/scripts/config/index.phtml
index 6457d8f..5562b86 100644
--- a/application/views/scripts/config/index.phtml
+++ b/application/views/scripts/config/index.phtml
@@ -23,22 +23,22 @@
<td><?php echo $this->escape($config->getMembershipID()); ?></td>
<td><?php echo $this->escape($config->getShellscript()); ?></td>
<td><?php echo $this->escape(date('Y-m-d H:i:s', $config->getCreated())); ?></td>
- <td><a href="<?php echo $this->url(
+ <td class='action'><a href="<?php echo $this->url(
array(
'controller' => 'config',
'action' => 'editconfig',
'configID' => $config->getID()
),
'default',
- true, false) ?>">Edit Config</a></td>
- <td><a href="<?php echo $this->url(
+ true, false) ?>"><img src='/media/img/edit.png' alt='Edit Config'/></a></td>
+ <td class='action'><a href="<?php echo $this->url(
array(
'controller' => 'config',
'action' => 'deleteconfig',
'configID' => $config->getID()
),
'default',
- true) ?>">Delete Config</a></td>
+ true) ?>"><img src='/media/img/delete.png' alt='Delete Config'/></a></td>
</tr>
<?php endforeach; ?>
</table>
diff --git a/application/views/scripts/filter/index.phtml b/application/views/scripts/filter/index.phtml
index 253d14d..188bed3 100644
--- a/application/views/scripts/filter/index.phtml
+++ b/application/views/scripts/filter/index.phtml
@@ -1,5 +1,5 @@
<h1>Filters</h1>
-<?php echo $this->formButton('createconfig', 'Add Filter', array(
+<?php echo $this->formButton('createconfig', 'Create Filter', array(
'onclick' => 'self.location="/filter/addfilter"',
'class' => 'addbutton'))?>
@@ -8,6 +8,7 @@
<tr>
<th>ID</th>
<th>Title</th>
+ <th>Description</th>
<th>Priority</th>
<th>TargetBootMenu</th>
<th colspan=3>Actions</th>
@@ -16,40 +17,45 @@
<tr class='entry'>
<td><?php echo $this->escape($filter->getID()) ?></td>
<td><?php echo $this->escape($filter->title) ?></td>
+ <td><?php echo $this->escape($filter->Description) ?></td>
<td><?php echo $this->escape($filter->priority) ?></td>
<td><?php echo $this->escape($filter->bootmenuID) ?></td>
- <td><a href="<?php echo $this->url(
+ <td class='action'><a href="<?php echo $this->url(
array(
'controller' => 'filter',
'action' => 'editfilter',
'filterID' => $filter->getID()
),
'default',
- true) ?>">edit filter</a></td>
- <td><a href="<?php echo $this->url(
+ true) ?>"><img src='/media/img/edit.png' alt='Edit Filter'/></a></td>
+ <td class='action'><a href="<?php echo $this->url(
array(
'controller' => 'filter',
'action' => 'removefilter',
'filterID' => $filter->getID()
),
'default',
- true) ?>">delete filter</a></td>
- <td><a href="<?php echo $this->url(
+ true) ?>"><img src='/media/img/delete.png' alt='Delete Filter'/></a></td>
+ <td class='action'><a href="<?php echo $this->url(
array(
'controller' => 'filter',
'action' => 'addfilterentry',
'filterID' => $filter->getID()
),
'default',
- true) ?>">add filterentry</a></td>
+ true) ?>"><img src='/media/img/add.png' alt='Add Filterentry'/></a></td>
</tr>
+ <?php
+ $fe = new Application_Model_FilterEntriesMapper();
+ # print_a($erg = $fe->findBy('filterID',$filter->getID()));
+ $erg = $fe->findBy('filterID',$filter->getID());
+ ?>
+ <?php if (count($erg)>0): ?>
<tr class=detail>
- <td></td>
- <td colspan=6>
+ <td class=arrowtop>↳</td>
+ <td colspan=7>
<?php
- $fe = new Application_Model_FilterEntriesMapper();
- # print_a($erg = $fe->findBy('filterID',$filter->getID()));
- $erg = $fe->findBy('filterID',$filter->getID());
+
?>
<table>
<tr>
@@ -74,28 +80,29 @@
?></td>
<td><?php echo $filterentry['filtervalue'];?></td>
<td><?php echo $filterentry['filtervalue2'];?></td>
- <td><a href="<?php echo $this->url(
+ <td class='action'><a href="<?php echo $this->url(
array(
'controller' => 'filter',
'action' => 'editfilterentry',
'filterentriesID' => $filterentry['filterentriesID']
),
'default',
- true) ?>">edit filterentry</a>
- <td><a href="<?php echo $this->url(
+ true) ?>"><img src='/media/img/edit.png' alt='Edit Filterentry'/></a>
+ <td class='action'><a href="<?php echo $this->url(
array(
'controller' => 'filter',
'action' => 'removefilterentry',
'filterentriesID' => $filterentry['filterentriesID']
),
'default',
- true) ?>">remove filterentry</a>
+ true) ?>"><img src='/media/img/delete.png' alt='Delete Filterentry'/></a>
</tr>
<?php endforeach ?>
</table>
</td>
</tr>
+ <?php endif;?>
<?php endforeach ?>
</table>
@@ -105,3 +112,6 @@
<p>There are no filters to display.</p>
<?php endif;?>
+<?php echo $this->formButton('createconfig', 'Test Filters', array(
+ 'onclick' => 'self.location="/filter/testevaluate"',
+ 'class' => 'addbutton'))?>
diff --git a/application/views/scripts/filter/testevaluate.phtml b/application/views/scripts/filter/testevaluate.phtml
new file mode 100644
index 0000000..8a10629
--- /dev/null
+++ b/application/views/scripts/filter/testevaluate.phtml
@@ -0,0 +1,4 @@
+<h1>Test Filters</h1>
+
+<?php
+echo $this->filterevaluate;
diff --git a/application/views/scripts/pool/index.phtml b/application/views/scripts/pool/index.phtml
index 68fcbc4..2c6ba16 100644
--- a/application/views/scripts/pool/index.phtml
+++ b/application/views/scripts/pool/index.phtml
@@ -18,33 +18,38 @@
<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><a href="<?php echo $this->url(
+ <td class='action'><a href="<?php echo $this->url(
array(
'controller' => 'pool',
'action' => 'editpool',
'poolID' => $pool->getID()
),
'default',
- true) ?>">edit pool</a></td>
- <td><a href="<?php echo $this->url(
+ 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) ?>">delete pool</a></td>
- <td><a href="<?php echo $this->url(
+ 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) ?>">link client</a></td>
+ 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></td>
+ <td class=arrowtop>↳</td>
<td colspan=6>
<table>
<tr>
@@ -54,8 +59,6 @@
<th>Actions</th>
</tr>
<?php
- $poolentriesMapper = new Application_Model_PoolEntriesMapper();
- $clients = $poolentriesMapper->findBy('poolID',$pool->getID());
foreach ($clients as $client): ?>
<tr>
<td><?php echo $client['clientID'];?></td>
@@ -66,25 +69,29 @@
?>
<td><?php echo ($cli->macAdress); ?></td>
<td><?php echo ($cli->hardwarehash); ?></td>
- <td><a href="<?php echo $this->url(
+ <td class='action'><a href="<?php echo $this->url(
array(
'controller' => 'pool',
'action' => 'unlinkclient',
'poolentriesID' => $client['poolentriesID']
),
'default',
- true) ?>">unlink client</a></td>
+ 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 border=1 >
-<tr><th>ClientID</th><th>MacAdress</th><th>Hardwarehash</th>
-<?php foreach ($this->pools as $pool): ?>
- <th><?php echo $this->escape($pool->getTitle()) ?></th>
- <?php endforeach ?>
+<table >
+<tr>
+<th>ClientID</th>
+<th>MacAdress</th>
+<th>Hardwarehash</th>
+<th>Actions</th>
</tr>
<?php
foreach ($this->freeclients as $client): ?>
@@ -92,8 +99,10 @@ foreach ($this->freeclients as $client): ?>
<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): ?>
- <td><a href='<?php echo $this->url(
+ <option value="<?php echo $this->url(
array(
'controller' => 'pool',
'action' => 'linkclient',
@@ -101,8 +110,11 @@ foreach ($this->freeclients as $client): ?>
'poolID' => $pool->getID(),
),
'default',
- true) ?>'>link</a></td>
- <?php endforeach ?>
+ 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>
diff --git a/application/views/scripts/session/index.phtml b/application/views/scripts/session/index.phtml
index f98fa48..6e87acf 100644
--- a/application/views/scripts/session/index.phtml
+++ b/application/views/scripts/session/index.phtml
@@ -19,25 +19,25 @@
<td><?php echo $this->escape($session->getClientID()) ?></td>
<td><?php echo $this->escape($session->getBootosID()) ?></td>
<td><?php echo $this->escape($session->getBootisoID()) ?></td>
- <td><?php echo $this->escape($session->getTime()) ?></td>
+ <td><?php echo date('d.m.Y H:i',$this->escape($session->getTime())) ?></td>
<td><?php echo $this->escape($session->getIp()) ?></td>
<td><?php echo $this->escape($session->getIp6()) ?></td>
- <td><a href="<?php echo $this->url(
+ <td class='action'><a href="<?php echo $this->url(
array(
'controller' => 'session',
'action' => 'editsession',
'sessionID' => $session->getID()
),
'default',
- true) ?>">edit filter</a></td>
- <td><a href="<?php echo $this->url(
+ true) ?>"><img src='/media/img/edit.png' alt='Edit Filter'/></a></td>
+ <td class='action'><a href="<?php echo $this->url(
array(
'controller' => 'session',
'action' => 'deletesession',
'sessionID' => $session->getID()
),
'default',
- true) ?>">delete filter</a></td>
+ true) ?>"><img src='/media/img/delete.png' alt='Delete Filter'/></a></td>
</tr>
<?php endforeach ?>
</table>