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