summaryrefslogtreecommitdiffstats
path: root/application/modules/user/views/scripts/filter/index.phtml
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules/user/views/scripts/filter/index.phtml')
-rw-r--r--application/modules/user/views/scripts/filter/index.phtml124
1 files changed, 123 insertions, 1 deletions
diff --git a/application/modules/user/views/scripts/filter/index.phtml b/application/modules/user/views/scripts/filter/index.phtml
index bace90f..94d77d7 100644
--- a/application/modules/user/views/scripts/filter/index.phtml
+++ b/application/modules/user/views/scripts/filter/index.phtml
@@ -1 +1,123 @@
-<br /><br /><center>View script for controller <b>Filter</b> and script/action name <b>index</b></center> \ No newline at end of file
+<h1>Filters</h1>
+<?php if($this->notification != ''){echo $this->notification;} ?>
+<?php echo $this->formButton('createconfig', 'Create Filter', array(
+ 'onclick' => 'self.location="/user/filter/addfilter"',
+ 'class' => 'addbutton'))?>
+
+<?php if ($this->filters): ?>
+ <table>
+ <tr>
+ <th>ID</th>
+ <th>Title</th>
+ <th>Description</th>
+ <th>Priority</th>
+ <th>TargetBootMenu</th>
+ <th colspan=3>Actions</th>
+ </tr>
+ <?php foreach ($this->filters as $filter): ?>
+ <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 class='action'><a href="<?php echo $this->url(
+ array(
+ 'module' => 'user',
+ 'controller' => 'filter',
+ 'action' => 'editfilter',
+ 'filterID' => $filter->getID()
+ ),
+ 'default',
+ true) ?>"><img src='/media/img/edit.png' alt='Edit Filter'/></a></td>
+ <td class='action'><a href="<?php echo $this->url(
+ array(
+ 'module' => 'user',
+ 'controller' => 'filter',
+ 'action' => 'removefilter',
+ 'filterID' => $filter->getID()
+ ),
+ 'default',
+ true) ?>"><img src='/media/img/delete.png' alt='Delete Filter'/></a></td>
+ <td class='action'><a href="<?php echo $this->url(
+ array(
+ 'module' => 'user',
+ 'controller' => 'filter',
+ 'action' => 'addfilterentry',
+ 'filterID' => $filter->getID()
+ ),
+ 'default',
+ 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 class=arrowtop>↳</td>
+ <td colspan=7>
+ <?php
+
+ ?>
+ <table>
+ <tr>
+ <th>Filtertype</th>
+ <th>Value</th>
+ <th>Value2</th>
+ <th colspan=2>Actions</th>
+ </tr>
+ <?php foreach ($erg as $filterentry): ?>
+
+ <tr>
+ <td><?php
+
+ $filter2 = new Application_Model_FilterTypeMapper();
+ $erg = new Application_Model_FilterType();
+ $filter2->find($filterentry['filtertypeID'],$erg);
+ //name zur ID finden
+ echo "[".$filterentry['filtertypeID']."] ";
+ echo $erg->getFiltertypename();
+
+
+ ?></td>
+ <td><?php echo $filterentry['filtervalue'];?></td>
+ <td><?php echo $filterentry['filtervalue2'];?></td>
+ <td class='action'><a href="<?php echo $this->url(
+ array(
+ 'module' => 'user',
+ 'controller' => 'filter',
+ 'action' => 'editfilterentry',
+ 'filterentriesID' => $filterentry['filterentriesID']
+ ),
+ 'default',
+ true) ?>"><img src='/media/img/edit.png' alt='Edit Filterentry'/></a>
+ <td class='action'><a href="<?php echo $this->url(
+ array(
+ 'module' => 'user',
+ 'controller' => 'filter',
+ 'action' => 'removefilterentry',
+ 'filterentriesID' => $filterentry['filterentriesID']
+ ),
+ 'default',
+ true) ?>"><img src='/media/img/delete.png' alt='Delete Filterentry'/></a>
+ </tr>
+
+ <?php endforeach ?>
+ </table>
+ </td>
+ </tr>
+ <?php endif;?>
+ <?php endforeach ?>
+ </table>
+
+
+<?php else: ?>
+
+ <p>There are no filters to display.</p>
+
+<?php endif;?>
+<?php echo $this->formButton('createconfig', 'Test Filters', array(
+ 'onclick' => 'self.location="/user/filter/testevaluate"',
+ 'class' => 'addbutton'))?>