Files
discourse/app/assets/javascripts/admin/templates/components/themes-list.hbs
Joffrey JAFFEUX 683cb28099 DEV: enforces ember-template-lint: no-triple-curlies (#9165)
This pr replaces `{{{ }}}` usage by a {{html-safe}} helper. While it doesn't solve the underlying issue, it gives us a path forward without risking breaking too much existing behavior.

Also introduces an htmlSafe computed macro:

```
import { htmlSafe } from "discourse/lib/computed";

htmlDescription: htmlSafe("description")
```

Overtime {{html-safe}} usage should be removed and moved to components properties or specialized components/helpers.
2020-03-11 09:23:10 +01:00

54 lines
1.5 KiB
Handlebars

<div class="themes-list-header">
{{d-button
action=(action "changeView")
actionParam=THEMES
class=(concat "themes-tab " "tab " (if themesTabActive 'btn-danger active' ''))
label="admin.customize.theme.title"
}}
{{d-button
action=(action "changeView")
actionParam=COMPONENTS
class=(concat "components-tab " "tab " (if componentsTabActive 'btn-danger active' ''))
label="admin.customize.theme.components"
icon="puzzle-piece"
}}
</div>
<div class="themes-list-container">
{{#if hasThemes}}
{{#if hasActiveThemes}}
{{#each activeThemes as |theme|}}
{{themes-list-item theme=theme navigateToTheme=(action "navigateToTheme" theme)}}
{{/each}}
{{#if hasInactiveThemes}}
<div class="themes-list-item inactive-indicator">
<span class="empty">
{{#if themesTabActive}}
{{i18n "admin.customize.theme.inactive_themes"}}
{{else}}
{{i18n "admin.customize.theme.inactive_components"}}
{{/if}}
</span>
</div>
{{/if}}
{{/if}}
{{#if hasInactiveThemes}}
{{#each inactiveThemes as |theme|}}
{{themes-list-item 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">
{{d-button action=installModal icon="upload" label="admin.customize.install" class="btn-primary"}}
</div>