mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 04:34:13 -06:00
Merge pull request #2779 from cpradio/add-suspension-to-user-card
UX: Add suspension to user card
This commit is contained in:
commit
52672088a0
@ -18,6 +18,8 @@ export default ObjectController.extend({
|
||||
|
||||
hasUserFilters: Em.computed.gt('postStream.userFilters.length', 0),
|
||||
|
||||
isSuspended: Em.computed.notEmpty('user.suspend_reason'),
|
||||
|
||||
showBadges: Discourse.computed.setting('enable_badges'),
|
||||
|
||||
moreBadgesCount: function() {
|
||||
|
@ -32,7 +32,15 @@
|
||||
</div>
|
||||
|
||||
<div class='bottom'>
|
||||
{{#if user.bio_cooked}}<div class='bio'>{{{user.bio_cooked}}}</div>{{/if}}
|
||||
{{#if isSuspended}}
|
||||
<div class='suspended'>
|
||||
<i class='fa fa-ban'></i>
|
||||
<b>{{i18n user.suspended_notice date="user.suspendedTillDate"}}</b><br/>
|
||||
<b>{{i18n user.suspended_reason}}</b> {{user.suspend_reason}}
|
||||
</div>
|
||||
{{else}}
|
||||
{{#if user.bio_cooked}}<div class='bio'>{{{user.bio_cooked}}}</div>{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{#if user.can_send_private_message_to_user}}
|
||||
<button class='btn btn-primary' {{action composePrivateMessage user}}><i class='fa fa-envelope'></i>{{i18n user.private_message}}</button>
|
||||
@ -47,7 +55,6 @@
|
||||
{{#if hasUserFilters}}
|
||||
<button class='btn' {{action cancelFilter}}><i class='fa fa-times'></i>{{i18n topic.filters.cancel}}</button>
|
||||
{{/if}}
|
||||
|
||||
</div>
|
||||
{{else}}
|
||||
<p class='loading'>{{i18n loading}}</p>
|
||||
|
@ -135,4 +135,9 @@
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
.suspended {
|
||||
color: $danger;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user