DRY up the displaying of topic categories. Should not be duplicated.

This commit is contained in:
Robin Ward 2015-01-21 12:20:39 -05:00
parent df8880a71a
commit 48c7e20d80
3 changed files with 8 additions and 9 deletions

View file

@ -0,0 +1,6 @@
{{#if topic.category.parentCategory}}
{{bound-category-link topic.category.parentCategory}}
{{/if}}
{{bound-category-link topic.category hideParent=true}}
{{plugin-outlet "topic-category"}}

View file

@ -112,10 +112,7 @@
{{/if}} {{/if}}
{{/if}} {{/if}}
</h1> </h1>
{{#if topic.category.parentCategory}} {{topic-category topic=topic}}
{{bound-category-link topic.category.parentCategory}}
{{/if}}
{{bound-category-link topic.category hideParent=true}}
</div> </div>
</div> </div>
</div> </div>

View file

@ -43,11 +43,7 @@
</h1> </h1>
{{#unless isPrivateMessage}} {{#unless isPrivateMessage}}
{{#if category.parentCategory}} {{topic-category topic=model}}
{{bound-category-link category.parentCategory}}
{{/if}}
{{bound-category-link category hideParent=true}}
{{plugin-outlet "topic-category"}}
{{/unless}} {{/unless}}
{{/if}} {{/if}}
</div> </div>