summaryrefslogtreecommitdiffstats
path: root/application/modules/user/views/scripts/person/index.phtml
blob: 130429996835db2f3bc52a6551aa69c60d6e230b (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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<h1>Persons Overview</h1>
<?php echo $this->searchform; ?>
<div class='searchvars'>
<div class='head'>Available searchfilter:</div>
<div class='code'>title</div>
<div class='code'>name</div>
<div class='code'>firstname</div>
<div class='code'>email</div>
</div>

<div class='listelement'><?php if(count($this->personList)==0)
echo "There are no Persons to display." ?> <?php foreach ($this->personList as $k => $person): ?>
<?php
$class='';
if($person->getID() == $this->userIDsNamespace['personID'])
$class= 'highlight checked';
?>
<div class='element<?php echo " $class";?>'>
<?php if($person->getID() != $this->userIDsNamespace['personID']) {
	?>
	<div class='number'>
		<div class='smallnumber'>Person</div>
		<?php echo $k+1; ?>
	</div>
<?php
}
?>
<div class='content'>
<div class='actions'><?php
if($person->getID() == $this->userIDsNamespace['personID']) {
	if($this->showRight === true) {
		?> <a
	href="<?php echo $this->url(
						array(
							'module'	=> 'user',
							'controller' => 'person',
							'action'     => 'owndetails'
						),
						'default',
						true);?>"> <img src='/media/img/show.png' alt='Show Person' /></a>
						<?php
	}
	if($this->editRight === true) { ?> <a
	href="<?php echo $this->url(
						array(
							'module'	=> 'user',
							'controller' => 'person',
							'action'     => 'edit'
						),
						'default',
						true);?>"> <img src='/media/img/edit.png' alt='Edit Person' /></a>
						<?php
	}
	if($this->deleteRight === true) { ?> <a
	href="<?php echo $this->url(
						array(
							'module'	=> 'user',
							'controller' => 'auth',
							'action'     => 'delete'
						),
						'default',
						true);?>"> <img src='/media/img/delete.png' alt='Delete Account' /></a>
						<?php
	}
} else {
	if($this->showOtherRight === true) {
		?> <a
	href=" <?php echo $this->url(
						array(
							'module'	=> 'user',
							'controller' => 'person',
							'action'     => 'show',
							'personID'   =>  $person->getID()
						),
						'default',
						true); ?>"> <img src='/media/img/show.png' alt='Show Person' /></a>
						<?php
	}
	if($this->editOtherRight === true) {
		?> <a
	href=" <?php echo $this->url(
						array(
							'module'	=> 'user',
							'controller' => 'person',
							'action'     => 'edit',
							'personID'   =>  $person->getID()
						),
						'default',
						true); ?>"> <img src='/media/img/edit.png' alt='Edit Person' /></a>
						<?php
	}
	if($this->deleteOtherRight === true) {
		?> <a
	href=" <?php echo $this->url(
						array(
							'module'	=> 'user',
							'controller' => 'auth',
							'action'     => 'delete',
							'personID'   =>  $person->getID()
						),
						'default',
						true); ?>"> <img src='/media/img/delete.png' alt='Delete Account' /></a>
						<?php
	}
}
?></div>
<div class='title'><?php echo $person->getTitle(); ?>&nbsp;<?php echo $person->getFirstname(); ?>&nbsp;<?php echo $person->getName(); ?></div>
<div class='subtitle'><?php echo $person->getEmail(); ?></div>
</div>
<div class='clear'></div>
</div>
<?php endforeach ?></div>

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

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