1<a name="z<?php echo $template['task']->id ?>"></a> 2<div id="z<?php echo $template['task']->id ?>" 3 class="bds_block task <?php $template['task']->state_string ?>"> 4 5<div class="bez_timebox"> 6 <span><strong><?php echo $bezlang['open'] ?>:</strong> <?php echo $helper->time2date($template['task']->date) ?></span> 7 8 <?php if ($template['task']->state !== '0'): ?> 9 <span> 10 <strong><?php echo $template['task']->state_string ?>:</strong> 11 <?php echo $helper->time2date($template['task']->close_date) ?> 12 </span> 13 <span> 14 <strong><?php echo $bezlang['report_priority'] ?>: </strong> 15 <?php echo $helper->days((int)$template['task']->close_date - (int)$template['task']->date) ?> 16 </span> 17 <?php endif ?> 18</div> 19 20<h2> 21 <a href="?id=<?php echo $this->id('task', 'tid', $template['task']->id) ?>"> 22 #z<?php echo $template['task']->id ?> 23 </a> 24 <?php echo lcfirst($template['task']->action_string) ?> 25 (<?php echo lcfirst($template['task']->state_string) ?>) 26</h2> 27 28<?php 29 $top_row = array( 30 '<strong>'.$bezlang['executor'].': </strong>' . 31 $this->model->users->get_user_full_name($template['task']->executor), 32 33 '<strong>'.$bezlang['reporter'].': </strong>' . 34 $this->model->users->get_user_full_name($template['task']->reporter) 35 ); 36 37 if ($template['task']->tasktype_string != '') { 38 $top_row[] = 39 '<strong>'.$bezlang['task_type'].': </strong>' . 40 $template['task']->tasktype_string; 41 } 42 43 if ($template['task']->cost != '') { 44 $top_row[] = 45 '<strong>'.$bezlang['cost'].': </strong>' . 46 $template['task']->cost; 47 } 48 49 //BOTTOM ROW 50 $bottom_row = array( 51 '<strong>'.$bezlang['plan_date'].': </strong>' . 52 $template['task']->plan_date 53 ); 54 55 if ($template['task']->all_day_event == '0') { 56 $bottom_row[] = 57 '<strong>'.$bezlang['start_time'].': </strong>' . 58 $template['task']->start_time; 59 $bottom_row[] = 60 '<strong>'.$bezlang['finish_time'].': </strong>' . 61 $template['task']->finish_time; 62 } 63 echo bez_html_irrtable(array(), $top_row, $bottom_row); 64?> 65 66<?php echo $template['task']->task_cache ?> 67 68<?php if ( $template['action'] === 'task_change_state' && 69 $template['tid'] === $template['task']->id): ?> 70 <a name="form"></a> 71 <?php if ($template['state'] === '2'): ?> 72 <h3><?php echo $bezlang['reason'] ?></h3> 73 <?php else: ?> 74 <h3><?php echo $bezlang['evaluation'] ?></h3> 75 <?php endif ?> 76 <?php 77 if ($nparams['bez'] === 'issue') { 78 $id = $this->id('issue', 'id', $template['issue']->id, 'action', $template['action'], 'tid', $template['tid'], 'state', $template['state']); 79 } else { 80 $id = $this->id('task', 'tid', $template['tid'], 'action', $template['action'], 'state', $template['state']); 81 } 82 ?> 83 <form class="bez_form" action="?id=<?php echo $id ?>" method="POST"> 84 <input type="hidden" name="id" value="<?php echo $id ?>"> 85 86 <?php if ($template['state'] === '1'): ?> 87 <label style="display:block;margin-bottom:5px;"><input type="checkbox" name="no_evaluation" id="no_evaluation" /> <?php echo $bezlang['no_evaluation'] ?></label> 88 <?php endif ?> 89 90 <div class="bez_reason_toolbar"></div> 91 <textarea name="reason" id="reason" data-validation="required"><?php echo $value['reason'] ?></textarea> 92 <br> 93 <?php if ($template['state'] === '2'): ?> 94 <input type="submit" value="<?php echo $bezlang['task_reject'] ?>"> 95 <?php else: ?> 96 <input type="submit" value="<?php echo $bezlang['task_do'] ?>"> 97 <?php endif ?> 98 <a href="?id=<?php 99 if ($nparams['bez'] === 'issue') { 100 echo $this->id('issue', 'id', $template['issue']->id).'#z'.$template['task']->id; 101 } else { 102 echo $this->id('task', 'tid', $template['task']->id); 103 } 104 ?>" 105 class="bez_delete_button bez_link_button"> 106 <?php echo $bezlang['cancel'] ?> 107 </a> 108 </form> 109<?php else: ?> 110 <?php if ($template['task']->state === '2'): ?> 111 <h3><?php echo $bezlang['reason'] ?></h3> 112 <?php echo $template['task']->reason_cache ?> 113 <?php elseif ($template['task']->state === '1' && $template['task']->reason != ''): ?> 114 <h3><?php echo $bezlang['evaluation'] ?></h3> 115 <?php echo $template['task']->reason_cache ?> 116 <?php endif ?> 117 <div class="bez_buttons"> 118 <?php if ( $template['task']->state === '0' && 119 $template['task']->user_is_executor()): ?> 120 <a class="bds_inline_button" 121 href="?id=<?php 122 if ($nparams['bez'] === 'issue') { 123 echo $helper->id('issue', 'id', $template['issue']->id, 'tid', $template['task']->id, 'action', 'task_change_state', 'state', '1'); 124 } else { 125 echo $helper->id('task', 'tid', $template['task']->id, 'action', 'task_change_state', 'state', '1'); 126 } 127 ?>#z<?php echo $template['task']->id ?>"> 128 ↬ <?php echo $bezlang['task_do'] ?> 129 </a> 130 <a class="bds_inline_button" 131 href="?id=<?php 132 if ($nparams['bez'] === 'issue') { 133 echo $helper->id('issue', 'id', $template['issue']->id, 'tid', $template['task']->id, 'action', 'task_change_state', 'state', '2'); 134 } else { 135 echo $helper->id('task', 'tid', $template['task']->id, 'action', 'task_change_state', 'state', '2'); 136 } 137 ?>#z<?php echo $template['task']->id ?>"> 138 ↛ <?php echo $bezlang['task_reject'] ?> 139 </a> 140 <?php elseif ((isset($template['issue']) && $template['issue']->state !== '0') && $template['task']->user_is_executor()): ?> 141 <a class="bds_inline_button" 142 href="?id=<?php 143 if ($nparams['bez'] === 'issue') { 144 echo $helper->id('issue', 'id', $template['issue']->id, 'tid', $template['task']->id, 'action', 'task_reopen'); 145 } else { 146 echo $helper->id('task', 'tid', $template['task']->id, 'action', 'task_reopen'); 147 } 148 ?>"> 149 ↻ <?php echo $bezlang['task_reopen'] ?> 150 </a> 151 <?php endif ?> 152 153 <?php if (count($template['task']->changable_fields()) > 0): ?> 154 <a class="bds_inline_button" 155 href="?id=<?php 156 if ($nparams['bez'] === 'issue') { 157 echo $helper->id('issue', 'id', $template['issue']->id, 'tid', $template['task']->id, 'action', 'task_edit'); 158 } else { 159 echo $helper->id('task', 'tid', $template['task']->id, 'action', 'task_edit'); 160 } 161 ?>#z_"> 162 ✎ <?php echo $bezlang['edit'] ?> 163 </a> 164 <?php endif ?> 165 166 <a class="bds_inline_button" href=" 167 <?php echo $helper->mailto($this->model->users->get_user_email($template['task']->executor), 168 $bezlang['task'].': #z'.$template['task']->id.' '.lcfirst($template['task']->action_string), 169 DOKU_URL . 'doku.php?id='.$this->id('task', 'tid', $template['task']->id)) ?>"> 170 ✉ <?php echo $bezlang['send_mail'] ?> 171 </a> 172 173 <?php if ($template['task']->tasktype !== '' && 174 $this->model->acl->get_level() >= BEZ_AUTH_USER): ?> 175 <a class="bds_inline_button" 176 href="?id=<?php echo $this->id('task_form', 'duplicate', $template['task']->id, 'tasktype', $template['task']->tasktype) ?>"> 177 ⇲ <?php echo $bezlang['duplicate'] ?> 178 </a> 179 <?php endif ?> 180 </div> 181<?php endif ?> 182 183</div> 184 185