summaryrefslogtreecommitdiff
path: root/app/Template/event
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-07-17 17:15:14 -0400
committerFrederic Guillot <fred@kanboard.net>2016-07-17 17:15:14 -0400
commitec0ecc5b0387924f061865f4ec12dbfc5b7018fe (patch)
tree146fe907e300fa88587b621aaf53a9ca05e8c2d8 /app/Template/event
parent3aa0f8574898876518dddf29ced43dd32efa2375 (diff)
Added event for removed comments with some refactoring
Diffstat (limited to 'app/Template/event')
-rw-r--r--app/Template/event/comment_remove.php11
-rw-r--r--app/Template/event/comment_update.php3
2 files changed, 14 insertions, 0 deletions
diff --git a/app/Template/event/comment_remove.php b/app/Template/event/comment_remove.php
new file mode 100644
index 00000000..ead7d56a
--- /dev/null
+++ b/app/Template/event/comment_remove.php
@@ -0,0 +1,11 @@
+<p class="activity-title">
+ <?= e('%s removed a comment on the task %s',
+ $this->text->e($author),
+ $this->url->link(t('#%d', $task['id']), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))
+ ) ?>
+ <span class="activity-date"><?= $this->dt->datetime($date_creation) ?></span>
+</p>
+<div class="activity-description">
+ <p class="activity-task-title"><?= $this->text->e($task['title']) ?></p>
+ <div class="markdown"><?= $this->text->markdown($comment['comment']) ?></div>
+</div>
diff --git a/app/Template/event/comment_update.php b/app/Template/event/comment_update.php
index 5a0821bd..5be598ac 100644
--- a/app/Template/event/comment_update.php
+++ b/app/Template/event/comment_update.php
@@ -7,4 +7,7 @@
</p>
<div class="activity-description">
<p class="activity-task-title"><?= $this->text->e($task['title']) ?></p>
+ <?php if (! empty($comment['comment'])): ?>
+ <div class="markdown"><?= $this->text->markdown($comment['comment']) ?></div>
+ <?php endif ?>
</div>