mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:23:13 +08:00
1c87bb7fe9
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
61 lines
1.5 KiB
Handlebars
61 lines
1.5 KiB
Handlebars
<div class="edit-site-text">
|
|
<div class="title">
|
|
<h3>{{this.siteText.id}}</h3>
|
|
</div>
|
|
|
|
<div class="title">
|
|
<h4>{{i18n "admin.site_text.locale"}} {{this.localeFullName}}</h4>
|
|
</div>
|
|
|
|
{{#if this.isOutdated}}
|
|
<div class="outdated">
|
|
<h4>{{i18n "admin.site_text.outdated.title"}}</h4>
|
|
<p>{{i18n "admin.site_text.outdated.description"}}</p>
|
|
<h5>{{i18n "admin.site_text.outdated.old_default"}}</h5>
|
|
<p>{{this.siteText.old_default}}</p>
|
|
<h5>{{i18n "admin.site_text.outdated.new_default"}}</h5>
|
|
<p>{{this.siteText.new_default}}</p>
|
|
<DButton
|
|
@action={{this.dismissOutdated}}
|
|
@label="admin.site_text.outdated.dismiss"
|
|
class="btn-default"
|
|
/>
|
|
</div>
|
|
{{/if}}
|
|
|
|
<ExpandingTextArea
|
|
@value={{this.buffered.value}}
|
|
@rows="1"
|
|
@class="site-text-value"
|
|
/>
|
|
|
|
{{#if this.siteText.has_interpolation_keys}}
|
|
<div class="desc">{{i18n "admin.site_text.interpolation_keys"}}
|
|
{{this.interpolationKeys}}
|
|
</div>
|
|
{{/if}}
|
|
|
|
<SaveControls
|
|
@model={{this.siteText}}
|
|
@action={{action "saveChanges"}}
|
|
@saved={{this.saved}}
|
|
@saveDisabled={{this.saveDisabled}}
|
|
>
|
|
{{#if this.siteText.can_revert}}
|
|
<DButton
|
|
@action={{this.revertChanges}}
|
|
@label="admin.site_text.revert"
|
|
class="revert-site-text"
|
|
/>
|
|
{{/if}}
|
|
</SaveControls>
|
|
|
|
<LinkTo
|
|
@route="adminSiteText.index"
|
|
@query={{hash locale=this.locale}}
|
|
class="go-back"
|
|
>
|
|
{{d-icon "arrow-left"}}
|
|
{{i18n "admin.site_text.go_back"}}
|
|
</LinkTo>
|
|
</div> |