mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FEATURE: User page refactor
Re-organise user page so it is easier to find interesting info split it into tabs - Introduce notifications and messages tabs - Stop couting stuff for the user page to speed up rendering - Suppress more information when viewing your own profile
This commit is contained in:
@ -33,9 +33,10 @@ class UsersController < ApplicationController
|
||||
|
||||
@user = fetch_user_from_params(include_inactive: current_user.try(:staff?))
|
||||
user_serializer = UserSerializer.new(@user, scope: guardian, root: 'user')
|
||||
if params[:stats].to_s == "false"
|
||||
user_serializer.omit_stats = true
|
||||
end
|
||||
|
||||
# TODO remove this options from serializer
|
||||
user_serializer.omit_stats = true
|
||||
|
||||
topic_id = params[:include_post_count_for].to_i
|
||||
if topic_id != 0
|
||||
user_serializer.topic_post_count = {topic_id => Post.where(topic_id: topic_id, user_id: @user.id).count }
|
||||
|
Reference in New Issue
Block a user