discourse/app/assets/javascripts/admin/addon/templates/customize-themes-edit.hbs
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

60 lines
1.6 KiB
Handlebars

<div class="current-style {{if this.maximized 'maximized'}}">
<div class="wrapper">
<div class="editor-information">
<DButton
@title="go_back"
@action={{this.goBack}}
@icon="chevron-left"
class="btn-small editor-back-button"
/>
<span class="editor-theme-name-wrapper">
{{i18n "admin.customize.theme.edit_css_html"}}
<LinkTo
@route={{this.showRouteName}}
@model={{this.model.id}}
@replace={{true}}
class="editor-theme-name"
>
{{this.model.name}}
</LinkTo>
</span>
</div>
<AdminThemeEditor
@theme={{this.model}}
@editRouteName={{this.editRouteName}}
@currentTargetName={{this.currentTargetName}}
@fieldName={{this.fieldName}}
@fieldAdded={{action "fieldAdded"}}
@maximized={{this.maximized}}
@onlyOverriddenChanged={{action "onlyOverriddenChanged"}}
@save={{action "save"}}
/>
<div class="admin-footer">
<div class="status-actions">
{{#unless this.model.changed}}
<a
href={{this.previewUrl}}
rel="noopener noreferrer"
title={{i18n "admin.customize.explain_preview"}}
class="preview-link"
target="_blank"
>
{{i18n "admin.customize.preview"}}
</a>
{{/unless}}
</div>
<div class="buttons">
<DButton
@action={{this.save}}
@disabled={{this.saveDisabled}}
@translatedLabel={{this.saveButtonText}}
class="btn-primary"
/>
</div>
</div>
</div>
</div>