FIX: Linking to users on admin dashboard was broken
This commit is contained in:
parent
b9a5a0460d
commit
6237a155e7
|
@ -23,9 +23,19 @@ Discourse.AdminDashboardRoute = Discourse.Route.extend({
|
|||
_.each(d.reports,function(report){
|
||||
c.set(report.type, Discourse.Report.create(report));
|
||||
});
|
||||
_.each(['admins', 'moderators', 'blocked', 'banned', 'top_referrers', 'top_traffic_sources', 'top_referred_topics'], function(x) {
|
||||
|
||||
var topReferrers = d.top_referrers;
|
||||
if (topReferrers && topReferrers.data) {
|
||||
d.top_referrers.data = topReferrers.data.map(function (user) {
|
||||
return Discourse.AdminUser.create(user);
|
||||
});
|
||||
c.set('top_referrers', topReferrers);
|
||||
}
|
||||
|
||||
['admins', 'moderators', 'blocked', 'banned', 'top_traffic_sources', 'top_referred_topics'].forEach(function(x) {
|
||||
c.set(x, d[x]);
|
||||
});
|
||||
|
||||
c.set('loading', false);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -26,8 +26,8 @@ Discourse.AdminUserRoute = Discourse.Route.extend({
|
|||
adminUser.loadDetails().then(function () {
|
||||
adminUser.setOriginalTrustLevel();
|
||||
controller.set('model', adminUser);
|
||||
window.scrollTo(0, 0);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue