17fbf4c39SSzymon Olewniczak<?php /* @var \dokuwiki\plugin\bez\meta\Tpl $tpl */ ?> 2fe5d6d1eSSzymon Olewniczak<?php include "thread_box.php" ?> 3fe5d6d1eSSzymon Olewniczak 4fe5d6d1eSSzymon Olewniczak<!-- Comments --> 5fe5d6d1eSSzymon Olewniczak<div class="bez_comments"> 6fe5d6d1eSSzymon Olewniczak <div class="bez_left_col"> 7fe5d6d1eSSzymon Olewniczak <!-- Correction --> 8fe5d6d1eSSzymon Olewniczak <div style="margin-top: 10px"> 9*e8827d73SSzymon Olewniczak <?php foreach ($tpl->get('tasks')['corrections'] as $task): ?> 107fbf4c39SSzymon Olewniczak <?php $tpl->set('task', $task) ?> 118a638198SSzymon Olewniczak <?php if ( $tpl->param('action') == 'task_edit' && 127fbf4c39SSzymon Olewniczak $tpl->param('tid') == $task->id): ?> 13fe5d6d1eSSzymon Olewniczak <?php include 'task_form.php' ?> 14fe5d6d1eSSzymon Olewniczak <?php else: ?> 15fe5d6d1eSSzymon Olewniczak <?php include 'task_box.php' ?> 16fe5d6d1eSSzymon Olewniczak <?php endif ?> 17fe5d6d1eSSzymon Olewniczak 18fe5d6d1eSSzymon Olewniczak <?php endforeach ?> 19*e8827d73SSzymon Olewniczak <?php if ( $tpl->param('action') == 'task_add' && 20*e8827d73SSzymon Olewniczak $tpl->param('kid') == ''): ?> 21fe5d6d1eSSzymon Olewniczak <?php include 'task_form.php' ?> 22fe5d6d1eSSzymon Olewniczak <?php endif ?> 23fe5d6d1eSSzymon Olewniczak </div> 24fe5d6d1eSSzymon Olewniczak 25fe5d6d1eSSzymon Olewniczak <div class="bez_second_lv_buttons" style="margin-top: 10px"> 267fbf4c39SSzymon Olewniczak <?php if ( $tpl->get('thread')->user_is_coordinator() && 277fbf4c39SSzymon Olewniczak $tpl->get('thread')->state == 'opened'): ?> 28*e8827d73SSzymon Olewniczak <a href="<?php echo $tpl->url('thread', 'id', $tpl->get('thread')->id, 'action', 'task_add') ?>#z_" class="bez_subscribe_button"> 297fbf4c39SSzymon Olewniczak <span class="bez_awesome"></span> <?php echo $tpl->getLang('correction_add') ?> 30fe5d6d1eSSzymon Olewniczak </a> 31fe5d6d1eSSzymon Olewniczak <?php endif ?> 32fe5d6d1eSSzymon Olewniczak <a href="#" class="bez_subscribe_button bez_hide_comments"> 337fbf4c39SSzymon Olewniczak <span class="bez_awesome"></span> <?php echo $tpl->getLang('hide_comments') ?> 34fe5d6d1eSSzymon Olewniczak </a> 35fe5d6d1eSSzymon Olewniczak <a href="#" class="bez_subscribe_button bez_show_comments"> 367fbf4c39SSzymon Olewniczak <span class="bez_awesome"></span> <?php echo $tpl->getLang('show_comments') ?> 37fe5d6d1eSSzymon Olewniczak </a> 38fe5d6d1eSSzymon Olewniczak </div> 39fe5d6d1eSSzymon Olewniczak 407fbf4c39SSzymon Olewniczak <?php foreach ($tpl->get('thread_comments') as $thread_comment): ?> 417fbf4c39SSzymon Olewniczak <?php $tpl->set('thread_comment', $thread_comment) ?> 428a638198SSzymon Olewniczak <?php if ( $tpl->param('action') == 'commcause_edit' && 437fbf4c39SSzymon Olewniczak $tpl->param('kid') == $thread_comment->id): ?> 44fe5d6d1eSSzymon Olewniczak <?php include 'commcause_form.php' ?> 45fe5d6d1eSSzymon Olewniczak <?php else: ?> 46*e8827d73SSzymon Olewniczak <?php //$tpl->set('causes_without_tasks') ?> 47fe5d6d1eSSzymon Olewniczak <?php include 'commcause_box.php' ?> 48fe5d6d1eSSzymon Olewniczak <?php endif ?> 49fe5d6d1eSSzymon Olewniczak <?php endforeach ?> 50fe5d6d1eSSzymon Olewniczak 51*e8827d73SSzymon Olewniczak <?php if ($tpl->get('thread')->state == 'closed'): ?> 52*e8827d73SSzymon Olewniczak <div class="plugin__bez_status_label"> 53*e8827d73SSzymon Olewniczak <span class="icon icon_green"> 54*e8827d73SSzymon Olewniczak <?php echo inlineSVG(DOKU_PLUGIN . 'bez/images/tick.svg') ?> 55*e8827d73SSzymon Olewniczak </span> 56*e8827d73SSzymon Olewniczak <?php printf($tpl->getLang('user_closed_issue'), 57*e8827d73SSzymon Olewniczak '<strong>' . $tpl->user_name($tpl->get('thread')->closed_by) . '</strong>', 58*e8827d73SSzymon Olewniczak dformat(strtotime($tpl->get('thread')->close_date), '%f')) ?> 59*e8827d73SSzymon Olewniczak </div> 60*e8827d73SSzymon Olewniczak <?php elseif ($tpl->get('thread')->state == 'rejected'): ?> 61*e8827d73SSzymon Olewniczak <div class="plugin__bez_status_label"> 62*e8827d73SSzymon Olewniczak <span class="icon icon_red"> 63*e8827d73SSzymon Olewniczak <?php echo inlineSVG(DOKU_PLUGIN . 'bez/images/close.svg') ?> 64*e8827d73SSzymon Olewniczak </span> 65*e8827d73SSzymon Olewniczak <?php printf($tpl->getLang('user_rejected_issue'), 66*e8827d73SSzymon Olewniczak '<strong>' . $tpl->user_name($tpl->get('thread')->closed_by) . '</strong>', 67*e8827d73SSzymon Olewniczak dformat(strtotime($tpl->get('thread')->close_date), '%f')) ?> 68*e8827d73SSzymon Olewniczak </div> 69*e8827d73SSzymon Olewniczak <?php endif ?> 70*e8827d73SSzymon Olewniczak 71*e8827d73SSzymon Olewniczak 72*e8827d73SSzymon Olewniczak<?php if ( !(strpos($tpl->param('action'), 'task') === 0) && 738a638198SSzymon Olewniczak $tpl->param('action') != 'commcause_edit'): ?> 74fe5d6d1eSSzymon Olewniczak 75fe5d6d1eSSzymon Olewniczak <?php include 'commcause_form.php' ?> 76fe5d6d1eSSzymon Olewniczak 77*e8827d73SSzymon Olewniczak <br> 78*e8827d73SSzymon Olewniczak <?php if ($tpl->get('thread')->task_count - $tpl->get('thread')->task_count_closed > 0): ?> 79*e8827d73SSzymon Olewniczak <div class="info"><?php echo $tpl->getLang('issue_unclosed_tasks') ?></div> 80fe5d6d1eSSzymon Olewniczak <?php endif ?> 81*e8827d73SSzymon Olewniczak <?php if ($tpl->get('thread')->state == 'proposal'): ?> 82*e8827d73SSzymon Olewniczak <div class="info"><?php echo $tpl->getLang('issue_is_proposal') ?></div> 83*e8827d73SSzymon Olewniczak <?php endif ?> 84*e8827d73SSzymon Olewniczak <?php if ($tpl->get('causes_without_tasks')): ?> 85*e8827d73SSzymon Olewniczak <div class="info"><?php echo $tpl->getLang('cause_without_task') ?></div> 86*e8827d73SSzymon Olewniczak <?php endif ?> 87*e8827d73SSzymon Olewniczak <?php if ($tpl->get('thread')->state == 'opened' && $tpl->get('thread')->task_count == 0): ?> 88*e8827d73SSzymon Olewniczak <div class="info"><?php echo $tpl->getLang('issue_no_tasks') ?></div> 89*e8827d73SSzymon Olewniczak <?php endif ?> 90*e8827d73SSzymon Olewniczak<?php endif ?> 91*e8827d73SSzymon Olewniczak 92fe5d6d1eSSzymon Olewniczak 93fe5d6d1eSSzymon Olewniczak</div> 94fe5d6d1eSSzymon Olewniczak<div class="bez_right_col"> 95fe5d6d1eSSzymon Olewniczak 96fe5d6d1eSSzymon Olewniczak<div class="bez_box"> 977fbf4c39SSzymon Olewniczak<h2><?php echo $tpl->getLang('comment_last_activity') ?></h2> 98fe5d6d1eSSzymon Olewniczak 998a638198SSzymon Olewniczak<?php echo dformat(strtotime($tpl->get('thread')->last_activity_date), '%Y-%m-%d %H:%M') ?> 100fe5d6d1eSSzymon Olewniczak 101fe5d6d1eSSzymon Olewniczak 102fe5d6d1eSSzymon Olewniczak</div> 103fe5d6d1eSSzymon Olewniczak 104fe5d6d1eSSzymon Olewniczak<div class="bez_box bez_subscribe_box"> 1057fbf4c39SSzymon Olewniczak<h2><?php echo $tpl->getLang('norifications') ?></h2> 1067fbf4c39SSzymon Olewniczak<?php if ($tpl->get('thread')->is_subscribent()): ?> 1077fbf4c39SSzymon Olewniczak <a href="<?php echo $tpl->url('thread', 'id', $tpl->get('thread')->id, 'action', 'unsubscribe') ?>" class="bez_subscribe_button"><span class="bez_awesome"></span> <?php echo $tpl->getLang('unsubscribe') ?></a> 1087fbf4c39SSzymon Olewniczak <p><?php echo $tpl->getLang('subscribed_info') ?></p> 109fe5d6d1eSSzymon Olewniczak<?php else: ?> 1107fbf4c39SSzymon Olewniczak <a href="<?php echo $tpl->url('thread', 'id', $tpl->get('thread')->id, 'action', 'subscribe') ?>" class="bez_subscribe_button"><span class="bez_awesome"></span> <?php echo $tpl->getLang('subscribe') ?></a> 1117fbf4c39SSzymon Olewniczak <p><?php echo $tpl->getLang('subscribed_info') ?></p> 112fe5d6d1eSSzymon Olewniczak<?php endif ?> 113fe5d6d1eSSzymon Olewniczak 114fe5d6d1eSSzymon Olewniczak</div> 115fe5d6d1eSSzymon Olewniczak 116fe5d6d1eSSzymon Olewniczak<div class="bez_box"> 1177fbf4c39SSzymon Olewniczak<h2><?php echo $tpl->getLang('comment_participants') ?></h2> 118fe5d6d1eSSzymon Olewniczak<ul id="issue_participants"> 1197fbf4c39SSzymon Olewniczak<?php foreach ($tpl->get('thread')->get_participants() as $participant): ?> 1207fbf4c39SSzymon Olewniczak <li><a href="<?php echo $tpl->mailto($tpl->user_email($participant['user_id']), 1217fbf4c39SSzymon Olewniczak '#'.$tpl->get('thread')->id.' '.$tpl->get('thread')->title, 1227fbf4c39SSzymon Olewniczak $tpl->url('thread', 'id', $tpl->get('thread')->id)) ?>" title="<?php echo $participant['user_id'] ?>"> 1237fbf4c39SSzymon Olewniczak <span class="bez_name"><?php echo $tpl->user_name($participant['user_id']) ?></span> 124fe5d6d1eSSzymon Olewniczak <span class="bez_icons"> 1257fbf4c39SSzymon Olewniczak <?php if($participant['original_poster']): ?> 126fe5d6d1eSSzymon Olewniczak <span class="bez_awesome" 1277fbf4c39SSzymon Olewniczak title="<?php echo $tpl->getLang('reporter') ?>"> 128fe5d6d1eSSzymon Olewniczak  129fe5d6d1eSSzymon Olewniczak </span> 130fe5d6d1eSSzymon Olewniczak <?php endif ?> 1317fbf4c39SSzymon Olewniczak <?php if($participant['coordinator']): ?> 132fe5d6d1eSSzymon Olewniczak <span class="bez_awesome" 1337fbf4c39SSzymon Olewniczak title="<?php echo $tpl->getLang('coordinator') ?>"> 134fe5d6d1eSSzymon Olewniczak  135fe5d6d1eSSzymon Olewniczak </span> 136fe5d6d1eSSzymon Olewniczak <?php endif ?> 1377fbf4c39SSzymon Olewniczak <?php if($participant['task_assignee']): ?> 138fe5d6d1eSSzymon Olewniczak <span class="bez_awesome" 1397fbf4c39SSzymon Olewniczak title="<?php echo $tpl->getLang('executor') ?>"> 140fe5d6d1eSSzymon Olewniczak  141fe5d6d1eSSzymon Olewniczak </span> 142fe5d6d1eSSzymon Olewniczak <?php endif ?> 1437fbf4c39SSzymon Olewniczak <?php if($participant['commentator']): ?> 144fe5d6d1eSSzymon Olewniczak <span class="bez_awesome" 1457fbf4c39SSzymon Olewniczak title="<?php echo $tpl->getLang('commentator') ?>"> 146fe5d6d1eSSzymon Olewniczak  147fe5d6d1eSSzymon Olewniczak </span> 148fe5d6d1eSSzymon Olewniczak <?php endif ?> 1497fbf4c39SSzymon Olewniczak <?php if($participant['subscribent']): ?> 150fe5d6d1eSSzymon Olewniczak <span class="bez_awesome" 1517fbf4c39SSzymon Olewniczak title="<?php echo $tpl->getLang('subscribent') ?>"> 152fe5d6d1eSSzymon Olewniczak  153fe5d6d1eSSzymon Olewniczak </span> 154fe5d6d1eSSzymon Olewniczak <?php endif ?> 155fe5d6d1eSSzymon Olewniczak </span> 156fe5d6d1eSSzymon Olewniczak </a></li> 157fe5d6d1eSSzymon Olewniczak<?php endforeach ?> 158fe5d6d1eSSzymon Olewniczak</ul> 159fe5d6d1eSSzymon Olewniczak 1607fbf4c39SSzymon Olewniczak<?php if ( $tpl->get('thread')->user_is_coordinator() && 1617fbf4c39SSzymon Olewniczak $tpl->get('thread')->state == 'opened'): ?> 1627fbf4c39SSzymon Olewniczak <h2><?php echo $tpl->getLang('issue_invite_header') ?></h2> 1637fbf4c39SSzymon Olewniczak <form action="<?php echo $tpl->url('thread', 'id', $tpl->get('thread')->id, 'action', 'invite') ?>" method="post" id="bez_invite_users_form"> 164fe5d6d1eSSzymon Olewniczak <div id="bez_invite_users" class="ui-widget"> 165fe5d6d1eSSzymon Olewniczak <select name="client"> 1667fbf4c39SSzymon Olewniczak <option value="">--- <?php echo $tpl->getLang('select') ?> ---</option> 1678a638198SSzymon Olewniczak <?php foreach (array_diff_key($tpl->get('users'), $tpl->get('thread')->get_participants('subscribent')) as $user_id => $ignore): ?> 1687fbf4c39SSzymon Olewniczak <option value="<?php echo $user_id ?>"><?php echo $tpl->user_name($user_id) ?></option> 169fe5d6d1eSSzymon Olewniczak <?php endforeach ?> 170fe5d6d1eSSzymon Olewniczak </select> 171fe5d6d1eSSzymon Olewniczak </div> 1727fbf4c39SSzymon Olewniczak <button class="bez_subscribe_button"><?php echo $tpl->getLang('issue_invite_button') ?></button> 173fe5d6d1eSSzymon Olewniczak </form> 174fe5d6d1eSSzymon Olewniczak<?php endif ?> 175fe5d6d1eSSzymon Olewniczak 176fe5d6d1eSSzymon Olewniczak 177fe5d6d1eSSzymon Olewniczak</div> 178fe5d6d1eSSzymon Olewniczak 179fe5d6d1eSSzymon Olewniczak 180fe5d6d1eSSzymon Olewniczak</div> 181fe5d6d1eSSzymon Olewniczak 182