1<?php /* @var \dokuwiki\plugin\bez\meta\Tpl $tpl */ ?>
2<a id="zk<?php echo $tpl->get('task_comment')->id ?>"></a>
3<div class="bez_comment bez_type_0
4	<?php
5        if ($tpl->get('task_comment')->author == $tpl->current_user()) {
6            echo 'bez_my_comment';
7        }
8?>">
9    <div class="bez_avatar">
10        <img src="<?php echo DOKU_URL ?>lib/plugins/bez/images/avatar_default.png" />
11    </div>
12    <div class="bez_text_comment">
13		<span class="bez_arrow-tip-container ">
14			<span class="bez_arrow-tip ">
15				<span class="bez_arrow-tip-grad"></span>
16			</span>
17		</span>
18        <div class="commcause_content">
19            <h2>
20                <a href="#zk<?php echo $tpl->get('task_comment')->id ?>">#zk<?php echo $tpl->get('task_comment')->id ?></a>
21                <strong><?php echo $tpl->user_name($tpl->get('task_comment')->author) ?></strong>
22
23                <?php if ($tpl->get('task_comment')->closing === '1'): ?>
24                    <?php echo $tpl->getLang('closing_comment_added') ?>
25                <?php else: ?>
26                    <?php echo $tpl->getLang('comment_added') ?>
27                <?php endif ?>
28                <?php echo $tpl->datetime($tpl->get('task_comment')->create_date) ?>
29
30                <?php if ($tpl->param('zkid') != $tpl->get('task_comment')->id): ?>
31                    <div class="bez_comment_buttons">
32                        <?php if (
33                            $tpl->get('task')->state == 'opened' &&
34                            $tpl->get('task_comment')->acl_of('id') >= BEZ_PERMISSION_CHANGE): ?>
35
36                            <a class="bez_comment_button"
37                               href="<?php echo $tpl->url('task', 'tid', $tpl->get('task')->id, 'action', 'comment_edit', 'zkid', $tpl->get('task_comment')->id) ?>#zk_">
38                                <span class="bez_awesome">&#xf040;</span>
39                            </a>
40                            <?php if ($tpl->get('task_comment')->acl_of('id') >= BEZ_PERMISSION_DELETE): ?>
41                                <a class="bez_comment_button bez_commcause_delete_prompt"
42                                   data-kid="<?php echo $tpl->get('task_comment')->id ?>"
43                                   href="<?php echo $tpl->url('task', 'tid', $tpl->get('task')->id, 'action', 'comment_delete', 'zkid', $tpl->get('task_comment')->id) ?>">
44                                    <span class="bez_awesome">&#xf00d;</span>
45                                </a>
46                            <?php endif ?>
47                        <?php endif ?>
48                    </div>
49                <?php endif ?>
50            </h2>
51            <div class="bez_content">
52                <?php echo $tpl->get('task_comment')->content_html; ?>
53            </div>
54        </div>
55    </div>
56</div>
57