2014-07-20 12:26:15 +02:00
|
|
|
<div class="comment <?= isset($preview) ? 'comment-preview' : '' ?>" id="comment-<?= $comment['id'] ?>">
|
|
|
|
|
|
|
|
<p class="comment-title">
|
2015-01-16 14:23:05 +01:00
|
|
|
<span class="comment-username"><?= $this->e($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>
|
2015-01-16 14:23:05 +01:00
|
|
|
<?php if ((! isset($not_editable) || ! $not_editable) && ($this->userSession->isAdmin() || $this->userSession->isCurrentUser($comment['user_id']))): ?>
|
2014-07-20 12:26:15 +02:00
|
|
|
<li>
|
2015-01-16 14:23:05 +01:00
|
|
|
<?= $this->a(t('remove'), 'comment', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id'])) ?>
|
2014-07-20 12:26:15 +02:00
|
|
|
</li>
|
|
|
|
<li>
|
2015-01-16 14:23:05 +01:00
|
|
|
<?= $this->a(t('edit'), 'comment', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_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): ?>
|
2015-01-16 14:23:05 +01:00
|
|
|
<?= $this->markdown(
|
2014-11-23 20:13:38 +01:00
|
|
|
$comment['comment'],
|
|
|
|
array(
|
|
|
|
'controller' => 'task',
|
|
|
|
'action' => 'readonly',
|
|
|
|
'params' => array(
|
|
|
|
'token' => $project['token']
|
|
|
|
)
|
|
|
|
)
|
|
|
|
) ?>
|
|
|
|
<?php else: ?>
|
2015-01-16 14:23:05 +01:00
|
|
|
<?= $this->markdown(
|
|
|
|
$comment['comment'],
|
|
|
|
array(
|
|
|
|
'controller' => 'task',
|
|
|
|
'action' => 'show',
|
|
|
|
'params' => array(
|
|
|
|
'project_id' => $task['project_id']
|
|
|
|
)
|
|
|
|
)
|
|
|
|
) ?>
|
2014-11-23 20:13:38 +01:00
|
|
|
<?php endif ?>
|
2014-07-20 12:26:15 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|