discourse/app/assets/javascripts/admin/addon/templates/components/site-setting.hbs
David Taylor c62f082754
UX: Only link the icon for site setting history (#11265)
Linking the whole site setting name makes it tricky to copy/paste the name, which is common when asking/answering support queries.
2020-11-17 15:59:55 +00:00

32 lines
1.1 KiB
Handlebars

<div class="setting-label">
<h3>
{{#if staffLogFilter}}
{{settingName}}
{{#link-to "adminLogs.staffActionLogs" (query-params filters=staffLogFilter) title=(i18n "admin.settings.history")}}
<span class="history-icon">
{{d-icon "history"}}
</span>
{{/link-to}}
{{else}}
{{settingName}}
{{/if}}
</h3>
{{#if defaultIsAvailable}}
<a href onClick={{action "setDefaultValues"}}>{{setting.setDefaultValuesLabel}}</a>
{{/if}}
</div>
<div class="setting-value">
{{component componentName setting=setting value=buffered.value validationMessage=validationMessage preview=preview isSecret=isSecret allowAny=allowAny}}
</div>
{{#if dirty}}
<div class="setting-controls">
{{d-button class="ok" action=(action "update") icon="check"}}
{{d-button class="cancel" action=(action "cancel") icon="times"}}
</div>
{{else if setting.overridden}}
{{#if setting.secret}}
{{d-button action=(action "toggleSecret") icon="far-eye-slash"}}
{{/if}}
{{d-button class="btn-default undo" action=(action "resetDefault") icon="undo" label="admin.settings.reset"}}
{{/if}}