mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 21:35:48 +08:00
371bbadb92
* Run no-implicit-this codemod for app templates * Run tagless-ember-components-codemod for plugins * Turn on no-implicit-this lint
45 lines
1.4 KiB
Handlebars
45 lines
1.4 KiB
Handlebars
{{#unless this.selectKit.isHidden}}
|
|
{{component this.selectKit.options.headerComponent
|
|
tabindex=this.tabindex
|
|
value=this.value
|
|
selectedContent=this.selectedContent
|
|
selectKit=this.selectKit
|
|
id=(concat this.selectKit.uniqueID "-header")
|
|
}}
|
|
|
|
<SelectKit::SelectKitBody @selectKit={{this.selectKit}} @id={{concat this.selectKit.uniqueID "-body"}}>
|
|
{{component this.selectKit.options.filterComponent
|
|
selectKit=this.selectKit
|
|
id=(concat this.selectKit.uniqueID "-filter")
|
|
}}
|
|
|
|
{{#if this.selectKit.isLoading}}
|
|
<span class="is-loading">
|
|
{{#if this.site}}
|
|
{{loading-spinner size="small"}}
|
|
{{/if}}
|
|
</span>
|
|
{{else}}
|
|
{{#each this.collections as |collection|}}
|
|
{{component (component-for-collection collection.identifier this.selectKit)
|
|
collection=collection
|
|
selectKit=this.selectKit
|
|
value=this.value
|
|
}}
|
|
{{/each}}
|
|
|
|
{{#if this.selectKit.filter}}
|
|
{{#if this.selectKit.hasNoContent}}
|
|
<span class="no-content" role="alert">
|
|
{{i18n "select_kit.no_content"}}
|
|
</span>
|
|
{{else}}
|
|
<span class="results-count" role="alert">
|
|
{{i18n "select_kit.results_count" count=this.mainCollection.length}}
|
|
</span>
|
|
{{/if}}
|
|
{{/if}}
|
|
{{/if}}
|
|
</SelectKit::SelectKitBody>
|
|
{{/unless}}
|