From a785810f2d11ad14ab3497a51ca10a6780b758ad Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 13 Jun 2015 22:55:01 -0400 Subject: Show changes in task update notifications --- app/Model/Notification.php | 2 +- app/Subscriber/NotificationSubscriber.php | 1 + app/Template/notification/task_update.php | 96 +++++++++++++++++++------------ 3 files changed, 61 insertions(+), 38 deletions(-) diff --git a/app/Model/Notification.php b/app/Model/Notification.php index 34500483..1ef6a88f 100644 --- a/app/Model/Notification.php +++ b/app/Model/Notification.php @@ -268,7 +268,7 @@ class Notification extends Base { return $this->template->render( 'notification/'.str_replace('.', '_', $event_name), - $event_data + array('application_url' => $this->config->get('application_url')) + $event_data + array('application_url' => $this->config->get('application_url'), 'colors_list' => $this->color->getList()) ); } diff --git a/app/Subscriber/NotificationSubscriber.php b/app/Subscriber/NotificationSubscriber.php index 41fd6aef..d605c9f3 100644 --- a/app/Subscriber/NotificationSubscriber.php +++ b/app/Subscriber/NotificationSubscriber.php @@ -41,6 +41,7 @@ class NotificationSubscriber extends \Core\Base implements EventSubscriberInterf switch (get_class($event)) { case 'Event\TaskEvent': $values['task'] = $this->taskFinder->getDetails($event['task_id']); + $values['changes'] = isset($event['changes']) ? $event['changes'] : array(); break; case 'Event\SubtaskEvent': $values['subtask'] = $this->subtask->getById($event['id'], true); diff --git a/app/Template/notification/task_update.php b/app/Template/notification/task_update.php index ffea49cd..0352788b 100644 --- a/app/Template/notification/task_update.php +++ b/app/Template/notification/task_update.php @@ -1,43 +1,65 @@

e($task['title']) ?> (#)

- + + + +

+ + + +

+ text->markdown($task['description']) ?> + render('notification/footer', array('task' => $task, 'application_url' => $application_url)) ?> \ No newline at end of file -- cgit v1.2.3