diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-06-14 11:50:31 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-06-14 11:50:31 -0400 |
commit | 9b399951f430b26379a2bf8b13ace99290227e61 (patch) | |
tree | 4dd694985dc9f27782ad365d376dc5a37f1e987e /app/Template/event | |
parent | a785810f2d11ad14ab3497a51ca10a6780b758ad (diff) |
Improve activity stream/notification for task update events and add new notification for swimlane change
Diffstat (limited to 'app/Template/event')
-rw-r--r-- | app/Template/event/events.php | 2 | ||||
-rw-r--r-- | app/Template/event/task_move_swimlane.php | 19 | ||||
-rw-r--r-- | app/Template/event/task_update.php | 5 |
3 files changed, 26 insertions, 0 deletions
diff --git a/app/Template/event/events.php b/app/Template/event/events.php index 2dc79871..971f6587 100644 --- a/app/Template/event/events.php +++ b/app/Template/event/events.php @@ -7,6 +7,8 @@ <p class="activity-datetime"> <?php if ($this->text->contains($event['event_name'], 'subtask')): ?> <i class="fa fa-tasks"></i> + <?php elseif ($this->text->contains($event['event_name'], 'task.move')): ?> + <i class="fa fa-arrows-alt"></i> <?php elseif ($this->text->contains($event['event_name'], 'task')): ?> <i class="fa fa-newspaper-o"></i> <?php elseif ($this->text->contains($event['event_name'], 'comment')): ?> diff --git a/app/Template/event/task_move_swimlane.php b/app/Template/event/task_move_swimlane.php new file mode 100644 index 00000000..ca440dbf --- /dev/null +++ b/app/Template/event/task_move_swimlane.php @@ -0,0 +1,19 @@ +<?= $this->user->avatar($email, $author) ?> + +<p class="activity-title"> + <?php if ($task['swimlane_id'] == 0): ?> + <?= e('%s moved the task %s to the first swimlane', + $this->e($author), + $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) + ) ?> + <?php else: ?> + <?= e('%s moved the task %s to the swimlane "%s"', + $this->e($author), + $this->url->link(t('#%d', $task['id']), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), + $this->e($task['swimlane_name']) + ) ?> + <?php endif ?> +</p> +<p class="activity-description"> + <em><?= $this->e($task['title']) ?></em> +</p>
\ No newline at end of file diff --git a/app/Template/event/task_update.php b/app/Template/event/task_update.php index 7d036d43..e8254bcb 100644 --- a/app/Template/event/task_update.php +++ b/app/Template/event/task_update.php @@ -8,4 +8,9 @@ </p> <p class="activity-description"> <em><?= $this->e($task['title']) ?></em> + <?php if (isset($changes)): ?> + <div class="activity-changes"> + <?= $this->render('task/changes', array('changes' => $changes, 'task' => $task)) ?> + </div> + <?php endif ?> </p>
\ No newline at end of file |