Skip to content

Commit

Permalink
FEATURE: show topics viewed on user summary
Browse files Browse the repository at this point in the history
  • Loading branch information
nlalonde committed Nov 17, 2017
1 parent 7c6f991 commit 6dda87c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/assets/javascripts/discourse/templates/user/summary.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
{{user-stat value=recentTimeRead label="user.summary.recent_time_read" type="string"}}
</li>
{{/if}}
<li>
{{user-stat value=model.topics_entered label="user.summary.topics_entered"}}
</li>
<li>
{{user-stat value=model.posts_read_count label="user.summary.posts_read"}}
</li>
Expand Down
1 change: 1 addition & 0 deletions app/models/user_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ def recent_time_read
delegate :likes_given,
:likes_received,
:days_visited,
:topics_entered,
:posts_read_count,
:topic_count,
:post_count,
Expand Down
1 change: 1 addition & 0 deletions app/serializers/user_summary_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class UserWithCountSerializer < BasicUserSerializer

attributes :likes_given,
:likes_received,
:topics_entered,
:posts_read_count,
:days_visited,
:topic_count,
Expand Down
3 changes: 3 additions & 0 deletions config/locales/client.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,9 @@ en:
days_visited:
one: "day visited"
other: "days visited"
topics_entered:
one: "topic viewed"
other: "topics viewed"
posts_read:
one: "post read"
other: "posts read"
Expand Down

0 comments on commit 6dda87c

Please sign in to comment.