mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-04-25 13:33:51 -04:00
FIX: broken admin user page when must_approve_users is enabled
This commit is contained in:
parent
e823558742
commit
36cbd0d348
2 changed files with 10 additions and 5 deletions
app/assets/javascripts/admin
|
@ -359,9 +359,15 @@ Discourse.AdminUser = Discourse.User.extend({
|
|||
|
||||
suspendedBy: function() {
|
||||
if (this.get('suspended_by')) {
|
||||
return Discourse.User.create(this.get('suspended_by'));
|
||||
return Discourse.AdminUser.create(this.get('suspended_by'));
|
||||
}
|
||||
}.property('suspended_by')
|
||||
}.property('suspended_by'),
|
||||
|
||||
approvedBy: function() {
|
||||
if (this.get('approved_by')) {
|
||||
return Discourse.AdminUser.create(this.get('approved_by'));
|
||||
}
|
||||
}.property('approved_by')
|
||||
|
||||
});
|
||||
|
||||
|
|
|
@ -102,8 +102,8 @@
|
|||
{{#if approved}}
|
||||
{{i18n admin.user.approved_by}}
|
||||
|
||||
{{#link-to 'adminUser' approved_by}}{{avatar approved_by imageSize="small"}}{{/link-to}}
|
||||
{{#link-to 'adminUser' approved_by}}{{approved_by.username}}{{/link-to}}
|
||||
{{#link-to 'adminUser' approvedBy}}{{avatar approvedBy imageSize="small"}}{{/link-to}}
|
||||
{{#link-to 'adminUser' approvedBy}}{{approvedBy.username}}{{/link-to}}
|
||||
{{else}}
|
||||
{{i18n no_value}}
|
||||
{{/if}}
|
||||
|
@ -260,7 +260,6 @@
|
|||
<div class='display-row highlight-danger'>
|
||||
<div class='field'>{{i18n admin.user.suspended_by}}</div>
|
||||
<div class='value'>
|
||||
<!-- TODO: Why don't these links work? -->
|
||||
{{#link-to 'adminUser' suspendedBy}}{{avatar suspendedBy imageSize="tiny"}}{{/link-to}}
|
||||
{{#link-to 'adminUser' suspendedBy}}{{suspendedBy.username}}{{/link-to}}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue