Jarek Radosz 1c87bb7fe9
DEV: Update DButton uses (#23333)
1. Use `this.` instead of `{{action}}` where applicable
2. Use `{{fn}}` instead of `@actionParam` where applicable
3. Use non-`@` versions of class/type/tabindex/aria-controls/aria-expanded
4. Remove `btn` class (it's added automatically to all DButtons)
5. Remove `type="button"` (it's the default)
6. Use `concat-class` helper
2023-08-31 11:49:35 +02:00

77 lines
2.0 KiB
Handlebars

<div class="themes-list-header">
<DButton
@action={{fn this.changeView this.THEMES}}
@label="admin.customize.theme.title"
class={{concat-class "themes-tab" "tab" (if this.themesTabActive "active")}}
/>
<DButton
@action={{fn this.changeView this.COMPONENTS}}
@label="admin.customize.theme.components"
@icon="puzzle-piece"
class={{concat-class
"components-tab"
"tab"
(if this.componentsTabActive "active")
}}
/>
</div>
<div class="themes-list-container">
{{#if this.showFilter}}
<div class="themes-list-filter themes-list-item">
<Input
class="filter-input"
placeholder={{i18n "admin.customize.theme.filter_placeholder"}}
autocomplete="off"
@type="search"
@value={{mut this.filterTerm}}
/>
{{d-icon "search"}}
</div>
{{/if}}
{{#if this.hasThemes}}
{{#if this.hasActiveThemes}}
{{#each this.activeThemes as |theme|}}
<ThemesListItem
@theme={{theme}}
@navigateToTheme={{action "navigateToTheme" theme}}
/>
{{/each}}
{{#if this.hasInactiveThemes}}
<div class="themes-list-item inactive-indicator">
<span class="empty">
{{#if this.themesTabActive}}
{{i18n "admin.customize.theme.inactive_themes"}}
{{else}}
{{i18n "admin.customize.theme.inactive_components"}}
{{/if}}
</span>
</div>
{{/if}}
{{/if}}
{{#if this.hasInactiveThemes}}
{{#each this.inactiveThemes as |theme|}}
<ThemesListItem
@classNames="inactive-theme"
@theme={{theme}}
@navigateToTheme={{action "navigateToTheme" theme}}
/>
{{/each}}
{{/if}}
{{else}}
<div class="themes-list-item">
<span class="empty">{{i18n "admin.customize.theme.empty"}}</span>
</div>
{{/if}}
</div>
<div class="create-actions">
<DButton
@action={{this.installModal}}
@icon="upload"
@label="admin.customize.install"
class="btn-primary"
/>
</div>