summaryrefslogtreecommitdiff
path: root/app/Template/comment/show.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-11-25 21:28:29 -0500
committerFrédéric Guillot <fred@kanboard.net>2014-11-25 21:28:29 -0500
commit5fb686dd9c5474aba3e274bbe7917e8259aa27e3 (patch)
tree7e9b8ad9b34a1410fe96c5c1fde1ed2db8aef7d6 /app/Template/comment/show.php
parentcdfd6a8abefa6cbea2dbae9e7f758914f7fb465e (diff)
Move comment templates to a subfolder
Diffstat (limited to 'app/Template/comment/show.php')
-rw-r--r--app/Template/comment/show.php41
1 files changed, 41 insertions, 0 deletions
diff --git a/app/Template/comment/show.php b/app/Template/comment/show.php
new file mode 100644
index 00000000..5e1e9337
--- /dev/null
+++ b/app/Template/comment/show.php
@@ -0,0 +1,41 @@
+<div class="comment <?= isset($preview) ? 'comment-preview' : '' ?>" id="comment-<?= $comment['id'] ?>">
+
+ <p class="comment-title">
+ <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>
+ </p>
+
+ <div class="comment-inner">
+
+ <?php if (! isset($preview)): ?>
+ <ul class="comment-actions">
+ <li><a href="#comment-<?= $comment['id'] ?>"><?= t('link') ?></a></li>
+ <?php if ((! isset($not_editable) || ! $not_editable) && (Helper\is_admin() || Helper\is_current_user($comment['user_id']))): ?>
+ <li>
+ <?= Helper\a(t('remove'), 'comment', 'confirm', array('task_id' => $task['id'], 'comment_id' => $comment['id'])) ?>
+ </li>
+ <li>
+ <?= Helper\a(t('edit'), 'comment', 'edit', array('task_id' => $task['id'], 'comment_id' => $comment['id'])) ?>
+ </li>
+ <?php endif ?>
+ </ul>
+ <?php endif ?>
+
+ <div class="markdown">
+ <?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 ?>
+ </div>
+
+ </div>
+</div> \ No newline at end of file