diff --git a/phpBB/includes/notification/type/base.php b/phpBB/includes/notification/type/base.php index 9ef0e71009..afd6a9fc9b 100644 --- a/phpBB/includes/notification/type/base.php +++ b/phpBB/includes/notification/type/base.php @@ -126,6 +126,17 @@ abstract class phpbb_notification_type_base implements phpbb_notification_type_i */ public function prepare_for_display() { + if ($this->get_url()) + { + $u_mark_read = append_sid($this->phpbb_root_path . 'index.' . $this->php_ext, 'mark_notification=' . $this->notification_id); + } + else + { + $redirect = (($this->user->page['page_dir']) ? $this->user->page['page_dir'] . '/' : '') . $this->user->page['page_name'] . (($this->user->page['query_string']) ? '?' . $this->user->page['query_string'] : ''); + + $u_mark_read = append_sid($this->phpbb_root_path . 'index.' . $this->php_ext, 'mark_notification=' . $this->notification_id . '&redirect=' . urlencode($redirect)); + } + return array( 'NOTIFICATION_ID' => $this->notification_id, @@ -138,7 +149,7 @@ abstract class phpbb_notification_type_base implements phpbb_notification_type_i 'UNREAD' => $this->unread, - 'U_MARK_READ' => append_sid($this->phpbb_root_path . 'index.' . $this->php_ext, 'mark_notification=' . $this->notification_id), + 'U_MARK_READ' => ($this->unread) ? $u_mark_read : '', ); } diff --git a/phpBB/index.php b/phpBB/index.php index 7f85879d23..3cb49f1a28 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -36,6 +36,11 @@ if (($mark_notification = request_var('mark_notification', 0))) $notification->mark_read(); + if (($redirect = request_var('redirect', ''))) + { + redirect(append_sid($phpbb_root_path . $redirect)); + } + redirect($notification->get_url()); } } diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index f6bc57fa4b..8fcd595972 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -137,7 +137,7 @@ diff --git a/phpBB/styles/prosilver/template/ucp_notifications.html b/phpBB/styles/prosilver/template/ucp_notifications.html index f71d8698b9..08b5396827 100644 --- a/phpBB/styles/prosilver/template/ucp_notifications.html +++ b/phpBB/styles/prosilver/template/ucp_notifications.html @@ -77,7 +77,7 @@
  • - + {notification_list.AVATAR} @@ -86,9 +86,14 @@ + + + {L_MARK_READ} + +
    -
    {L_MARK_READ}
    +
      {L_MARK_READ} 
  • diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css index c82fa5b7c8..6e825f82ce 100644 --- a/phpBB/styles/prosilver/theme/common.css +++ b/phpBB/styles/prosilver/theme/common.css @@ -683,6 +683,10 @@ p.rules a { line-height: 1.5em; } +.notification_list ul.topiclist dt { + width: 70%; +} + .notification_list ul li a span img { float: left; max-width: 50px; @@ -706,3 +710,9 @@ p.rules a { .notification_time { margin-top: 0.5em; } + +.mark_notification_read { + clear: both; + float: left; + margin-top: 0.5em; +} diff --git a/phpBB/styles/subsilver2/template/overall_header.html b/phpBB/styles/subsilver2/template/overall_header.html index e41095ad38..560f6a32b3 100644 --- a/phpBB/styles/subsilver2/template/overall_header.html +++ b/phpBB/styles/subsilver2/template/overall_header.html @@ -154,19 +154,22 @@ function marklist(id, name, state)
    - + - - diff --git a/phpBB/styles/subsilver2/template/ucp_notifications.html b/phpBB/styles/subsilver2/template/ucp_notifications.html index 7c3a516521..a2dc90c9f3 100644 --- a/phpBB/styles/subsilver2/template/ucp_notifications.html +++ b/phpBB/styles/subsilver2/template/ucp_notifications.html @@ -88,22 +88,22 @@ - + -
    + {notifications.AVATAR} + - + - + {notifications.FORMATTED_TITLE}
    {notifications.TIME} + +
    {L_MARK_READ} +
    {L_MARK_READ}
    + {notification_list.AVATAR} - + - + {notification_list.FORMATTED_TITLE}
    {notification_list.TIME}
    - +