xref: /plugin/bez/tpl/task.php (revision 9a30fd19e1af230545f863e78de6adfda2883aa3)
1510f3b21Sghi<a name="z<?php echo $task['id'] ?>"></a>
2510f3b21Sghi<div id="z<?php echo $task['id'] ?>" class="task
3510f3b21Sghi	<?php
4510f3b21Sghi		switch($task['state']) {
5510f3b21Sghi			case $bezlang['task_opened']:
6510f3b21Sghi				echo 'opened';
7510f3b21Sghi				break;
8510f3b21Sghi			case $bezlang['task_done']:
9510f3b21Sghi				echo 'closed';
10510f3b21Sghi				break;
11510f3b21Sghi			case $bezlang['task_rejected']:
12510f3b21Sghi				echo 'rejected';
13510f3b21Sghi				break;
14510f3b21Sghi		}
15510f3b21Sghi	?>">
16510f3b21Sghi
17510f3b21Sghi<div class="bez_timebox">
18510f3b21Sghi	<span><strong><?php echo $bezlang['open'] ?>:</strong> <?php echo $helper->time2date($task['date']) ?></span>
19510f3b21Sghi	<?php if ($task['state'] != $bezlang['task_opened']): ?>
20510f3b21Sghi		<span>
21510f3b21Sghi			<strong><?php echo $task['state']?>:</strong>
22510f3b21Sghi			<?php echo $helper->time2date($task['close_date']) ?>
23510f3b21Sghi		</span>
24510f3b21Sghi	<?php endif ?>
25510f3b21Sghi</div>
26510f3b21Sghi
27510f3b21Sghi<h2>
2827712358Sghi	<a href="?id=<?php echo $this->id('issue_task', 'id', $template['issue']['id'], 'tid', $task['id']) ?>">
2927712358Sghi		#z<?php echo $task['id'] ?>
3027712358Sghi	</a>
31510f3b21Sghi	<?php echo lcfirst($task['action']) ?>
32510f3b21Sghi	(<?php echo lcfirst($task['state']) ?>)
33510f3b21Sghi</h2>
34510f3b21Sghi
35510f3b21Sghi<table>
36510f3b21Sghi<tr>
3727712358Sghi		<td>
3827712358Sghi			<strong><?php echo $bezlang['executor'] ?>:</strong>
3927712358Sghi			<?php echo $task['executor'] ?>
4027712358Sghi		</td>
41510f3b21Sghi
42510f3b21Sghi		<?php if ($task['cost'] != 0): ?>
4327712358Sghi			<td>
4427712358Sghi				<strong><?php echo $bezlang['cost'] ?>:</strong>
4527712358Sghi				<?php echo $task['cost'] ?>
4627712358Sghi			</td>
47510f3b21Sghi		<?php endif ?>
48510f3b21Sghi</tr>
49510f3b21Sghi</table>
50510f3b21Sghi
51510f3b21Sghi<?php echo $task['task'] ?>
52510f3b21Sghi
5347b32379Sghi<?php if (isset($task['cause_text'])): ?>
5447b32379Sghi	<h3>
5547b32379Sghi		<a href="?id=<?php echo $this->id('issue_task', 'id', $template['issue']['id'], 'tid', $task['id']) ?>">
5647b32379Sghi			#p<?php echo $task['cause_id'] ?>
5747b32379Sghi		</a>
5847b32379Sghi		<?php echo lcfirst($task[rootcause]) ?>
5947b32379Sghi	</h3>
6047b32379Sghi	<?php echo $task['cause_text'] ?>
6147b32379Sghi<?php endif ?>
6247b32379Sghi
63*9a30fd19Sghi<?php if ($task['raw_state'] == 2): ?>
64510f3b21Sghi	<h3><?php echo $bezlang['reason'] ?></h3>
65510f3b21Sghi	<?php echo $task['reason'] ?>
66*9a30fd19Sghi<?php elseif ($task['raw_state'] == 1 && $task[potential] == 1): ?>
67*9a30fd19Sghi	<h3><?php echo $bezlang['evaluation'] ?></h3>
68*9a30fd19Sghi	<?php echo $task['reason'] ?>
69510f3b21Sghi<?php endif ?>
70510f3b21Sghi
7127712358Sghi<div class="bez_buttons">
7227712358Sghi	<a class="bds_inline_button" href="
73510f3b21Sghi		<?php echo $helper->mailto($task['executor_email'],
74510f3b21Sghi		$bezlang['task'].': #'.$task['issue'].' '.$template['issue']['title'].' | #z'.$task['id'].' '.$task['action'],
75510f3b21Sghi		$template['uri'].'#z'.$task['id']) ?>">
76510f3b21Sghi<?php echo $bezlang['send_mail'] ?>
77510f3b21Sghi	</a>
7827712358Sghi	<?php if ($template['issue'][raw_state] == 0 &&
7927712358Sghi	($task['executor_nick'] == $INFO['client'] || $helper->user_coordinator($template[issue][id]))): ?>
8027712358Sghi		<a class="bds_inline_button"
81*9a30fd19Sghi			href="?id=<?php echo $this->id('task_form', 'id', $template['issue']['id'], 'cause', $cause[id], 'tid', $task['id']) ?>">
8227712358Sghi<?php echo $bezlang['edit'] ?>
83510f3b21Sghi	</a>
84510f3b21Sghi	<?php endif ?>
8527712358Sghi</div>
8627712358Sghi</div>
8727712358Sghi
88