mirror of
https://github.com/discourse/discourse.git
synced 2025-01-22 13:43:17 +08: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>")
|
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>
|
<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>
|
<span class='time'>{{date path="created_at" leaveAgo="true"}}</span>
|
||||||
<a class="title" href="{{unbound postUrl}}">{{unbound title}}</a><br>
|
<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>
|
<span class='type'>{{unbound description}}</span>
|
||||||
<a class="post-number" href="{{unbound postUrl}}">#{{unbound post_number}}</a>
|
<a class="post-number" href="{{unbound postUrl}}">#{{unbound post_number}}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -435,6 +435,7 @@ en:
|
||||||
show_more: "show more"
|
show_more: "show more"
|
||||||
links: Links
|
links: Links
|
||||||
faq: "FAQ"
|
faq: "FAQ"
|
||||||
|
you: "You"
|
||||||
|
|
||||||
suggested_topics:
|
suggested_topics:
|
||||||
title: "Suggested Topics"
|
title: "Suggested Topics"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user