discourse/app/assets/javascripts/admin/addon/components/site-setting.hbs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

67 lines
1.7 KiB
Handlebars
Raw Normal View History

2015-03-03 01:12:19 +08:00
<div class="setting-label">
<h3>
{{this.settingName}}
{{#if this.staffLogFilter}}
<LinkTo
@route="adminLogs.staffActionLogs"
@query={{hash filters=this.staffLogFilter force_refresh=true}}
title={{i18n "admin.settings.history"}}
>
<span class="history-icon">
{{d-icon "history"}}
</span>
</LinkTo>
{{/if}}
</h3>
{{#if this.defaultIsAvailable}}
<DButton
class="btn-link"
@action={{this.setDefaultValues}}
@translatedLabel={{this.setting.setDefaultValuesLabel}}
/>
{{/if}}
2015-03-03 01:12:19 +08:00
</div>
2015-03-03 01:12:19 +08:00
<div class="setting-value">
{{#if this.settingEditButton}}
<DButton
@action={{this.settingEditButton.action}}
@icon={{this.settingEditButton.icon}}
@label={{this.settingEditButton.label}}
class="setting-value-edit-button"
/>
<SiteSettings::Description @description={{this.setting.description}} />
{{else}}
{{component
this.componentName
setting=this.setting
value=this.buffered.value
validationMessage=this.validationMessage
preview=this.preview
isSecret=this.isSecret
allowAny=this.allowAny
changeValueCallback=this.changeValueCallback
}}
{{/if}}
2015-03-03 01:12:19 +08:00
</div>
{{#if this.dirty}}
2015-03-03 01:12:19 +08:00
<div class="setting-controls">
<DButton class="ok" @action={{this.update}} @icon="check" />
<DButton class="cancel" @action={{this.cancel}} @icon="times" />
2015-03-03 01:12:19 +08:00
</div>
{{else if this.overridden}}
{{#if this.setting.secret}}
<DButton @action={{this.toggleSecret}} @icon="far-eye-slash" />
{{/if}}
<DButton
class="btn-default undo"
@action={{this.resetDefault}}
@icon="undo"
@label="admin.settings.reset"
/>
2015-03-03 01:12:19 +08:00
{{/if}}