1<h1 class="bez_report">
2<?php echo $tpl->getLang('activity_report') ?>
3</h1>
4
5<div class="bez_filter_form">
6    <form action="<?php echo $tpl->url('activity_report') ?>" method="post">
7        <span class="datepair">
8            <label><?php echo $tpl->getLang('report from') ?>: <input name="from" value="<?php echo $tpl->value('from') ?>" class="date start" style="width: 90px"></label>
9            <label><?php echo $tpl->getLang('report to') ?>: <input name="to" value="<?php echo $tpl->value('to') ?>" class="date end" style="width: 90px"></label>
10        </span>
11        <button><?php echo $tpl->getLang('show') ?></button>
12    </form>
13
14</div>
15
16<h2><?php echo $tpl->getLang('activity_in_issues') ?></h2>
17
18<table class="bez_sumarise">
19	<tr>
20		<th><?php echo $tpl->getLang('user') ?></th>
21		<th><?php echo $tpl->getLang('reporter') ?></th>
22		<th><?php echo $tpl->getLang('coordinator') ?></th>
23		<th><?php echo $tpl->getLang('commentator') ?></th>
24		<th><?php echo $tpl->getLang('executor') ?></th>
25		<th><?php echo $tpl->getLang('report_total') ?></th>
26	</tr>
27	<?php $reporter = 0 ?>
28	<?php $total_total = 0 ?>
29	<?php $commentator = 0 ?>
30	<?php $coordinator = 0 ?>
31	<?php $executor = 0 ?>
32	<?php foreach ($tpl->get('thread_involvement') as $involvement): ?>
33		<tr>
34			<td>
35                <?php echo $tpl->user_name($involvement['user_id']) ?>
36			</td>
37			<td><?php echo $involvement['original_poster_sum'] ?></td>
38			<td><?php echo $involvement['coordinator_sum'] ?></td>
39			<td><?php echo $involvement['commentator_sum'] ?></td>
40			<td><?php echo $involvement['task_assignee_sum'] ?></td>
41            <?php $total = $involvement['original_poster_sum'] + $involvement['coordinator_sum'] + $involvement['commentator_sum'] + $involvement['task_assignee_sum'] ?>
42            <td><?php echo $total ?></td>
43		</tr>
44		<?php $reporter += $involvement['original_poster_sum'] ?>
45		<?php $coordinator += $involvement['coordinator_sum'] ?>
46        <?php $commentator += $involvement['commentator_sum'] ?>
47		<?php $executor += $involvement['task_assignee_sum'] ?>
48		<?php $total_total += $total ?>
49	<?php endforeach ?>
50	<tr>
51		<th><?php echo $tpl->getLang('report_total') ?></th>
52		<td><?php echo $reporter ?></td>
53		<td><?php echo $coordinator ?></td>
54        <td><?php echo $commentator ?></td>
55		<td><?php echo $executor ?></td>
56        <td><?php echo $total_total ?></td>
57	</tr>
58</table>
59<p style="font-weight: bold">KPI = <?php echo sprintf("%.2f", $tpl->get('kpi')) ?></p>
60<p style="font-weight: bold">% = <?php echo sprintf("%.2f", $tpl->get('bez_activity')) ?></p>
61
62
63<h2><?php echo $tpl->getLang('activity_in_tasks') ?></h2>
64<table class="bez_sumarise">
65	<tr>
66		<th><?php echo $tpl->getLang('user') ?></th>
67		<th><?php echo $tpl->getLang('reporter') ?></th>
68		<th><?php echo $tpl->getLang('commentator') ?></th>
69		<th><?php echo $tpl->getLang('executor') ?></th>
70		<th><?php echo $tpl->getLang('report_total') ?></th>
71	</tr>
72	<?php $reporter = 0 ?>
73	<?php $commentator = 0 ?>
74	<?php $executor = 0 ?>
75    <?php $total_total = 0 ?>
76	<?php foreach ($tpl->get('task_involvement') as $involvement): ?>
77		<tr>
78			<td>
79                <?php echo $tpl->user_name($involvement['user_id']) ?>
80			</td>
81			<td><?php echo $involvement['original_poster_sum'] ?></td>
82			<td><?php echo $involvement['commentator_sum'] ?></td>
83			<td><?php echo $involvement['assignee_sum'] ?></td>
84            <?php $total = $involvement['original_poster_sum'] + $involvement['commentator_sum'] + $involvement['assignee_sum'] ?>
85			<td><?php echo $total ?></td>
86			<?php $reporter += $involvement['original_poster_sum'] ?>
87			<?php $commentator += $involvement['commentator_sum'] ?>
88			<?php $executor += $involvement['assignee_sum'] ?>
89            <?php $total_total += $total ?>
90		</tr>
91	<?php endforeach ?>
92	<tr>
93		<th><?php echo $tpl->getLang('report_total') ?></th>
94		<td><?php echo $reporter ?></td>
95		<td><?php echo $commentator ?></td>
96		<td><?php echo $executor ?></td>
97		<td><?php echo $total_total ?></td>
98	</tr>
99</table>
100