Show categories on the user streams for topics.

This commit is contained in:
Robin Ward
2014-05-26 13:49:57 -04:00
parent b1d2aba0f3
commit fc3ce934f5
4 changed files with 12 additions and 2 deletions
@@ -30,6 +30,13 @@ _.each(UserActionTypes, function (k, v) {
Discourse.UserAction = Discourse.Model.extend({
_attachCategory: function() {
var categoryId = this.get('category_id');
if (categoryId) {
this.set('category', Discourse.Category.findById(categoryId));
}
}.on('init'),
/**
Return an i18n key we will use for the description text of a user action.
@@ -5,6 +5,7 @@
<span class='time'>{{unboundDate path="created_at" leaveAgo="true"}}</span>
<span class="title">
<a href="{{unbound postUrl}}">{{unbound title}}</a>
{{categoryLink category}}
</span>
<span class="type">{{unbound descriptionHtml}}</span>
</div>