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
<div id="primary_information">
<ul>
<?php foreach ($departments as $department): ?>
	<li>		
		<a href="service_groups/<?=$department['Department']['name'];?>">
			<?=$department['Department']['name'];?>
		</a>
		
		<?php $childServices = array_merge($department['ServiceGroup'],$department['Service']);?>
		<?php foreach ($childServices as $childService): ?>
		<ul>
			<li>
				<a href="/iss_organisation/service_groups/view/<?=$childService['name'];?>">
					<?=$childService['name'];?>
				</a>
			</li>
						
			<?php if(in_array($this->passedArgs[0],$childService)): //sap systems ?>
				<?php foreach ($service_groups as $service_group): ?>
					<?php if($service_group['ServiceGroup']['name']==$this->passedArgs[0]): ?>
						<ul>
							<?php foreach($service_group['Service'] as $service): ?>
								<li>
									<a href="#">
										<?=$service['name'];?>
									</a>	
								</li>		
							<?php endforeach; ?>
						</ul>
					<?php endif; ?>
				<?php endforeach; ?>
			<?php endif ?> 			
			
		</ul>		
		<?php endforeach; ?>		
		
	</li>
<?php endforeach; ?>
</ul>
</div>

<?=pr($this);?>