Fix links to user pages on dashboard

This commit is contained in:
Neil Lalonde 2013-05-06 12:15:25 -04:00
parent 69be7d0ad1
commit e70526d851
2 changed files with 13 additions and 1 deletions

View file

@ -0,0 +1,12 @@
/**
Return the url to a user's admin page given the username.
For example:
<a href="{{unbound adminUserPath username}}">{{unbound username}}</a>
@method adminUserPath
@for Handlebars
**/
Handlebars.registerHelper('adminUserPath', function(username) {
return Discourse.getURL("/admin/users/") + Ember.Handlebars.get(this, username);
});

View file

@ -230,7 +230,7 @@
{{#each top_referrers.data}}
<tbody>
<tr>
<td class="title">{{#linkTo adminUser username}}{{username}}{{/linkTo}}</td>
<td class="title"><a href="{{unbound adminUserPath username}}">{{unbound username}}</a></td>
<td class="value">{{num_clicks}}</td>
<td class="value">{{num_topics}}</td>
</tr>