mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Merge pull request #510 from ZogStriP/fix-can-t-click-on-avatars-when-on-my-profile-page
fix: can't click on avatars when on my profile page
This commit is contained in:
commit
c541d9699c
@ -96,6 +96,10 @@ Discourse.Utilities = {
|
|||||||
return url;
|
return url;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
userUrl: function(username) {
|
||||||
|
return Discourse.getURL("/users/" + username);
|
||||||
|
},
|
||||||
|
|
||||||
emailValid: function(email) {
|
emailValid: function(email) {
|
||||||
// see: http://stackoverflow.com/questions/46155/validate-email-address-in-javascript
|
// see: http://stackoverflow.com/questions/46155/validate-email-address-in-javascript
|
||||||
var re;
|
var re;
|
||||||
|
@ -8,6 +8,10 @@
|
|||||||
**/
|
**/
|
||||||
Discourse.UserAction = Discourse.Model.extend({
|
Discourse.UserAction = Discourse.Model.extend({
|
||||||
|
|
||||||
|
userUrl: (function() {
|
||||||
|
return Discourse.Utilities.userUrl(this.get('username'));
|
||||||
|
}).property(),
|
||||||
|
|
||||||
postUrl: (function() {
|
postUrl: (function() {
|
||||||
return Discourse.Utilities.postUrl(this.get('slug'), this.get('topic_id'), this.get('post_number'));
|
return Discourse.Utilities.postUrl(this.get('slug'), this.get('topic_id'), this.get('post_number'));
|
||||||
}).property(),
|
}).property(),
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
{{#collection contentBinding="stream" itemClass="item"}}
|
{{#collection contentBinding="stream" itemClass="item"}}
|
||||||
{{#with view.content}}
|
{{#with view.content}}
|
||||||
<div class='clearfix info'>
|
<div class='clearfix info'>
|
||||||
<a href="{{unbound usernameUrl}}" class='avatar-link'><div class='avatar-wrapper'>{{avatar this imageSize="large" extraClasses="actor" ignoreTitle="true"}}</div></a>
|
<a href="{{unbound userUrl}}" class='avatar-link'><div class='avatar-wrapper'>{{avatar this imageSize="large" extraClasses="actor" ignoreTitle="true"}}</div></a>
|
||||||
<span class='time'>{{date path="created_at" leaveAgo="true"}}</span>
|
<span class='time'>{{date path="created_at" leaveAgo="true"}}</span>
|
||||||
<span class="title">
|
<span class="title">
|
||||||
<a href="{{unbound postUrl}}">{{unbound title}}</a>
|
<a href="{{unbound postUrl}}">{{unbound title}}</a>
|
||||||
@ -17,7 +17,7 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
</span>
|
</span>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
<a class='name' href="{{unbound usernameUrl}}">{{personalizedName name usernamePath="username"}}</a>
|
<a class='name' href="{{unbound userUrl}}">{{personalizedName name usernamePath="username"}}</a>
|
||||||
{{#if description}}
|
{{#if description}}
|
||||||
<span class='type'>{{unbound description}}</span>
|
<span class='type'>{{unbound description}}</span>
|
||||||
{{#if isPostAction}}
|
{{#if isPostAction}}
|
||||||
@ -40,7 +40,7 @@
|
|||||||
<div class='child-actions'>
|
<div class='child-actions'>
|
||||||
<i class="icon {{unbound icon}}"></i>
|
<i class="icon {{unbound icon}}"></i>
|
||||||
{{#each items}}
|
{{#each items}}
|
||||||
<a href="{{unbound usernameUrl}}" class='avatar-link'><div class='avatar-wrapper'>{{avatar this imageSize="tiny" extraClasses="actor" ignoreTitle="true"}}</div></a>
|
<a href="{{unbound userUrl}}" class='avatar-link'><div class='avatar-wrapper'>{{avatar this imageSize="tiny" extraClasses="actor" ignoreTitle="true"}}</div></a>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
Loading…
Reference in New Issue
Block a user