diff --git a/app/assets/javascripts/admin/templates/user_index.js.handlebars b/app/assets/javascripts/admin/templates/user_index.js.handlebars
index a6e07957ebf..74e4ba26464 100644
--- a/app/assets/javascripts/admin/templates/user_index.js.handlebars
+++ b/app/assets/javascripts/admin/templates/user_index.js.handlebars
@@ -320,8 +320,7 @@
{{i18n admin.user.like_count}}
-
{{like_count}}
-
{{like_count_last_100_days}} {{i18n admin.user.last_100_days}}
+
{{like_given_count}} / {{like_count}}
{{i18n admin.user.topics_entered}}
@@ -346,12 +345,8 @@
{{posts_read_count}}
-
{{i18n admin.user.flags_given_count}}
-
{{flags_given_count}}
-
-
-
{{i18n admin.user.flags_received_count}}
-
{{flags_received_count}}
+
{{i18n admin.user.flags_given_received_count}}
+
{{flags_given_count}} / {{flags_received_count}}
{{i18n admin.user.private_topics_count}}
diff --git a/app/models/user.rb b/app/models/user.rb
index d220e277688..c24671b053c 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -375,8 +375,8 @@ class User < ActiveRecord::Base
UserAction.where(user_id: id, action_type: UserAction::WAS_LIKED).count
end
- def like_count_since(time)
- UserAction.where(user_id: id, action_type: UserAction::WAS_LIKED).where('created_at > ?', time).count
+ def like_given_count
+ UserAction.where(user_id: id, action_type: UserAction::LIKE).count
end
def post_count
diff --git a/app/serializers/admin_detailed_user_serializer.rb b/app/serializers/admin_detailed_user_serializer.rb
index 09371c8e23b..27dfc2ec14a 100644
--- a/app/serializers/admin_detailed_user_serializer.rb
+++ b/app/serializers/admin_detailed_user_serializer.rb
@@ -7,7 +7,7 @@ class AdminDetailedUserSerializer < AdminUserSerializer
:can_revoke_moderation,
:can_impersonate,
:like_count,
- :like_count_last_100_days,
+ :like_given_count,
:post_count,
:topic_count,
:flags_given_count,
@@ -53,10 +53,6 @@ class AdminDetailedUserSerializer < AdminUserSerializer
object.moderator
end
- def like_count_last_100_days
- object.like_count_since(100.days.ago)
- end
-
def topic_count
object.topics.count
end
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index 916621f3693..8599cf6bf47 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -1879,7 +1879,7 @@ en:
reputation: Reputation
permissions: Permissions
activity: Activity
- like_count: Likes Received
+ like_count: Likes Given / Received
last_100_days: 'in the last 100 days'
private_topics_count: Private Topics
posts_read_count: Posts Read
@@ -1887,6 +1887,7 @@ en:
topics_entered: Topics Viewed
flags_given_count: Flags Given
flags_received_count: Flags Received
+ flags_given_received_count: 'Flags Given / Received'
approve: 'Approve'
approved_by: "approved by"
approve_success: "User approved and email sent with activation instructions."