/
parent-category-row.hbs
80 lines (75 loc) · 2.27 KB
/
parent-category-row.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{{#unless this.isHidden}}
<PluginOutlet
@name="category-list-above-each-category"
@outletArgs={{hash category=this.category}}
/>
<tr
data-category-id={{this.category.id}}
data-notification-level={{this.category.notificationLevelString}}
class="{{if
this.category.description_excerpt
'has-description'
'no-description'
}}
{{if this.category.uploaded_logo.url 'has-logo' 'no-logo'}}"
>
<td
class="category {{if this.isMuted 'muted'}}"
style={{category-color-variable this.category.color}}
>
<CategoryTitleLink @category={{this.category}} />
<PluginOutlet
@name="below-category-title-link"
@connectorTagName="div"
@outletArgs={{hash category=this.category}}
/>
{{#if this.category.description_excerpt}}
<div class="category-description">
{{dir-span this.category.description_excerpt htmlSafe="true"}}
</div>
{{/if}}
{{#if this.category.isGrandParent}}
<table class="category-list subcategories-with-subcategories">
<tbody>
{{#each this.category.subcategories as |subcategory|}}
<SubCategoryRow
@category={{subcategory}}
@listType={{this.listType}}
/>
{{/each}}
</tbody>
</table>
{{else if this.category.subcategories}}
<div class="subcategories">
{{#each this.category.subcategories as |subcategory|}}
<SubCategoryItem
@category={{subcategory}}
@listType={{this.listType}}
/>
{{/each}}
</div>
{{/if}}
</td>
<td class="topics">
<div title={{this.category.statTitle}}>{{html-safe
this.category.stat
}}</div>
<CategoryUnread
@category={{this.category}}
@tagName="div"
@class="unread-new"
@unreadTopicsCount={{this.unreadTopicsCount}}
@newTopicsCount={{this.newTopicsCount}}
/>
</td>
{{#unless this.isMuted}}
{{#if this.showTopics}}
<td class="latest">
{{#each this.category.featuredTopics as |t|}}
<FeaturedTopic @topic={{t}} />
{{/each}}
</td>
{{/if}}
{{/unless}}
</tr>
{{/unless}}