From 2178f7768fe7cfebd9ee1ad8aa024e11f1e11bc6 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 12 Oct 2018 12:33:08 -0400 Subject: [PATCH] FIX: Don't show empty user stats in the card when profile is hidden --- .../components/user-card-contents.hbs | 44 ++++++++++--------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/app/assets/javascripts/discourse/templates/components/user-card-contents.hbs b/app/assets/javascripts/discourse/templates/components/user-card-contents.hbs index 59c1891fb1d..39aed70a289 100644 --- a/app/assets/javascripts/discourse/templates/components/user-card-contents.hbs +++ b/app/assets/javascripts/discourse/templates/components/user-card-contents.hbs @@ -116,30 +116,32 @@ {{/if}} {{#if user}} -
- {{#if user.last_posted_at}} -

{{i18n 'last_post'}} {{format-date user.last_posted_at leaveAgo="true"}}

- {{/if}} -

{{i18n 'joined'}} {{format-date user.created_at leaveAgo="true"}}

-

- {{i18n 'time_read'}} - {{format-duration user.time_read}} - {{#if showRecentTimeRead}} - ({{i18n 'time_read_recently' time_read=recentTimeRead}}) + {{#unless user.profile_hidden}} +

- {{#if showCheckEmail}} -

{{i18n 'joined'}} {{format-date user.created_at leaveAgo="true"}}

+

+ {{i18n 'time_read'}} + {{format-duration user.time_read}} + {{#if showRecentTimeRead}} + ({{i18n 'time_read_recently' time_read=recentTimeRead}}) {{/if}}

- {{/if}} - {{plugin-outlet name="user-card-metadata" args=(hash user=user)}} -
+ {{#if showCheckEmail}} +

+ {{d-icon "envelope-o" title="user.email.title"}} + {{#if user.email}} + {{user.email}} + {{else}} + {{d-button action="checkEmail" actionParam=user icon="envelope-o" label="admin.users.check_email.text" class="btn-primary"}} + {{/if}} +

+ {{/if}} + {{plugin-outlet name="user-card-metadata" args=(hash user=user)}} + + {{/unless}} {{/if}} {{#if publicUserFields}}