1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
<h1>Filters</h1>
<?php if($this->notification != ''){echo $this->notification;} ?>
<?php echo $this->searchform; ?>
<?php echo $this->formButton('createconfig', 'Create Filter', array(
'onclick' => 'self.location="/user/filter/addfilter/page/'.$this->page.'"',
'class' => 'addbutton'))?>
<?php if ($this->filters): ?>
<table>
<tr>
<th>ID <span class='code'>filterID</span></th>
<th>Title <span class='code'>title</span></th>
<th>Description <span class='code'>description</span></th>
<th>Priority <span class='code'>priority</span></th>
<th>TargetBootMenu <span class='code'>bootmenuID</span></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(),
'page' => $this->page
),
'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(),
'page' => $this->page
),
'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(),
'page' => $this->page
),
'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(array('filterID' => $filter->getID()),true);
?>
<?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'],
'page' => $this->page
),
'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'],
'page' => $this->page
),
'default',
true) ?>"><img src='/media/img/delete.png' alt='Delete Filterentry'/></a>
</tr>
<?php endforeach ?>
</table>
</td>
</tr>
<?php endif;?>
<?php endforeach ?>
</table>
<?php echo $this->pagination; ?>
<?php else: ?>
<p>There are no filters to display.</p>
<?php endif;?>
|