mirror of
https://github.com/discourse/discourse.git
synced 2025-01-31 20:37:14 +08:00
DEV: add outlet wrapper for categories boxes (#28860)
* DEV: add outlet wrapper for category boxes * Put plugin outlet after categories boxes
This commit is contained in:
parent
4406bbb020
commit
c459d4b76c
|
@ -1,4 +1,8 @@
|
||||||
{{#each this.categories as |c|}}
|
<PluginOutlet
|
||||||
|
@name="categories-boxes-wrapper"
|
||||||
|
@outletArgs={{hash categories=this.categories}}
|
||||||
|
>
|
||||||
|
{{#each this.categories as |c|}}
|
||||||
<PluginOutlet
|
<PluginOutlet
|
||||||
@name="category-box-before-each-box"
|
@name="category-box-before-each-box"
|
||||||
@outletArgs={{hash category=c}}
|
@outletArgs={{hash category=c}}
|
||||||
|
@ -49,13 +53,18 @@
|
||||||
{{if subcategory.uploaded_logo.url 'has-logo' 'no-logo'}}"
|
{{if subcategory.uploaded_logo.url 'has-logo' 'no-logo'}}"
|
||||||
>
|
>
|
||||||
<div class="subcategory-box-inner">
|
<div class="subcategory-box-inner">
|
||||||
<CategoryTitleLink @tagName="h4" @category={{subcategory}} />
|
<CategoryTitleLink
|
||||||
|
@tagName="h4"
|
||||||
|
@category={{subcategory}}
|
||||||
|
/>
|
||||||
{{#if subcategory.subcategories}}
|
{{#if subcategory.subcategories}}
|
||||||
<div class="subcategories">
|
<div class="subcategories">
|
||||||
{{#each subcategory.subcategories as |subsubcategory|}}
|
{{#each subcategory.subcategories as |subsubcategory|}}
|
||||||
{{#unless subsubcategory.isMuted}}
|
{{#unless subsubcategory.isMuted}}
|
||||||
<span class="subcategory">
|
<span class="subcategory">
|
||||||
<CategoryTitleBefore @category={{subsubcategory}} />
|
<CategoryTitleBefore
|
||||||
|
@category={{subsubcategory}}
|
||||||
|
/>
|
||||||
{{category-link subsubcategory hideParent="true"}}
|
{{category-link subsubcategory hideParent="true"}}
|
||||||
</span>
|
</span>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
@ -94,7 +103,8 @@
|
||||||
@name="category-box-after-each-box"
|
@name="category-box-after-each-box"
|
||||||
@outletArgs={{hash category=c}}
|
@outletArgs={{hash category=c}}
|
||||||
/>
|
/>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
</PluginOutlet>
|
||||||
|
|
||||||
<PluginOutlet
|
<PluginOutlet
|
||||||
@name="category-boxes-after-boxes"
|
@name="category-boxes-after-boxes"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user