summaryrefslogtreecommitdiffstats
path: root/application/views/scripts/event/showreports.phtml
blob: 136d0064d3ca99ef5fb4792a3ea695dbfb1348c7 (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
<h1>Reports <?php echo $this->eventTitle; ?></h1>
<div class='listelement'>
<?php
if(count($this->reportlist) > 0) {
	foreach($this->reportlist as $k => $report) {
?>
	<div class='element'>
		<div class='number'>
			<div class='smallnumber'>Report</div>
  			<?php echo $k+1 ?>
  		</div>
		<div class='content'>  	
			<div class='actions'>
				<a href="<?php echo $this->url(
						array(
							'controller' => 'event',
							'action'     => 'deletereport',
							'reportID'   =>  $report->getID()
						),
						'default',
						true) ?>"> <img src='/media/img/delete.png' alt='Delete Group' />
				</a>
			</div>
			<div class='title'><?php echo $report->getResult();?></div>	
			<div class='subtitle'><?php echo $report->getType(); ?>&nbsp;</div>
			<div class='details dispnone'>
				<label>Finished:</label>
				<div class='item'><?php echo date("m/d/Y H:i", $report->getCreated());?>&nbsp;</div>
			<?php if($report->getErrors()) {
				$errors = json_decode($report->getErrors());
				if(count($errors) > 0) {
					$errorString = "";
					foreach($errors as $k => $error) {
						$errorString .= "Client " . $k . " (" . $this->clients[$k]->getIp() . "): " . $error . "<br />";
					} ?>
				<label>Errors:</label>
				<div class='item'><?php echo $errorString; ?>&nbsp;</div>
				<?php } ?>
			<?php } ?>
			</div>
		</div>
		<div class='clear'></div>
	</div>
<?php
	}
?>
</div>
<?php
	echo $this->pagination;
} else {
	?>
<br />
<br />
<h3>No reports for this Event available.</h3>
<?php
}