mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
FEATURE: show number of active users in the last 7 days on about page
This commit is contained in:
parent
79a7c7ce41
commit
750b27f973
3 changed files with 8 additions and 1 deletions
|
@ -53,6 +53,11 @@
|
|||
<td>{{number stats.user_count}}</td>
|
||||
<td>{{number stats.users_7_days}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{i18n 'about.active_user_count'}}</td>
|
||||
<td></td>
|
||||
<td>{{number stats.active_users_7_days}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{i18n 'about.like_count'}}</td>
|
||||
<td>{{number stats.like_count}}</td>
|
||||
|
|
|
@ -42,6 +42,7 @@ class About
|
|||
topics_7_days: Topic.listable_topics.where('created_at > ?', 7.days.ago).count,
|
||||
posts_7_days: Post.where('created_at > ?', 7.days.ago).count,
|
||||
users_7_days: User.where('created_at > ?', 7.days.ago).count,
|
||||
active_users_7_days: User.where('last_seen_at > ?', 7.days.ago).count,
|
||||
like_count: UserAction.where(action_type: UserAction::LIKE).count,
|
||||
likes_7_days: UserAction.where(action_type: UserAction::LIKE)
|
||||
.where("created_at > ?", 7.days.ago)
|
||||
|
|
|
@ -159,7 +159,8 @@ en:
|
|||
like_count: "Likes"
|
||||
topic_count: "Topics"
|
||||
post_count: "Posts"
|
||||
user_count: "Users"
|
||||
user_count: "New Users"
|
||||
active_user_count: "Active Users"
|
||||
contact: "Contact Us"
|
||||
contact_info: "In the event of a critical issue or urgent matter affecting this site, please contact us at %{contact_email}."
|
||||
|
||||
|
|
Loading…
Reference in a new issue