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:
cpradio 2014-09-10 19:16:36 -04:00
parent abe420b322
commit 1ac7a8277d
2 changed files with 11 additions and 2 deletions

View File

@ -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() {

View File

@ -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>