summaryrefslogtreecommitdiffstats
path: root/application/modules/user/views/scripts/preboot/index.phtml
blob: ddcc5e5fdd7303033ec7e09384f49f8370567142 (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
<h1>Preboot</h1>
<?php if($this->notification != ''){echo $this->notification;} ?>
<?php echo $this->searchform; ?>
					
<?php if(Pbs_Acl::checkRight('prc')): ?>
<?php echo $this->formButton('createpreboot', 'Create PreBoot', array(
							'onclick' => 'self.location="/user/preboot/createpreboot/page/'.$this->page.'"',
							'class' => 'addbutton'))?>
<?php endif;?>
<div class='searchvars'>
	<div class='head'>Available searchfilter:</div>
	<div class='code'>prebootID</div>
	<div class='code'>title</div>
	<div class='code'>description</div>
	<div class='code'>preboottypeID</div>
	<div class='code'>serialnumber</div>
	<div class='code'>created</div>
	<div class='code'>source</div>
</div>

<div class='listelement'>
	<?php if(count($this->prebootlist)==0)
  		echo "There are no Preboot entries to display." ?>
  <?php foreach ($this->prebootlist as $k => $preboot): ?>
	<div class='element'>
  		<div class='number'>
			<div class='smallnumber'>Preboot</div>
  			<?php echo $k+1 ?>
  		</div>
  		<div class='content'>  			
	  		<div class='actions'>
				<?php if(Pbs_Acl::checkRight('pre') || Pbs_Acl::checkRight('prem')): ?>
			  		<a href="<?php echo $this->url(
						array(
							'module'	=> 'user',
							'controller' => 'preboot',
							'action'     => 'editpreboot',
							'prebootID'   =>  $preboot->getID(),
							'page'		=> $this->page
						),
						'default',
						true, false) ?>"><img src='/media/img/edit.png' alt='Edit Preboot' /></a>
				<?php endif; ?>
				<?php if(Pbs_Acl::checkRight('prd')): ?>
					<a href="<?php echo $this->url(
						array(
							'module'	=> 'user',
							'controller' => 'preboot',
							'action'     => 'deletepreboot',
							'prebootID'   =>  $preboot->getID(),
							'page'		=> $this->page
						),
						'default',
						true) ?>"><img src='/media/img/delete.png' alt='Delete Preboot'/></a>
				<?php endif; ?>
	  		</div>  
	  		<div class='title'>[<?php echo $this->escape($preboot->getPreBootTypeID()); ?>] <?php echo $this->escape($preboot->getTitle()); ?></div>
	  		<div class='subtitle'><?php echo $this->escape($preboot->getDescription()); ?></div>
	  		<div class='details'>
		  		<label>PrebootID</label>
		  			<div class='item'><?php echo $this->escape($preboot->getID()); ?></div>
		  		<label>Serialnumber</label>
		  			<div class='item'><?php echo $this->escape($preboot->getSerialnumber()); ?></div>		  			
	  			<label>Source</label>
	  				<div class='item'><?php echo $this->escape($preboot->getSource()); ?></div>
	  			<label>Changed</label>
	  				<div class='item'><?php echo $this->escape($preboot->getCreated()); ?></div>
	  		</div>
  		</div>
  		<div class='clear'></div>
	</div>
  <?php endforeach; ?>
</div>

<?php echo $this->pagination; ?>

<script type="text/javascript">
$(document).ready(function(){
	if($('.element').find('.dispnone').length >= 1){
		$(this).find('.title').css('cursor','pointer');
		
		$('.title').click(function(){
			$(this).siblings('.dispnone').toggle();
		});
	}
});
</script>