FEATURE: Actually show more notifications

The "Show more notifications..." link in the notifications dropdown now
links to /my/notifications, which is a historical view of all
notifications you have recieved.

Notification history is loaded in blocks of 60 at a time.

Admins can see others' notification history. (This was requested for
'debugging purposes', though that's what impersonation is for, IMO.)
This commit is contained in:
riking
2014-09-02 18:32:27 -07:00
parent a5e98c9906
commit 69bc552054
20 changed files with 246 additions and 12 deletions

View File

@ -43,6 +43,7 @@ class UserSerializer < BasicUserSerializer
:suspended_till,
:uploaded_avatar_id,
:badge_count,
:unread_notification_count,
:has_title_badges,
:edit_history_public,
:custom_fields
@ -76,6 +77,7 @@ class UserSerializer < BasicUserSerializer
:tracked_category_ids,
:watched_category_ids,
:private_messages_stats,
:unread_notification_count,
:disable_jump_reply,
:gravatar_avatar_upload_id,
:custom_avatar_upload_id,
@ -242,6 +244,10 @@ class UserSerializer < BasicUserSerializer
object.badges.where(allow_title: true).count > 0
end
def unread_notification_count
Notification.where(user_id: object.id, read: false).count
end
def include_edit_history_public?
can_edit && !SiteSetting.edit_history_visible_to_public
end