diff --git a/app/assets/javascripts/discourse/helpers/application_helpers.js.coffee b/app/assets/javascripts/discourse/helpers/application_helpers.js.coffee index 340285fccaa..269278afaeb 100644 --- a/app/assets/javascripts/discourse/helpers/application_helpers.js.coffee +++ b/app/assets/javascripts/discourse/helpers/application_helpers.js.coffee @@ -60,12 +60,13 @@ Handlebars.registerHelper 'avatar', (user, options) -> user = Ember.Handlebars.get(this, user, options) if typeof user is 'string' username = Em.get(user, 'username') username ||= Em.get(user, options.hash.usernamePath) + title = Em.get(user, 'title') || Em.get(user, 'description') unless options.hash.ignoreTitle new Handlebars.SafeString Discourse.Utilities.avatarImg( size: options.hash.imageSize extraClasses: Em.get(user, 'extras') || options.hash.extraClasses username: username - title: Em.get(user, 'title') || Em.get(user, 'description') || username + title: title || username avatarTemplate: Ember.get(user, 'avatar_template') || options.hash.avatarTemplate ) @@ -125,4 +126,9 @@ Handlebars.registerHelper 'date', (property, options) -> new Handlebars.SafeString("#{displayDate}") - +Handlebars.registerHelper 'personalizedName', (property, options) -> + name = Ember.Handlebars.get(this, property, options); + username = Ember.Handlebars.get(this, options.hash.usernamePath, options) if options.hash.usernamePath + + return name unless username == Discourse.get('currentUser.username') + return Em.String.i18n('you') diff --git a/app/assets/javascripts/discourse/templates/user/stream.js.handlebars b/app/assets/javascripts/discourse/templates/user/stream.js.handlebars index fb280f331f8..6fa60aa59b7 100644 --- a/app/assets/javascripts/discourse/templates/user/stream.js.handlebars +++ b/app/assets/javascripts/discourse/templates/user/stream.js.handlebars @@ -2,11 +2,12 @@ {{#collection contentBinding="stream" itemClass="item"}} {{#with view.content}}
{{{unbound excerpt}}} diff --git a/app/assets/stylesheets/application/user.css.scss b/app/assets/stylesheets/application/user.css.scss index f0320623b85..8a91c8377ec 100644 --- a/app/assets/stylesheets/application/user.css.scss +++ b/app/assets/stylesheets/application/user.css.scss @@ -241,10 +241,6 @@ color: lighten($black, 30%); } .item { - .post-number { - color: lighten($black, 40%); - margin-right: 4px; - } padding: 10px 8px; background-color: white; border: 1px solid #b9b9b9; @@ -266,7 +262,7 @@ float: left; margin-right: 10px; } - .name { + .title { display: inline-block; margin-bottom: 4px; font-size: 14px; diff --git a/config/locales/en.yml b/config/locales/en.yml index 372c3ca2eb7..51510682d4f 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -435,6 +435,7 @@ en: show_more: "show more" links: Links faq: "FAQ" + you: "You" suggested_topics: title: "Suggested Topics"