40 lines
1.9 KiB
PHP
40 lines
1.9 KiB
PHP
<div class="comment <?= isset($preview) ? 'comment-preview' : '' ?>" id="comment-<?= $comment['id'] ?>">
|
|
|
|
<?= $this->avatar->render($comment['user_id'], $comment['username'], $comment['name'], $comment['email'], $comment['avatar_path']) ?>
|
|
|
|
<div class="comment-title">
|
|
<?php if (! empty($comment['username'])): ?>
|
|
<strong class="comment-username"><?= $this->text->e($comment['name'] ?: $comment['username']) ?></strong>
|
|
<?php endif ?>
|
|
|
|
<small class="comment-date"><?= t('Created At')?>: <?= $this->dt->datetime($comment['date_creation']) ?></small>
|
|
<small class="comment-date"><?= t('Updated At')?>: <?= $this->dt->datetime($comment['date_modification']) ?></small>
|
|
|
|
</div>
|
|
|
|
<div class="comment-content">
|
|
<div class="markdown">
|
|
<?= $this->text->markdown($comment['comment'], isset($is_public) && $is_public) ?>
|
|
</div>
|
|
</div>
|
|
|
|
<?php if (! isset($hide_actions)): ?>
|
|
<div class="comment-actions">
|
|
<ul>
|
|
<li>
|
|
<i class="fa fa-link fa-fw"></i>
|
|
<a href="#comment-<?= $comment['id'] ?>"><?= t('link') ?></a>
|
|
</li>
|
|
<?php if ($editable && ($this->user->isAdmin() || $this->user->isCurrentUser($comment['user_id']))): ?>
|
|
<li>
|
|
<?= $this->modal->medium('edit', t('edit'), 'CommentController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id'])) ?>
|
|
</li>
|
|
<li>
|
|
<?= $this->modal->confirm('trash-o', t('remove'), 'CommentController', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id'])) ?>
|
|
</li>
|
|
<?php endif ?>
|
|
</ul>
|
|
</div>
|
|
<?php endif ?>
|
|
</div>
|