1<?php /* @var \dokuwiki\plugin\bez\meta\Tpl $tpl */ ?> 2 3<a name="z<?php echo $tpl->get('task')->id ?>"></a> 4<div id="z<?php echo $tpl->get('task')->id ?>" 5 class="bds_block task <?php echo 'state_' . $tpl->get('task')->state ?>"> 6 7<div class="bez_timebox"> 8 <span> 9 <strong><?php echo $tpl->getLang('open') ?>:</strong> 10 <?php echo $tpl->date($tpl->get('task')->create_date) ?> 11 </span> 12 13 <?php if ($tpl->get('task')->state != 'opened'): ?> 14 15 <span> 16 <strong><?php echo $tpl->getLang('task_' . $tpl->get('task')->state) ?>:</strong> 17 <?php echo $tpl->date($tpl->get('task')->close_date) ?> 18 </span> 19 20 <span> 21 <strong><?php echo $tpl->getLang('report_priority') ?>: </strong> 22 <?php echo $tpl->date_diff_days($tpl->get('task')->create_date, $tpl->get('task')->close_date, '%a'); ?> 23 </span> 24 <?php endif ?> 25</div> 26 27<h2> 28 <a href="<?php echo $tpl->url('task', 'tid', $tpl->get('task')->id) ?>"> 29 #z<?php echo $tpl->get('task')->id ?> 30 </a> 31 <?php if ($tpl->get('task')->thread_id != '' && $tpl->get('task')->thread->type != 'project'): ?> 32 <?php echo lcfirst($tpl->getLang('task_type_' . $tpl->get('task')->type)) ?> 33 <?php endif ?> 34 (<?php echo lcfirst($tpl->getLang('task_' . $tpl->get('task')->state)) ?>) 35</h2> 36 37<table class="bez_box_data_table"> 38<tr> 39 <th><?php echo $tpl->getLang('reporter') ?>:</th> 40 <td> 41 <?php echo $tpl->user_name($tpl->get('task')->original_poster) ?> 42 </td> 43 44 <th><?php echo $tpl->getLang('executor') ?>:</th> 45 <td><?php echo $tpl->user_name($tpl->get('task')->assignee) ?></td> 46</tr> 47 48<tr> 49 <th style="white-space: nowrap;"><?php echo $tpl->getLang('plan_date') ?>:</th> 50 <td> 51 <?php echo $tpl->get('task')->plan_date ?><?php if ($tpl->get('task')->all_day_event == '0'): ?>, 52 <?php echo $tpl->get('task')->start_time ?> - <?php echo $tpl->get('task')->finish_time ?> 53 <?php endif ?> 54 </td> 55 56 <th><?php echo $tpl->getLang('task_type') ?>:</th> 57 <td> 58 <?php if ($tpl->get('task')->task_program_id == ''): ?> 59 --- 60 <?php else: ?> 61 <?php echo $tpl->get('task')->task_program_name ?> 62 <?php endif ?> 63 </td> 64</tr> 65 66<tr> 67 <th><?php echo $tpl->getLang('cost') ?>:</th> 68 <td colspan="3"> 69 <?php if ($tpl->get('task')->cost == ''): ?> 70 --- 71 <?php else: ?> 72 <?php echo $tpl->get('task')->cost ?> 73 <?php endif ?> 74 </td> 75</tr> 76 77</table> 78 79<?php echo $tpl->get('task')->content_html ?> 80 81 <div class="bez_buttons"> 82 <?php if ($tpl->get('task')->acl_of('state') >= BEZ_PERMISSION_CHANGE): ?> 83 <a class="bds_inline_button" 84 id="plugin__bez_do_task_button" 85 href="<?php echo $tpl->url('task', 'tid', $tpl->get('task')->id) ?>#zk_"> 86 <?php if ($tpl->get('task')->state == 'opened'): ?> 87 ↬ <?php echo $tpl->getLang('js')['do_task'] ?> 88 <?php else: ?> 89 ↻ <?php echo $tpl->getLang('js')['reopen_task'] ?> 90 <?php endif?> 91 </a> 92 <?php endif ?> 93 94 <?php if (count($tpl->get('task')->changable_fields( 95 array('content', 'plan_date', 'all_day_event', 'start_time', 'finish_time', 'task_program_id', 'cost') 96 )) > 0): ?> 97 <a class="bds_inline_button" 98 href="<?php 99 if ($tpl->action() == 'thread') { 100 echo $tpl->url('thread', 'id', $tpl->get('thread')->id, 'tid', $tpl->get('task')->id, 'action', 'task_edit'); 101 } else { 102 echo $tpl->url('task', 'tid', $tpl->get('task')->id, 'action', 'task_edit'); 103 } 104 ?>#z_"> 105 ✎ <?php echo $tpl->getLang('edit') ?> 106 </a> 107 <?php endif ?> 108 109 <a class="bds_inline_button" href=" 110 <?php echo $tpl->mailto($tpl->user_email($tpl->get('task')->assignee), 111 '#z'.$tpl->get('task')->id, 112 $tpl->url('task', 'tid', $tpl->get('task')->id)) ?>"> 113 ✉ <?php echo $tpl->getLang('send_mail') ?> 114 </a> 115 116 <?php if ($tpl->get('task')->task_program_id != '' && 117 $tpl->factory('task')->permission() >= BEZ_TABLE_PERMISSION_INSERT): ?> 118 <a class="bds_inline_button" 119 href="<?php echo $tpl->url('task_form', 'duplicate', $tpl->get('task')->id, 'task_program_id', $tpl->get('task')->task_program_id) ?>"> 120 ⇲ <?php echo $tpl->getLang('duplicate') ?> 121 </a> 122 <?php endif ?> 123 </div> 124</div>