1*510f3b21Sghi<a style="display:none;" href="#" class="show_tasks_hidden"><?php echo $bezlang['show_tasks_hidden'] ?></a> 2*510f3b21Sghi<?php foreach ($params['tasks'] as $task): ?> 3*510f3b21Sghi <a name="z<?php echo $task['id'] ?>"></a> 4*510f3b21Sghi <div id="z<?php echo $task['id'] ?>" class="task 5*510f3b21Sghi <?php 6*510f3b21Sghi switch($task['state']) { 7*510f3b21Sghi case $bezlang['task_opened']: 8*510f3b21Sghi echo 'opened'; 9*510f3b21Sghi break; 10*510f3b21Sghi case $bezlang['task_done']: 11*510f3b21Sghi echo 'closed'; 12*510f3b21Sghi break; 13*510f3b21Sghi case $bezlang['task_rejected']: 14*510f3b21Sghi echo 'rejected'; 15*510f3b21Sghi break; 16*510f3b21Sghi } 17*510f3b21Sghi ?>"> 18*510f3b21Sghi 19*510f3b21Sghi <div class="bez_timebox"> 20*510f3b21Sghi <span><strong><?php echo $bezlang['open'] ?>:</strong> <?php echo $helper->time2date($task['date']) ?></span> 21*510f3b21Sghi <?php if ($task['state'] != $bezlang['task_opened']): ?> 22*510f3b21Sghi <span> 23*510f3b21Sghi <strong><?php echo $task['state']?>:</strong> 24*510f3b21Sghi <?php echo $helper->time2date($task['close_date']) ?> 25*510f3b21Sghi </span> 26*510f3b21Sghi <?php endif ?> 27*510f3b21Sghi </div> 28*510f3b21Sghi 29*510f3b21Sghi <h2> 30*510f3b21Sghi <a href="<?php echo $this->issue_uri($task['issue']).'#z'.$task['id'] ?>">#z<?php echo $task['id'] ?></a> 31*510f3b21Sghi <?php echo lcfirst($task['action']) ?> 32*510f3b21Sghi (<?php echo lcfirst($task['state']) ?>) 33*510f3b21Sghi </h2> 34*510f3b21Sghi 35*510f3b21Sghi <table> 36*510f3b21Sghi <tr> 37*510f3b21Sghi <th><?php echo $bezlang['reporter'] ?>:</th> 38*510f3b21Sghi <td><?php echo $task['reporter'] ?></td> 39*510f3b21Sghi 40*510f3b21Sghi <th><?php echo $bezlang['executor'] ?>:</th> 41*510f3b21Sghi <td><?php echo $task['executor'] ?></td> 42*510f3b21Sghi 43*510f3b21Sghi <?php if ($task['cost'] != 0): ?> 44*510f3b21Sghi <th><?php echo $bezlang['cost'] ?>:</th> 45*510f3b21Sghi <td><?php echo $task['cost'] ?></td> 46*510f3b21Sghi <?php endif ?> 47*510f3b21Sghi </tr> 48*510f3b21Sghi </table> 49*510f3b21Sghi 50*510f3b21Sghi <h3><?php echo $bezlang['description'] ?></h3> 51*510f3b21Sghi <?php echo $task['task'] ?> 52*510f3b21Sghi 53*510f3b21Sghi <?php if ($task['rejected']): ?> 54*510f3b21Sghi <h3><?php echo $bezlang['reason'] ?></h3> 55*510f3b21Sghi <?php echo $task['reason'] ?> 56*510f3b21Sghi <?php endif ?> 57*510f3b21Sghi 58*510f3b21Sghi <?php if ($template['issue_opened'] && ($template['user_is_coordinator'] || $task['executor_nick'] == $template['user'])): ?> 59*510f3b21Sghi <a class="bds_inline_button bds_edit_button" 60*510f3b21Sghi href="?id=<?php echo $this->id('issue_show', $template['issue']['id'], 'edit', 'task', $task['id']) ?>#z_"> 61*510f3b21Sghi <?php echo $bezlang['edit'] ?> 62*510f3b21Sghi 63*510f3b21Sghi <a class="bds_inline_button bds_send_button" href=" 64*510f3b21Sghi <?php echo $helper->mailto($task['executor_email'], 65*510f3b21Sghi $bezlang['task'].': #'.$task['issue'].' '.$template['issue']['title'].' | #z'.$task['id'].' '.$task['action'], 66*510f3b21Sghi $template['uri'].'#z'.$task['id']) ?>"> 67*510f3b21Sghi ✉ <?php echo $bezlang['send_mail'] ?> 68*510f3b21Sghi </a> 69*510f3b21Sghi <?php endif ?> 70*510f3b21Sghi </div> 71*510f3b21Sghi<?php endforeach ?> 72*510f3b21Sghi<?php if ($template['issue_opened'] && ($template['user_is_coordinator'] || strstr($params['task_action'], 'update'))): ?> 73*510f3b21Sghi <a style="display:none;" href="#z_" class="add_task"><?php echo $bezlang['add_task'] ?></a> 74*510f3b21Sghi <form class="<?php $e = explode(':', $params['task_action']); echo $e[0] ?> task_form" 75*510f3b21Sghi action="<?php echo $template['uri'] ?>:<?php echo $params['task_action'] ?>#z_" method="POST"> 76*510f3b21Sghi <?php foreach ($params['hidden'] as $name => $value): ?> 77*510f3b21Sghi <input type="hidden" name="<?php echo $name ?>" value="<?php echo $value ?>" /> 78*510f3b21Sghi <?php endforeach ?> 79*510f3b21Sghi <fieldset class="bds_form"> 80*510f3b21Sghi <?php if ($template['issue_opened'] && $template['user_is_coordinator']): ?> 81*510f3b21Sghi <?php if (count($template['causes']) == 0) : ?> 82*510f3b21Sghi <div class="row" > 83*510f3b21Sghi <div style="display:table-cell"><br><br></div> 84*510f3b21Sghi <label style="position: relative"> 85*510f3b21Sghi <div class="info" style="position: absolute; left: -7em; width:45em;"><?php echo $bezlang['info_no_causes_added'] ?></div> 86*510f3b21Sghi </label> 87*510f3b21Sghi </div> 88*510f3b21Sghi <?php endif ?> 89*510f3b21Sghi <?php if (strpos($params['task_action'], 'update') === 0): ?> 90*510f3b21Sghi <div class="row"> 91*510f3b21Sghi <label for="id"><?php echo $bezlang['id'] ?>:</label> 92*510f3b21Sghi <span><strong>#z<?php echo $template['task_id'] ?></strong></span> 93*510f3b21Sghi </div> 94*510f3b21Sghi <?php endif ?> 95*510f3b21Sghi <div class="row"> 96*510f3b21Sghi <label for="executor"><?php echo $bezlang['executor'] ?>:</label> 97*510f3b21Sghi <span> 98*510f3b21Sghi <select name="executor" id="executor"> 99*510f3b21Sghi <?php foreach ($template['users'] as $nick => $name): ?> 100*510f3b21Sghi <option <?php if ($value['executor'] == $nick) echo 'selected' ?> 101*510f3b21Sghi value="<?php echo $nick ?>"><?php echo $name ?></option> 102*510f3b21Sghi <?php endforeach ?> 103*510f3b21Sghi </select> 104*510f3b21Sghi </span> 105*510f3b21Sghi </div> 106*510f3b21Sghi <div class="row"> 107*510f3b21Sghi <label for="action"><?php echo $bezlang['action'] ?>:</label> 108*510f3b21Sghi <span> 109*510f3b21Sghi <?php if (isset($params['hidden']['cause'])) : ?> 110*510f3b21Sghi <select name="action" id="action"> 111*510f3b21Sghi <?php foreach ($template['taskactions'] as $key => $name): ?> 112*510f3b21Sghi <option <?php if ($value['action'] == $key) echo 'selected' ?> 113*510f3b21Sghi value="<?php echo $key ?>"><?php echo $name ?></option> 114*510f3b21Sghi <?php endforeach ?> 115*510f3b21Sghi </select> 116*510f3b21Sghi <?php else : ?> 117*510f3b21Sghi <strong> 118*510f3b21Sghi <?php echo $bezlang['correction'] ?> 119*510f3b21Sghi </strong> 120*510f3b21Sghi <?php endif ?> 121*510f3b21Sghi </span> 122*510f3b21Sghi </div> 123*510f3b21Sghi 124*510f3b21Sghi <div class="row"> 125*510f3b21Sghi <label for="task"><?php echo $bezlang['description'] ?>:</label> 126*510f3b21Sghi <span><textarea name="task" id="task"><?php echo $value['task'] ?></textarea></span> 127*510f3b21Sghi </div> 128*510f3b21Sghi 129*510f3b21Sghi <div class="row"> 130*510f3b21Sghi <label for="cost"><?php echo $bezlang['cost'] ?>:</label> 131*510f3b21Sghi <span><input name="cost" id="cost" value="<?php echo $value['cost'] ?>"></span> 132*510f3b21Sghi </div> 133*510f3b21Sghi <?php endif ?> 134*510f3b21Sghi <?php if (strstr($params['task_action'], 'update')): ?> 135*510f3b21Sghi <div class="row"> 136*510f3b21Sghi <label for="task_state"><?php echo $bezlang['task_state'] ?>:</label> 137*510f3b21Sghi <span> 138*510f3b21Sghi <select name="state" id="task_state"> 139*510f3b21Sghi <?php foreach ($template['task_states'] as $code => $name): ?> 140*510f3b21Sghi <option <?php if ($value['state'] == $code) echo 'selected' ?> 141*510f3b21Sghi value="<?php echo $code?>"><?php echo $name ?></option> 142*510f3b21Sghi <?php endforeach ?> 143*510f3b21Sghi </select> 144*510f3b21Sghi </span> 145*510f3b21Sghi </div> 146*510f3b21Sghi <div class="row"> 147*510f3b21Sghi <label for="reason"><?php echo $bezlang['reason'] ?>:</label> 148*510f3b21Sghi <span><textarea name="reason" id="reason"><?php echo $value['reason'] ?></textarea></span> 149*510f3b21Sghi </div> 150*510f3b21Sghi <?php endif ?> 151*510f3b21Sghi </fieldset> 152*510f3b21Sghi <input type="submit" value="<?php echo $template['task_button'] ?>"> 153*510f3b21Sghi <a href="?id=<?php echo $this->id('issue_show', $template['issue']['id']) ?>" 154*510f3b21Sghi class="bez_delete_button bez_link_button"> 155*510f3b21Sghi <?php echo $bezlang['cancel'] ?> 156*510f3b21Sghi </a> 157*510f3b21Sghi 158*510f3b21Sghi </form> 159*510f3b21Sghi <?php endif ?> 160