xref: /plugin/bez/tpl/report.php (revision ea5c5471cb346e25ccbc3aefb2c799ea52430ef4)
1<h1 class="bez_report">
2<?php echo $template['title'] ?>
3</h1>
4
5<h2><?php echo $bezlang['report_issues'] ?></h2>
6<table class="bez_sumarise">
7	<tr>
8		<th><?php echo $bezlang['type'] ?></th>
9		<th><?php echo $bezlang['number'] ?></th>
10		<th><?php echo $bezlang['totalcost'] ?></th>
11		<?php if (!isset($this->report_open)): ?>
12		<th><?php echo $bezlang['report_priority'] ?></th>
13		<?php endif ?>
14	</tr>
15	<?php foreach ($template['report']['issues'] as $issue): ?>
16		<tr>
17			<td><?php echo $issue['type'] ?></td>
18			<td><?php echo $issue['number'] ?></td>
19			<td>
20				<?php if ($issue['totalcost'] == ''): ?>
21					<em><?php echo $bezlang['ns'] ?></em>
22				<?php else: ?>
23					<?php echo $issue['totalcost'] ?>
24				<?php endif ?>
25			</td>
26			<?php if (!isset($this->report_open)): ?>
27			<td><?php echo $issue['average'] ?></td>
28			<?php endif ?>
29		</tr>
30	<?php endforeach ?>
31	<tr>
32		<th><?php echo $bezlang['report_total'] ?></th>
33		<td><?php echo $template['report']['issues_total'] ?></td>
34		<td><?php echo $template['report']['issues_totalcost'] ?></td>
35		<?php if (!isset($this->report_open)): ?>
36		<td><?php echo $template['report']['issues_average'] ?></td>
37		<?php endif ?>
38	</tr>
39</table>
40<h2><?php echo $bezlang['report_tasks'] ?></h2>
41<table class="bez_sumarise">
42	<tr>
43		<th><?php echo $bezlang['class'] ?></th>
44		<th><?php echo $bezlang['number'] ?></th>
45		<th><?php echo $bezlang['totalcost'] ?></th>
46		<?php if (!isset($this->report_open)): ?>
47			<th><?php echo $bezlang['report_priority'] ?></th>
48		<?php endif ?>
49	</tr>
50	<?php foreach ($template['report']['tasks'] as $task): ?>
51		<tr>
52			<td><?php echo $task['action'] ?></td>
53			<td><?php echo $task['number'] ?></td>
54			<td>
55				<?php if ($task['totalcost'] == ''): ?>
56					<em><?php echo $bezlang['ns'] ?></em>
57				<?php else: ?>
58					<?php echo $task['totalcost'] ?>
59				<?php endif ?>
60			</td>
61			<?php if (!isset($this->report_open)): ?>
62				<td><?php echo $task['average'] ?></td>
63			<?php endif ?>
64		</tr>
65	<?php endforeach ?>
66	<tr>
67		<th><?php echo $bezlang['report_total'] ?></th>
68		<td><?php echo $template['report']['tasks_total'] ?></td>
69		<td><?php echo $template['report']['tasks_totalcost'] ?></td>
70		<?php if (!isset($this->report_open)): ?>
71			<td><?php echo $template['report']['tasks_average'] ?></td>
72		<?php endif ?>
73	</tr>
74</table>
75
76<h2><?php echo $bezlang['report_causes'] ?></h2>
77<table class="bez_sumarise">
78	<tr>
79		<th><?php echo $bezlang['root_cause'] ?></th>
80		<th><?php echo $bezlang['number'] ?></th>
81	</tr>
82	<?php foreach ($template['report']['causes'] as $cause): ?>
83		<tr>
84			<td><?php echo $cause['rootcause'] ?></td>
85			<td><?php echo $cause['number'] ?></td>
86		</tr>
87	<?php endforeach ?>
88	<tr>
89		<th><?php echo $bezlang['report_total'] ?></th>
90		<td><?php echo $template['report']['causes_total'] ?></td>
91	</tr>
92</table>
93
94<?php if (!isset($this->report_open)): ?>
95<h2><?php echo $bezlang['report_priority'] ?></h2>
96<table class="bez bez_sumarise">
97	<tr>
98		<th><?php echo $bezlang['priority'] ?></th>
99		<th><?php echo $bezlang['number'] ?></th>
100		<th><?php echo $bezlang['average'] ?></th>
101	</tr>
102	<?php foreach ($template['report']['priorities'] as $priority): ?>
103		<tr class="pr<?php echo $priority['priority_nr'] ?>">
104			<td><?php echo $priority['priority'] ?></td>
105			<td><?php echo $priority['number'] ?></td>
106			<td><?php echo $priority['average'] ?></td>
107		</tr>
108	<?php endforeach ?>
109	<tr>
110		<th><?php echo $bezlang['report_total'] ?></th>
111		<td><?php echo $template['report']['priorities_total'] ?></td>
112		<td><?php echo $template['report']['priorities_average'] ?></td>
113	</tr>
114</table>
115<?php endif ?>
116