Merge pull request #101 from tms/profile-stream-cleanup
Tweaked profile stream activity entries
This commit is contained in:
commit
4b0eec334f
|
@ -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("<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')
|
||||
|
|
|
@ -2,11 +2,12 @@
|
|||
{{#collection contentBinding="stream" itemClass="item"}}
|
||||
{{#with view.content}}
|
||||
<div class='clearfix info'>
|
||||
<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" ignoreTitle="true"}}</div></a>
|
||||
<span class='time'>{{date path="created_at" leaveAgo="true"}}</span>
|
||||
<a class='name' href="{{unbound postUrl}}">{{unbound name}}</a><br>
|
||||
<a class="title" href="{{unbound postUrl}}">{{unbound title}}</a><br>
|
||||
<a class='name' href="/users/{{unbound username}}">{{personalizedName name usernamePath="username"}}</a>
|
||||
<span class='type'>{{unbound description}}</span>
|
||||
<span class='title'><span class="post-number">#{{unbound post_number}}</span> <a href="{{unbound postUrl}}">{{unbound title}}</a></span>
|
||||
<a class="post-number" href="{{unbound postUrl}}">#{{unbound post_number}}</a>
|
||||
</div>
|
||||
<p class='excerpt'>
|
||||
{{{unbound excerpt}}}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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