summaryrefslogtreecommitdiffstats
path: root/application/views/scripts/filter/index.phtml
blob: 0de30a04c6408905a37a54642a6c64e994e79f7d (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
<h1>Filters</h1>
<?php echo $this->formButton('createconfig', 'Add Filter', array(
							'onclick' => 'self.location="/filter/addfilter"',
							'class' => 'addbutton'))?>

<?php if ($this->filters): ?>
    <table>
        <tr>
            <th>filterID</th>
			<th>Title</th>
			<th>Priority</th>
			<th>TargetBootMenu</th>
        </tr>
	<?php foreach ($this->filters as $filter): ?>
    <tr class='filter'>
			<td><?php echo $this->escape($filter->getID()) ?></td>
            <td><?php echo $this->escape($filter->title) ?></td>
			<td><?php echo $this->escape($filter->priority) ?></td>
			<td><?php echo $this->escape($filter->bootmenuID) ?></td>
			<td><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(
					array(
						'controller' => 'filter',
						'action'     => 'removefilter',
						'filterID'	=> $filter->getID()
					),
					'default',
					true) ?>">delete filter</a></td>
			<td><a href="<?php echo $this->url(
					array(
						'controller' => 'filter',
						'action'     => 'addfilterentry',
						'filterID'	=> $filter->getID()
					),
					'default',
					true) ?>">add filterentry</a></td>
			</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%;'>
					<tr>
						<th>Filtertype</th>
						<th>Value</th>
						<th>Value2</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><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(
						array(
							'controller' => 'filter',
							'action'     => 'removefilterentry',
							'filterentriesID'	=> $filterentry['filterentriesID']
						),
						'default',
						true) ?>">remove filterentry</a>		
						</tr>
					
				 <?php endforeach ?> 		
				</table>
			</td>			
        </tr>
    <?php endforeach ?> 
    </table>

	
<?php else: ?>
 
    <p>There are no filters to display.</p>
 
<?php endif;?>