FIX: If badges are disabled don't show "Top Badges" on summary view

This commit is contained in:
Robin Ward 2017-05-04 12:14:06 -04:00
parent c98601129b
commit b3165f8435

View File

@ -176,15 +176,17 @@
</div>
</div>
<div class='top-section badges-section'>
<h3 class='stats-title'>{{i18n "user.summary.top_badges"}}</h3>
{{#each model.badges as |badge|}}
{{badge-card badge=badge count=badge.count username=user.username_lower}}
{{else}}
<p>{{i18n "user.summary.no_badges"}}</p>
{{/each}}
{{#if moreBadges}}
<p>{{#link-to "user.badges" user class="more"}}{{i18n "user.summary.more_badges"}}{{/link-to}}</p>
{{/if}}
</div>
{{#if siteSettings.enable_badges}}
<div class='top-section badges-section'>
<h3 class='stats-title'>{{i18n "user.summary.top_badges"}}</h3>
{{#each model.badges as |badge|}}
{{badge-card badge=badge count=badge.count username=user.username_lower}}
{{else}}
<p>{{i18n "user.summary.no_badges"}}</p>
{{/each}}
{{#if moreBadges}}
<p>{{#link-to "user.badges" user class="more"}}{{i18n "user.summary.more_badges"}}{{/link-to}}</p>
{{/if}}
</div>
{{/if}}
{{/d-section}}