mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 17:06:31 -06:00
Show "You" to same-user on activity stream items
This commit is contained in:
parent
f6b4d0d57a
commit
9e653ad370
@ -125,4 +125,9 @@ Handlebars.registerHelper 'date', (property, options) ->
|
||||
|
||||
new Handlebars.SafeString("<span class='date' title='#{fullReadable}'>#{displayDate}</span>")
|
||||
|
||||
|
||||
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')
|
||||
|
@ -5,7 +5,7 @@
|
||||
<a href="/users/{{unbound username}}" class='avatar-link'><div class='avatar-wrapper'>{{avatar this imageSize="large" extraClasses="actor" avatarTemplatePath="avatar_template"}}</div></a>
|
||||
<span class='time'>{{date path="created_at" leaveAgo="true"}}</span>
|
||||
<a class="title" href="{{unbound postUrl}}">{{unbound title}}</a><br>
|
||||
<a class='name' href="/users/{{unbound username}}">{{unbound name}}</a>
|
||||
<a class='name' href="/users/{{unbound username}}">{{personalizedName name usernamePath="username"}}</a>
|
||||
<span class='type'>{{unbound description}}</span>
|
||||
<a class="post-number" href="{{unbound postUrl}}">#{{unbound post_number}}</a>
|
||||
</div>
|
||||
|
@ -435,6 +435,7 @@ en:
|
||||
show_more: "show more"
|
||||
links: Links
|
||||
faq: "FAQ"
|
||||
you: "You"
|
||||
|
||||
suggested_topics:
|
||||
title: "Suggested Topics"
|
||||
|
Loading…
Reference in New Issue
Block a user