glyphs on the user stream, rename responses to replies

This commit is contained in:
Sam 2013-07-10 16:35:06 +10:00
parent 7cee5efab8
commit 8367326e76
3 changed files with 45 additions and 7 deletions

View File

@ -26,21 +26,54 @@ Discourse.ActivityFilterView = Discourse.View.extend({
}.property('stream.filter', 'content.action_type'),
render: function(buffer) {
var content = this.get('content');
var content = this.get("content");
var count, description;
if (content) {
count = Em.get(content, 'count');
description = Em.get(content, 'description');
count = Em.get(content, "count");
description = Em.get(content, "description");
} else {
count = this.get('count');
count = this.get("count");
description = I18n.t("user.filters.all");
}
buffer.push("<a href='#'>" + description +
" <span class='count'>(" + count + ")</span><span class='icon-chevron-right'></span></a>");
" <span class='count'>(" + count + ")</span>");
var icon = this.get('icon');
if(icon) {
buffer.push("<i class='glyph icon icon-" + icon + "'></i>");
}
buffer.push("<span class='icon-chevron-right'></span></a>");
},
icon: function(){
var action_type = parseInt(this.get("content.action_type"),10);
var icon;
switch(action_type){
case Discourse.UserAction.WAS_LIKED:
icon = "heart";
break;
case Discourse.UserAction.BOOKMARK:
icon = "bookmark";
break;
case Discourse.UserAction.EDIT:
icon = "pencil";
break;
case Discourse.UserAction.RESPONSE:
icon = "reply";
break;
case Discourse.UserAction.STAR:
icon = "star";
break;
}
return icon;
}.property("content.action_type"),
click: function() {
this.set('stream.filter', this.get('content.action_type'));
return false;

View File

@ -93,4 +93,9 @@
font-size: 14px;
line-height: 20px;
}
}
.glyph {
font-size: 12px;
margin-left: 8px;
}
}

View File

@ -147,7 +147,7 @@ en:
"3": "Bookmarks"
"4": "Topics"
"5": "Posts"
"6": "Responses"
"6": "Replies"
"7": "Mentions"
"9": "Quotes"
"10": "Favorites"