summaryrefslogtreecommitdiffstats
path: root/application/modules/dev/views/scripts/filter/index.phtml
blob: fd46cd7b42bf35f3c63a77990cdebdfd50eea413 (plain) (blame)
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
<h1>Filters</h1>
<?php echo $this->formButton('createconfig', 'Create Filter', array(
							'onclick' => 'self.location="/dev/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'	=> 'dev',
						'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'	=> 'dev',
						'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'	=> 'dev',
						'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(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'	=> 'dev',
							'controller' => 'filter',
							'action'     => 'editfilterentry',
							'filterentriesID'	=> $filterentry['filterentriesID']
						),
						'default',
						true) ?>"><img src='/media/img/edit.png' alt='Edit Filterentry'/></a></td>
						<td class='action'><a href="<?php echo $this->url(
						array(
							'module'	=> 'dev',
							'controller' => 'filter',
							'action'     => 'removefilterentry',
							'filterentriesID'	=> $filterentry['filterentriesID']
						),
						'default',
						true) ?>"><img src='/media/img/delete.png' alt='Delete Filterentry'/></a></td>		
						</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="/dev/filter/testevaluate"',
							'class' => 'addbutton'))?>