xref: /plugin/bez/tpl/task.php (revision dccbf1630216365ff18467ffdae02e5516ab1aa3)
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
539a30fd19Sghi<?php if ($task['raw_state'] == 2): ?>
54510f3b21Sghi	<h3><?php echo $bezlang['reason'] ?></h3>
55510f3b21Sghi	<?php echo $task['reason'] ?>
569a30fd19Sghi<?php elseif ($task['raw_state'] == 1 && $task[potential] == 1): ?>
579a30fd19Sghi	<h3><?php echo $bezlang['evaluation'] ?></h3>
589a30fd19Sghi	<?php echo $task['reason'] ?>
59510f3b21Sghi<?php endif ?>
60510f3b21Sghi
6127712358Sghi<div class="bez_buttons">
6227712358Sghi	<a class="bds_inline_button" href="
63510f3b21Sghi		<?php echo $helper->mailto($task['executor_email'],
64510f3b21Sghi		$bezlang['task'].': #'.$task['issue'].' '.$template['issue']['title'].' | #z'.$task['id'].' '.$task['action'],
65*dccbf163Sghi		DOKU_URL . 'doku.php?id='.$this->id('issue_task', 'id', $template['issue']['id'], 'tid', $task['id'])) ?>">
66510f3b21Sghi<?php echo $bezlang['send_mail'] ?>
67510f3b21Sghi	</a>
6827712358Sghi	<?php if ($template['issue'][raw_state] == 0 &&
6927712358Sghi	($task['executor_nick'] == $INFO['client'] || $helper->user_coordinator($template[issue][id]))): ?>
7027712358Sghi		<a class="bds_inline_button"
719fbfe943Sghi			href="?id=<?php echo $this->id('task_form', 'id', $template['issue']['id'], 'cid', $cause[id], 'tid', $task['id']) ?>">
7227712358Sghi<?php echo $bezlang['edit'] ?>
73510f3b21Sghi	</a>
74510f3b21Sghi	<?php endif ?>
7527712358Sghi</div>
7627712358Sghi</div>
7727712358Sghi
78