1<?php /* @var \dokuwiki\plugin\bez\meta\Tpl $tpl */ ?> 2<?php if ($tpl->get('task')->thread_id != '' && $tpl->get('task')->thread->acl_of('id') >= BEZ_PERMISSION_VIEW): ?> 3 <div class="bez_thread 4 <?php 5 if ($tpl->get('task')->thread->state == 'opened') { 6 echo 'priority_' . $tpl->get('task')->thread->priority; 7 } 8 ?>"> 9 <div> 10 <strong><?php echo $tpl->getLang('issue') ?>:</strong> 11 <a href="<?php echo $tpl->url('thread', 'id', $tpl->get('task')->thread->id) ?>"> 12 #<?php echo $tpl->get('task')->thread->id ?> 13 </a> 14 <strong> 15 <?php if ($tpl->get('task')->thread->type == 'project'): ?> 16 <?php echo $tpl->getLang('project') ?> 17 <?php elseif (!empty($tpl->get('task')->thread->label_name)): ?> 18 <?php echo $tpl->get('task')->thread->label_name ?> 19 <?php else: ?> 20 <i style="color: #777"><?php echo $tpl->getLang('issue_type_no_specified') ?></i> 21 <?php endif ?> 22 23 (<?php echo $tpl->getLang('state_' . $tpl->get('task')->thread->state) ?>): 24 </strong> 25 <?php echo $tpl->get('task')->thread->title ?> 26 </div> 27 28 <?php if ($tpl->get('task')->thread_comment_id != ''): ?> 29 <div style="margin-top: 12px;"> 30 <h2> 31 <a href="<?php echo $tpl->url('thread', 'id', $tpl->get('task')->thread->id) ?>#k<?php echo $tpl->get('task')->thread_comment->id ?>"> 32 #k<?php echo $tpl->get('task')->thread_comment->id ?> 33 </a> 34 <?php echo ucfirst($tpl->getLang('cause')) ?> 35 (<?php echo $tpl->getLang($tpl->get('task')->thread_comment->type) ?>) 36 </h2> 37 <?php echo $tpl->get('task')->thread_comment->content_html ?> 38 </div> 39 <?php endif ?> 40 </div> 41 42 43 <br> 44<?php endif ?> 45 46<?php if ( $tpl->param('action') == 'task_edit' && 47 $tpl->param('tid') == $tpl->get('task')->id): ?> 48 <?php include 'task_form.php' ?> 49<?php else: ?> 50 <?php include 'task_box.php' ?> 51<?php endif ?> 52 53<br> 54<div class="bez_comments"> 55 <div class="bez_left_col"> 56 <?php foreach ($tpl->get('task_comments') as $task_comment): ?> 57 <?php $tpl->set('task_comment', $task_comment) ?> 58 <?php if ( $tpl->param('action') == 'comment_edit' && 59 $tpl->param('zkid') == $task_comment->id): ?> 60 <?php include 'task_comment_form.php' ?> 61 <?php else: ?> 62 <?php include 'task_comment_box.php' ?> 63 <?php endif ?> 64 <?php endforeach ?> 65 66 <?php if ($tpl->get('task')->state == 'done'): ?> 67 <div class="plugin__bez_status_label"> 68 <span class="icon icon_green"> 69 <?php echo inlineSVG(DOKU_PLUGIN . 'bez/images/tick.svg') ?> 70 </span> 71 <?php printf($tpl->getLang('user_did_task'), 72 '<strong>' . $tpl->user_name($tpl->get('task')->closed_by) . '</strong>', 73 $tpl->date_fuzzy_age($tpl->get('task')->close_date)) ?> 74 </div> 75 <?php endif ?> 76 77 <?php if($tpl->param('action') != 'task_edit' && $tpl->param('action') != 'comment_edit' && $tpl->get('task')->can_add_comments()): ?> 78 <?php include 'task_comment_form.php' ?> 79 <?php endif ?> 80 81 </div> 82 83<div class="bez_right_col" style="position:relative; top: -15px;"> 84 85 <div class="bez_box bez_subscribe_box"> 86 <h2><?php echo $tpl->getLang('norifications') ?></h2> 87 <?php if ($tpl->get('task')->is_subscribent()): ?> 88 <a href="<?php echo $tpl->url('task', 'tid', $tpl->get('task')->id, 'action', 'unsubscribe') ?>" class="bez_subscribe_button"><span class="bez_awesome"></span> <?php echo $tpl->getLang('unsubscribe') ?></a> 89 <p><?php echo $tpl->getLang('task_subscribed_info') ?></p> 90 <?php else: ?> 91 <a href="<?php echo $tpl->url('task', 'tid', $tpl->get('task')->id, 'action', 'subscribe') ?>" class="bez_subscribe_button"><span class="bez_awesome"></span> <?php echo $tpl->getLang('subscribe') ?></a> 92 <p><?php echo $tpl->getLang('task_not_subscribed_info') ?></p> 93 <?php endif ?> 94 95 </div> 96 97 <div class="bez_box"> 98 <h2><?php echo $tpl->getLang('comment_participants') ?></h2> 99 <ul id="issue_participants"> 100 <?php foreach ($tpl->get('task')->get_participants() as $participant): ?> 101 <li><a href="<?php echo $tpl->mailto($tpl->user_email($participant['user_id']), 102 '#z'.$tpl->get('task')->id, 103 $tpl->url('task', 'tid', $tpl->get('task')->id)) ?>" 104 title="<?php echo $participant['user_id'] ?>"> 105 <span class="bez_name"><?php echo $tpl->user_name($participant['user_id']) ?></span> 106 <span class="bez_icons"> 107 <?php if($participant['original_poster']): ?> 108 <span class="bez_awesome" 109 title="<?php echo $tpl->getLang('reporter') ?>"> 110  111 </span> 112 <?php endif ?> 113 <?php if($participant['assignee']): ?> 114 <span class="bez_awesome" 115 title="<?php echo $tpl->getLang('executor') ?>"> 116  117 </span> 118 <?php endif ?> 119 <?php if($participant['commentator']): ?> 120 <span class="bez_awesome" 121 title="<?php echo $tpl->getLang('commentator') ?>"> 122  123 </span> 124 <?php endif ?> 125 <?php if($participant['subscribent']): ?> 126 <span class="bez_awesome" 127 title="<?php echo $tpl->getLang('subscribent') ?>"> 128  129 </span> 130 <?php endif ?> 131 </span> 132 </a></li> 133 <?php endforeach ?> 134 </ul> 135 136 <?php if ($tpl->get('task')->acl_of('participants') >= BEZ_PERMISSION_CHANGE): ?> 137 <h2><?php echo $tpl->getLang('issue_invite_header') ?></h2> 138 <form action="<?php echo $tpl->url('task', 'tid', $tpl->get('task')->id, 'action', 'invite') ?>" method="post" id="bez_invite_users_form"> 139 <div id="bez_invite_users" class="ui-widget"> 140 <select name="client"> 141 <option value="">--- <?php echo $tpl->getLang('select') ?> ---</option> 142 <?php foreach (array_diff_key($tpl->get('users'), $tpl->get('task')->get_participants('subscribent')) as $user_id => $ignore): ?> 143 <option value="<?php echo $user_id ?>"><?php echo $tpl->user_name($user_id) ?></option> 144 <?php endforeach ?> 145 </select> 146 </div> 147 <button class="bez_subscribe_button"><?php echo $tpl->getLang('issue_invite_button') ?></button> 148 </form> 149 <?php endif ?> 150 151 152 </div> 153 154 155</div> 156 157</div> 158 159