FIX: Don't show empty user stats in the card when profile is hidden
This commit is contained in:
parent
43a7b08a48
commit
2178f7768f
|
@ -116,30 +116,32 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if user}}
|
{{#if user}}
|
||||||
<div class="metadata">
|
{{#unless user.profile_hidden}}
|
||||||
{{#if user.last_posted_at}}
|
<div class="metadata">
|
||||||
<h3><span class='desc'>{{i18n 'last_post'}}</span> {{format-date user.last_posted_at leaveAgo="true"}}</h3>
|
{{#if user.last_posted_at}}
|
||||||
{{/if}}
|
<h3><span class='desc'>{{i18n 'last_post'}}</span> {{format-date user.last_posted_at leaveAgo="true"}}</h3>
|
||||||
<h3><span class='desc'>{{i18n 'joined'}}</span> {{format-date user.created_at leaveAgo="true"}}</h3>
|
|
||||||
<h3 title="{{timeReadTooltip}}">
|
|
||||||
<span class='desc'>{{i18n 'time_read'}}</span>
|
|
||||||
{{format-duration user.time_read}}
|
|
||||||
{{#if showRecentTimeRead}}
|
|
||||||
<span>({{i18n 'time_read_recently' time_read=recentTimeRead}})</span>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</h3>
|
<h3><span class='desc'>{{i18n 'joined'}}</span> {{format-date user.created_at leaveAgo="true"}}</h3>
|
||||||
{{#if showCheckEmail}}
|
<h3 title="{{timeReadTooltip}}">
|
||||||
<h3 class="email">
|
<span class='desc'>{{i18n 'time_read'}}</span>
|
||||||
{{d-icon "envelope-o" title="user.email.title"}}
|
{{format-duration user.time_read}}
|
||||||
{{#if user.email}}
|
{{#if showRecentTimeRead}}
|
||||||
{{user.email}}
|
<span>({{i18n 'time_read_recently' time_read=recentTimeRead}})</span>
|
||||||
{{else}}
|
|
||||||
{{d-button action="checkEmail" actionParam=user icon="envelope-o" label="admin.users.check_email.text" class="btn-primary"}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</h3>
|
</h3>
|
||||||
{{/if}}
|
{{#if showCheckEmail}}
|
||||||
{{plugin-outlet name="user-card-metadata" args=(hash user=user)}}
|
<h3 class="email">
|
||||||
</div>
|
{{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}}
|
||||||
|
</h3>
|
||||||
|
{{/if}}
|
||||||
|
{{plugin-outlet name="user-card-metadata" args=(hash user=user)}}
|
||||||
|
</div>
|
||||||
|
{{/unless}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if publicUserFields}}
|
{{#if publicUserFields}}
|
||||||
|
|
Loading…
Reference in New Issue