2022-07-06 01:41:31 +08:00
|
|
|
{{#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")
|
2017-10-20 03:51:08 +08:00
|
|
|
}}
|
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
<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")
|
2021-08-23 16:44:19 +08:00
|
|
|
}}
|
2020-02-03 21:22:14 +08:00
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.selectKit.isLoading}}
|
2020-03-09 20:44:34 +08:00
|
|
|
<span class="is-loading">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.site}}
|
2020-03-09 20:44:34 +08:00
|
|
|
{{loading-spinner size="small"}}
|
|
|
|
{{/if}}
|
|
|
|
</span>
|
|
|
|
{{else}}
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#each this.collections as |collection|}}
|
|
|
|
{{component
|
|
|
|
(component-for-collection collection.identifier this.selectKit)
|
2020-02-03 21:22:14 +08:00
|
|
|
collection=collection
|
2022-07-06 01:41:31 +08:00
|
|
|
selectKit=this.selectKit
|
|
|
|
value=this.value
|
2020-02-03 21:22:14 +08:00
|
|
|
}}
|
|
|
|
{{/each}}
|
2021-08-23 16:44:19 +08:00
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.selectKit.filter}}
|
|
|
|
{{#if this.selectKit.hasNoContent}}
|
2021-08-23 16:44:19 +08:00
|
|
|
<span class="no-content" role="alert">
|
|
|
|
{{i18n "select_kit.no_content"}}
|
|
|
|
</span>
|
|
|
|
{{else}}
|
|
|
|
<span class="results-count" role="alert">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{i18n "select_kit.results_count" count=this.mainCollection.length}}
|
2021-08-23 16:44:19 +08:00
|
|
|
</span>
|
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
2020-03-09 20:44:34 +08:00
|
|
|
{{/if}}
|
2022-06-30 18:30:50 +08:00
|
|
|
</SelectKit::SelectKitBody>
|
2020-02-03 21:22:14 +08:00
|
|
|
{{/unless}}
|