mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 14:07:30 +08:00
UX: improved user summary page
This commit is contained in:
@ -12,11 +12,19 @@ class UserSummarySerializer < ApplicationSerializer
|
||||
has_many :replies, serializer: ReplySerializer, embed: :object
|
||||
has_many :badges, serializer: UserBadgeSerializer, embed: :object
|
||||
|
||||
attributes :likes_given, :likes_received, :posts_read_count,
|
||||
:days_visited, :topic_count, :post_count
|
||||
|
||||
attributes :likes_given,
|
||||
:likes_received,
|
||||
:posts_read_count,
|
||||
:days_visited,
|
||||
:topic_count,
|
||||
:post_count,
|
||||
:time_read
|
||||
|
||||
def include_badges?
|
||||
SiteSetting.enable_badges
|
||||
end
|
||||
|
||||
def time_read
|
||||
AgeWords.age_words(object.time_read)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user