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