summaryrefslogtreecommitdiffstats
path: root/application/modules/user/views/scripts/config/showconfig.phtml
blob: 95e5742bc705ebfc654a83eb21f12966441cd498 (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
<h1>Details of 
<?php echo $this->config; if(Pbs_Acl::checkRight('csui')): ?><img class='helpericon' src='/media/img/bulb_off.png' /><?php endif; ?></h1>
<?php if($this->notification != ''){echo $this->notification;} ?>

<?php if(Pbs_Acl::checkRight('csui')): ?>
<div class='helper infobox'>Here you the the available Configs which you can select to your BootOS. The Config does some modification to the selected BootOs after the start. In Most Cases you don't have to change here anything.</div>
<?php endif; ?>

<h2>Userlist</h2>

<?php if((Pbs_Acl::checkRight('cc') &&  $this->type == 'group') || (Pbs_Acl::checkRight('cco') &&  $this->type == 'own')): ?>
<?php echo $this->formButton('adduser', 'Add User', array(
							'onclick' => 'self.location="/user/config/adduser/configID/'.$this->configID.'/type/'.$this->type.'"',
							'class' => 'addbutton'))?>
<?php endif;?>

<div class='listelement'>
	<?php if(count($this->userlist)==0)
		echo "There are no Users to display." ?>
	<?php foreach ($this->userlist as $k => $user): ?>
	<div class='element'>
  		<div class='number'>
			<div class='smallnumber'>User</div>
  			<?php echo $k+1 ?>
  		</div>
  		<div class='content'>  	
  			<div class='actions'>
			  	<?php if(((Pbs_Acl::checkRight('ce') || Pbs_Acl::checkRight('cem')) && $this->type == 'group') || ($this->type == 'own' && Pbs_Acl::checkRight('ceo'))): ?>
  					<a href="<?php echo $this->url(
					array(
						'module'	=> 'user',
						'controller' => 'config',
						'action'     => 'edituser',
						'type' => $this->type,
						'bootosuserID'   =>  $user->getID(),
						'configID' => $this->configID
					),
					'default',
					true, false) ?>"><img src='/media/img/edit.png' alt='Edit User'/></a>
  					<a href="<?php echo $this->url(
					array(
						'module'	=> 'user',
						'controller' => 'config',
						'action'     => 'deleteuser',
						'type' => $this->type,
						'bootosuserID'   =>  $user->getID(),
						'configID' => $this->configID
					),
					'default',
					true, false) ?>"><img src='/media/img/delete.png' alt='Delete User'/></a>
				<?php endif; ?>
  			</div>	
  			<?php if(!Pbs_Acl::checkRight('csai')){
  							$user->setHometypeID(preg_replace("!^\[[0-9]+\]\s!",'',$user->getHometypeID()));
  						} ?>
	  		<div class='details'>
	  			<label>Login-Name</label>
				<div class='item'><?=  $user->getLogin() ?></div>	  			
				<label>Password</label>
	  			<div class='item'><?=  $user->getPassword() ?></div>
	  			<label>Hometype</label>
	  			<div class='item'><?=  $user->getHometypeID() ?></div>
	  			<label>Homepath</label>
	  			<div class='item'><?=  $user->getHomepath() ?></div>
	  			
	  		</div>
  		</div>
  		<div class='clear'></div>
	</div>
	<?php endforeach; ?>

</div>

<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>