Public user profile page shows if the user is suspended and why.
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
<form>
|
||||
{{i18n admin.user.suspend_duration}}
|
||||
{{textField value=duration maxlength="5" autofocus="autofocus" class="span2"}}
|
||||
{{i18n admin.user.suspend_duration_units}}
|
||||
{{i18n admin.user.suspend_duration_units}}<br/>
|
||||
<br/>
|
||||
{{i18n admin.user.suspend_reason_label}}
|
||||
{{{i18n admin.user.suspend_reason_label}}}<br/>
|
||||
<br/>
|
||||
{{textField value=reason class="span8"}}
|
||||
</form>
|
||||
|
||||
@@ -97,6 +97,12 @@ Discourse.User = Discourse.Model.extend({
|
||||
return Discourse.Site.currentProp('trustLevels').findProperty('id', parseInt(this.get('trust_level'), 10));
|
||||
}.property('trust_level'),
|
||||
|
||||
isSuspended: Em.computed.equal('suspended', true),
|
||||
|
||||
suspendedTillDate: function() {
|
||||
return Discourse.Formatter.longDate(this.get('suspended_till'));
|
||||
}.property('suspended_till'),
|
||||
|
||||
/**
|
||||
Changes this user's username.
|
||||
|
||||
|
||||
@@ -42,6 +42,14 @@
|
||||
<h2>{{name}}</h2>
|
||||
|
||||
<div class='bio'>{{{bio_excerpt}}}</div>
|
||||
|
||||
{{#if isSuspended}}
|
||||
<div class='suspended'>
|
||||
<i class='icon icon-ban-circle'></i>
|
||||
<b>{{i18n user.suspended_notice date="suspendedTillDate"}}</b><br/>
|
||||
<b>{{i18n user.suspended_reason}}</b> {{suspend_reason}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<div class='secondary'>
|
||||
|
||||
Reference in New Issue
Block a user