From cfd3000d833d3a99df0b4248e3b6160e9be4f22a Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 11 Mar 2017 19:01:40 -0500 Subject: Move notifications outside of dashboard --- app/Template/dashboard/notifications.php | 67 ----------------------------- app/Template/dashboard/sidebar.php | 3 -- app/Template/header/user_notifications.php | 8 ++-- app/Template/web_notification/show.php | 68 ++++++++++++++++++++++++++++++ 4 files changed, 73 insertions(+), 73 deletions(-) delete mode 100644 app/Template/dashboard/notifications.php create mode 100644 app/Template/web_notification/show.php (limited to 'app/Template') diff --git a/app/Template/dashboard/notifications.php b/app/Template/dashboard/notifications.php deleted file mode 100644 index 81adb348..00000000 --- a/app/Template/dashboard/notifications.php +++ /dev/null @@ -1,67 +0,0 @@ - -

- - - - - - - - - - - - - - - - - - - -
- - url->link( - $this->text->e($notification['event_data']['task']['project_name']), - 'BoardViewController', - 'show', - array('project_id' => $notification['event_data']['task']['project_id']) - ) - ?> - - text->e($notification['event_data']['project_name']) ?> - - - text->contains($notification['event_name'], 'subtask')): ?> - - text->contains($notification['event_name'], 'task.move')): ?> - - text->contains($notification['event_name'], 'task.overdue')): ?> - - text->contains($notification['event_name'], 'task')): ?> - - text->contains($notification['event_name'], 'comment')): ?> - - text->contains($notification['event_name'], 'file')): ?> - - - - text->contains($notification['event_name'], 'task.overdue') && count($notification['event_data']['tasks']) > 1): ?> - - - url->link($notification['title'], 'WebNotificationController', 'redirect', array('notification_id' => $notification['id'], 'user_id' => $user['id'])) ?> - - - dt->datetime($notification['date_creation']) ?> - - url->icon('check', t('Mark as read'), 'WebNotificationController', 'remove', array('user_id' => $user['id'], 'notification_id' => $notification['id'])) ?> -
- diff --git a/app/Template/dashboard/sidebar.php b/app/Template/dashboard/sidebar.php index 108c028a..e4c1038a 100644 --- a/app/Template/dashboard/sidebar.php +++ b/app/Template/dashboard/sidebar.php @@ -18,9 +18,6 @@
  • app->checkMenuSelection('DashboardController', 'activity') ?>> url->link(t('My activity stream'), 'DashboardController', 'activity', array('user_id' => $user['id'])) ?>
  • -
  • app->checkMenuSelection('DashboardController', 'notifications') ?>> - url->link(t('My notifications'), 'DashboardController', 'notifications', array('user_id' => $user['id'])) ?> -
  • hook->render('template:dashboard:sidebar', array('user' => $user)) ?> diff --git a/app/Template/header/user_notifications.php b/app/Template/header/user_notifications.php index 83c545d2..036fee29 100644 --- a/app/Template/header/user_notifications.php +++ b/app/Template/header/user_notifications.php @@ -1,5 +1,7 @@ + user->hasNotifications()): ?> - - url->link('', 'DashboardController', 'notifications', array('user_id' => $this->user->getId()), false, '', t('Unread notifications')) ?> - + modal->mediumIcon('bell web-notification-icon', t('Unread notifications'), 'WebNotificationController', 'show', array('user_id' => $this->user->getId())) ?> + + modal->mediumIcon('bell', t('My notifications'), 'WebNotificationController', 'show', array('user_id' => $this->user->getId())) ?> + diff --git a/app/Template/web_notification/show.php b/app/Template/web_notification/show.php new file mode 100644 index 00000000..d4f22ade --- /dev/null +++ b/app/Template/web_notification/show.php @@ -0,0 +1,68 @@ + + + +

    + +
    +
    +
    + 1): ?> + + + + +
    +   +
    + +
    + + text->contains($notification['event_name'], 'subtask')): ?> + + text->contains($notification['event_name'], 'task.move')): ?> + + text->contains($notification['event_name'], 'task.overdue')): ?> + + text->contains($notification['event_name'], 'task')): ?> + + text->contains($notification['event_name'], 'comment')): ?> + + text->contains($notification['event_name'], 'file')): ?> + + + + + url->link( + $this->text->e($notification['event_data']['task']['project_name']), + 'BoardViewController', + 'show', + array('project_id' => $notification['event_data']['task']['project_id']) + ) ?> > + + text->e($notification['event_data']['project_name']) ?> > + + + text->contains($notification['event_name'], 'task.overdue') && count($notification['event_data']['tasks']) > 1): ?> + + + url->link($notification['title'], 'WebNotificationController', 'redirect', array('notification_id' => $notification['id'], 'user_id' => $user['id'])) ?> + + +
    + dt->datetime($notification['date_creation']) ?> + modal->replaceIconLink('check', t('Mark as read'), 'WebNotificationController', 'remove', array('user_id' => $user['id'], 'notification_id' => $notification['id'])) ?> +
    +
    + +
    + \ No newline at end of file -- cgit v1.2.3