summaryrefslogtreecommitdiffstats
path: root/application/modules/fbgui/views/scripts/index/index.phtml
blob: 60ec5a89c4e84b5c5509e29a473a9b722bcca220 (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
<?php if(isset($this->entries)):?>
	<script>
	$(document).ready(function(){	
		$('.menu').click(function(){
			$('.menu').removeClass('selected');
			$(this).addClass('selected');			
			$("#selectedBootOs").val($(this).find('.id').val());
		});
	});
	function start(){
		if($('#selectedBootOs').val() != ''){
			window.location='/fbgui/index/start/bme/'+$('#selectedBootOs').val();
		}
		else{
			alert('You have to select a BootOs');
		}
	}
	</script>
	<h1>Bootmenu</h1>
	<?php foreach($this->entries as $entry):?>
		<?php
			$bootosMapper = new Application_Model_BootOsMapper();
			$bootos = new Application_Model_BootOs();
			$bootos = $bootosMapper->find($entry->getBootosID());
			#print_a($entry->getBootosID(),$bootos);
		?>
		<div id="menu_item_1" class="menu"  class="flexbox"> 
			<img src="/media/img/os/ubuntu.png"/> 
			<h2><?php echo $entry->getTitle(); ?></h2>
			<i><?php echo $bootos->getTitle();?></i> 
			<p><?php echo $bootos->getDescription();?></p> 
			<input type="hidden" class="id" value="<?php echo $entry->getID();?>"/> 
		</div> 
	<?php endforeach; ?>

	<input style="display:none;" type='text' id="selectedBootOs" />

	<div class="right" style='cursor:pointer;' onClick="start();">
		<img style='vertical-align:-8px;' src='/media/img/startOs.png'>
		<span style='font-size:18px;'>Start System</span>
	</div>	
<?php endif;?>