xref: /plugin/bez/tpl/tasks.php (revision 7f853d3aad83f84840ef8acee3f63b9cccbf3885)
1<div id="bez_issue_filter" class="bds_block">
2<form action="<?php echo $template['uri'] ?>?id=bez:tasks" method="POST">
3<fieldset class="bds_form">
4<label><?php echo $bezlang['class'] ?>:
5	<select name="action">
6		<option <?php if ($value['action'] == '-all') echo 'selected' ?>
7			value="-all">--- <?php echo $bezlang['all'] ?> ---</option>
8	<?php foreach ($template['actions'] as $key => $name): ?>
9		<option <?php if ($value['action'] == (string)$key) echo 'selected' ?>
10			value="<?php echo $key ?>"><?php echo $name ?></option>
11	<?php endforeach ?>
12	</select>
13</label>
14
15<label><?php echo $bezlang['state'] ?>:
16	<select name="state">
17		<option <?php if ($value['state'] == '-all') echo 'selected' ?>
18			value="-all">--- <?php echo $bezlang['all'] ?> ---</option>
19	<?php foreach ($template['states'] as $key => $name): ?>
20		<option <?php if ($value['state'] == (string)$key) echo 'selected' ?>
21			value="<?php echo $key ?>"><?php echo $name ?></option>
22	<?php endforeach ?>
23	</select>
24</label>
25
26<label><?php echo $bezlang['executor'] ?>:
27	<select name="executor">
28		<option <?php if ($value['executor'] == '-all') echo 'selected' ?>
29			value="-all">--- <?php echo $bezlang['all'] ?> ---</option>
30	<?php foreach ($template['executors'] as $nick => $name): ?>
31		<option <?php if ($value['executor'] == $nick) echo 'selected' ?>
32			value="<?php echo $nick ?>"><?php echo $name ?></option>
33	<?php endforeach ?>
34	</select>
35</label>
36
37<label><?php echo $bezlang['year'] ?>:
38	<select name="year">
39		<option <?php if ($value['year'] == '-all') echo 'selected' ?>
40			value="-all">--- <?php echo $bezlang['all'] ?> ---</option>
41	<?php foreach ($template['years'] as $year): ?>
42		<option <?php if ($value['year'] == $year) echo 'selected' ?>
43			value="<?php echo $year ?>"><?php echo $year ?></option>
44	<?php endforeach ?>
45	</select>
46</label>
47<label><input type="submit" value="<?php echo $bezlang['filter'] ?>" />
48</fieldset>
49</form>
50</div>
51
52<table class="bez bez_sumarise">
53<tr>
54	<th><?php echo $bezlang['id'] ?></th>
55	<th><?php echo $bezlang['class'] ?></th>
56	<th><?php echo $bezlang['state'] ?></th>
57	<th><?php echo $bezlang['executor'] ?></th>
58	<th><?php echo $bezlang['cost'] ?></th>
59	<th><?php echo $bezlang['date'] ?></th>
60	<th><?php echo $bezlang['closed'] ?></th>
61</tr>
62<?php foreach ($template['tasks'] as $task): ?>
63	<tr class="pr<?php echo $task['priority'] ?>">
64		<td><?php echo $helper->html_task_link($task['issue'], $task['id']) ?></td>
65		<td><?php echo $task['action'] ?></td>
66		<td><?php echo $task['state'] ?></td>
67		<td><?php echo $task['executor'] ?></td>
68		<td>
69			<?php if ($task['cost'] == ''): ?>
70				<em><?php echo $bezlang['ns'] ?></em>
71			<?php else: ?>
72				<?php echo $task['cost'] ?>
73			<?php endif ?>
74		</td>
75		<td><?php echo $helper->string_time_to_now($task['date']) ?></td>
76		<td>
77				<?php if ($task['state'] == $bezlang['task_opened']): ?>
78					<em><?php echo $bezlang['ns'] ?></em>
79				<?php else: ?>
80					<?php echo $helper->string_time_to_now($task['close_date']) ?>
81				<?php endif ?>
82			</td>
83		</tr>
84	<?php endforeach ?>
85	<tr>
86		<th><?php echo $bezlang['report_total'] ?></th>
87		<td colspan="6"><?php echo count($template['tasks']) ?></td>
88	</tr>
89</table>
90
91</div>
92