UX: Display unread underneath description on categories page if logo

This commit is contained in:
Robin Ward 2015-03-26 11:08:12 -04:00
parent a30895e69d
commit e6ba3344fa
2 changed files with 14 additions and 12 deletions

View File

@ -0,0 +1,6 @@
{{#if category.unreadTopics}}
<a href="{{unbound category.unreadUrl}}" class='badge new-posts badge-notification' title='{{i18n 'topic.unread_topics' count=category.unreadTopics}}'>{{i18n 'filters.unread.lower_title_with_count' count=category.unreadTopics}}</a>
{{/if}}
{{#if category.newTopics}}
<a href="{{unbound category.newUrl}}" class='badge new-posts badge-notification' title='{{i18n 'topic.new_topics' count=ctegory.newTopics}}'>{{i18n 'filters.new.lower_title_with_count' count=category.newTopics}}</a>
{{/if}}

View File

@ -15,12 +15,9 @@
<div> <div>
<div class="pull-left"> <div class="pull-left">
{{category-title-link category=c}} {{category-title-link category=c}}
{{#if c.unreadTopics}} {{#unless c.logo_url}}
<a href="{{unbound c.unreadUrl}}" class='badge new-posts badge-notification' title='{{i18n 'topic.unread_topics' count=c.unreadTopics}}'>{{i18n 'filters.unread.lower_title_with_count' count=c.unreadTopics}}</a> {{category-unread category=c}}
{{/if}} {{/unless}}
{{#if c.newTopics}}
<a href="{{unbound c.newUrl}}" class='badge new-posts badge-notification' title='{{i18n 'topic.new_topics' count=c.newTopics}}'>{{i18n 'filters.new.lower_title_with_count' count=c.newTopics}}</a>
{{/if}}
</div> </div>
<div class="clearfix"></div> <div class="clearfix"></div>
</div> </div>
@ -28,17 +25,16 @@
<div class="category-description"> <div class="category-description">
{{{c.description_excerpt}}} {{{c.description_excerpt}}}
</div> </div>
{{#if c.logo_url}}
{{category-unread category=c}}
{{/if}}
{{/if}} {{/if}}
{{#if c.subcategories}} {{#if c.subcategories}}
<div class='subcategories'> <div class='subcategories'>
{{#each s in c.subcategories}} {{#each s in c.subcategories}}
{{category-link s hideParent="true"}} {{category-link s hideParent="true"}}
{{#if s.unreadTopics}} {{category-unread category=s}}
<a href={{unbound s.unreadUrl}} class='badge new-posts badge-notification' title='{{i18n 'topic.unread_topics' count=s.unreadTopics}}'>{{unbound s.unreadTopics}}</a>
{{/if}}
{{#if s.newTopics}}
<a href={{unbound s.newUrl}} class='badge new-posts badge-notification' title='{{i18n 'topic.new_topics' count=s.newTopics}}'>{{unbound s.newTopics}}</a>
{{/if}}
{{/each}} {{/each}}
</div> </div>
{{/if}} {{/if}}