mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
UX: improved user summary page
This commit is contained in:
parent
b55d3b240b
commit
bf579174c1
9 changed files with 219 additions and 131 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue