UX: Add Suspension Message to User Card
Add the suspension message to the user card of the user. This replaces the about me (bio) just like it does on their profile page. https://meta.discourse.org/t/profile-page-on-mobile-selecting-menu-item-should-jump-to-the-selected-content/19896/2
This commit is contained in:
parent
abe420b322
commit
1ac7a8277d
|
@ -18,6 +18,8 @@ export default ObjectController.extend({
|
||||||
|
|
||||||
hasUserFilters: Em.computed.gt('postStream.userFilters.length', 0),
|
hasUserFilters: Em.computed.gt('postStream.userFilters.length', 0),
|
||||||
|
|
||||||
|
isSuspended: Em.computed.notEmpty('user.suspend_reason'),
|
||||||
|
|
||||||
showBadges: Discourse.computed.setting('enable_badges'),
|
showBadges: Discourse.computed.setting('enable_badges'),
|
||||||
|
|
||||||
moreBadgesCount: function() {
|
moreBadgesCount: function() {
|
||||||
|
|
|
@ -32,7 +32,15 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class='bottom'>
|
<div class='bottom'>
|
||||||
|
{{#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 user.bio_cooked}}<div class='bio'>{{{user.bio_cooked}}}</div>{{/if}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{#if user.can_send_private_message_to_user}}
|
{{#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>
|
<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}}
|
{{#if hasUserFilters}}
|
||||||
<button class='btn' {{action cancelFilter}}><i class='fa fa-times'></i>{{i18n topic.filters.cancel}}</button>
|
<button class='btn' {{action cancelFilter}}><i class='fa fa-times'></i>{{i18n topic.filters.cancel}}</button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<p class='loading'>{{i18n loading}}</p>
|
<p class='loading'>{{i18n loading}}</p>
|
||||||
|
|
Loading…
Reference in New Issue