summaryrefslogtreecommitdiff
path: root/app/Template/event
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-03-28 21:37:53 -0400
committerFrederic Guillot <fred@kanboard.net>2015-03-28 21:37:53 -0400
commit5536f6c6ce591ba05a169d2e33b6fb240378d8a4 (patch)
treebac0cb1563d8258965384b97be8d425578f71ef6 /app/Template/event
parentf9891a966fb87d2112f174b7c3a1b3a705b73bdd (diff)
Add Slack integration
Diffstat (limited to 'app/Template/event')
-rw-r--r--app/Template/event/task_assignee_change.php16
1 files changed, 11 insertions, 5 deletions
diff --git a/app/Template/event/task_assignee_change.php b/app/Template/event/task_assignee_change.php
index 6eac412b..22ed936b 100644
--- a/app/Template/event/task_assignee_change.php
+++ b/app/Template/event/task_assignee_change.php
@@ -1,9 +1,15 @@
<p class="activity-title">
- <?= e('%s changed the assignee of the task %s to %s',
- $this->e($author),
- $this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])),
- $this->e($task['assignee_name'] ?: $task['assignee_username'])
- ) ?>
+ <?php $assignee = $task['assignee_name'] ?: $task['assignee_username'] ?>
+
+ <?php if (! empty($assignee)): ?>
+ <?= e('%s changed the assignee of the task %s to %s',
+ $this->e($author),
+ $this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])),
+ $this->e($assignee)
+ ) ?>
+ <?php else: ?>
+ <?= e('%s remove the assignee of the task %s', $this->e($author), $this->a(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))) ?>
+ <?php endif ?>
</p>
<p class="activity-description">
<em><?= $this->e($task['title']) ?></em>