2014-07-20 12:26:15 +02:00
|
|
|
<div class="comment <?= isset($preview) ? 'comment-preview' : '' ?>" id="comment-<?= $comment['id'] ?>">
|
|
|
|
|
|
|
|
<p class="comment-title">
|
2014-10-22 19:59:09 +02:00
|
|
|
<span class="comment-username"><?= Helper\escape($comment['name'] ?: $comment['username']) ?></span> @ <span class="comment-date"><?= dt('%B %e, %Y at %k:%M %p', $comment['date']) ?></span>
|
2014-07-20 12:26:15 +02:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<div class="comment-inner">
|
|
|
|
|
|
|
|
<?php if (! isset($preview)): ?>
|
|
|
|
<ul class="comment-actions">
|
|
|
|
<li><a href="#comment-<?= $comment['id'] ?>"><?= t('link') ?></a></li>
|
2014-10-22 19:59:09 +02:00
|
|
|
<?php if ((! isset($not_editable) || ! $not_editable) && (Helper\is_admin() || Helper\is_current_user($comment['user_id']))): ?>
|
2014-07-20 12:26:15 +02:00
|
|
|
<li>
|
2014-12-22 19:15:38 +01:00
|
|
|
<?= Helper\a(t('remove'), 'comment', 'confirm', array('task_id' => $task['id'], 'comment_id' => $comment['id'])) ?>
|
2014-07-20 12:26:15 +02:00
|
|
|
</li>
|
|
|
|
<li>
|
2014-12-22 19:15:38 +01:00
|
|
|
<?= Helper\a(t('edit'), 'comment', 'edit', array('task_id' => $task['id'], 'comment_id' => $comment['id'])) ?>
|
2014-07-20 12:26:15 +02:00
|
|
|
</li>
|
|
|
|
<?php endif ?>
|
|
|
|
</ul>
|
|
|
|
<?php endif ?>
|
|
|
|
|
|
|
|
<div class="markdown">
|
2014-11-23 20:13:38 +01:00
|
|
|
<?php if (isset($is_public) && $is_public): ?>
|
|
|
|
<?= Helper\markdown(
|
|
|
|
$comment['comment'],
|
|
|
|
array(
|
|
|
|
'controller' => 'task',
|
|
|
|
'action' => 'readonly',
|
|
|
|
'params' => array(
|
|
|
|
'token' => $project['token']
|
|
|
|
)
|
|
|
|
)
|
|
|
|
) ?>
|
|
|
|
<?php else: ?>
|
|
|
|
<?= Helper\markdown($comment['comment']) ?>
|
|
|
|
<?php endif ?>
|
2014-07-20 12:26:15 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|