2019-02-19 07:56:01 -05:00
|
|
|
<div class="edit-main-nav admin-controls">
|
|
|
|
<nav>
|
|
|
|
<ul class="nav nav-pills target">
|
2022-07-05 13:41:31 -04:00
|
|
|
{{#each this.visibleTargets as |target|}}
|
2019-02-19 07:56:01 -05:00
|
|
|
<li>
|
2022-07-06 04:37:54 -04:00
|
|
|
<LinkTo @route={{this.editRouteName}} @models={{array this.theme.id target.name this.fieldName}} @replace={{true}} title={{this.field.title}} class={{if target.edited "edited" "blank"}}>
|
2019-02-19 07:56:01 -05:00
|
|
|
{{#if target.error}}{{d-icon "exclamation-triangle"}}{{/if}}
|
|
|
|
{{#if target.icon}}{{d-icon target.icon}}{{/if}}
|
|
|
|
{{i18n (concat "admin.customize.theme." target.name)}}
|
2022-06-30 06:30:50 -04:00
|
|
|
</LinkTo>
|
2019-02-19 07:56:01 -05:00
|
|
|
</li>
|
|
|
|
{{/each}}
|
2020-02-11 09:55:16 -05:00
|
|
|
|
2022-07-05 13:41:31 -04:00
|
|
|
{{#if this.allowAdvanced}}
|
2019-02-19 07:56:01 -05:00
|
|
|
<li>
|
2022-10-04 07:27:26 -04:00
|
|
|
<a {{action "toggleShowAdvanced"}}
|
2020-02-11 09:55:16 -05:00
|
|
|
href
|
2022-07-05 13:41:31 -04:00
|
|
|
title={{i18n (concat "admin.customize.theme." (if this.showAdvanced "hide_advanced" "show_advanced"))}}
|
2020-03-07 06:58:48 -05:00
|
|
|
class="no-text">
|
2022-07-05 13:41:31 -04:00
|
|
|
{{d-icon (if this.showAdvanced "angle-double-left" "angle-double-right")}}
|
2019-02-19 17:25:00 -05:00
|
|
|
</a>
|
2019-02-19 07:56:01 -05:00
|
|
|
</li>
|
2019-02-19 17:25:00 -05:00
|
|
|
{{/if}}
|
2019-02-19 07:56:01 -05:00
|
|
|
<li class="spacer"></li>
|
|
|
|
<li>
|
|
|
|
<label>
|
2022-07-06 04:37:54 -04:00
|
|
|
<Input @type="checkbox" @checked={{this.onlyOverridden}} {{on "click" (action "onlyOverriddenChanged" value="target.checked")}} />
|
2019-02-19 07:56:01 -05:00
|
|
|
{{i18n "admin.customize.theme.hide_unused_fields"}}
|
|
|
|
</label>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="admin-controls">
|
|
|
|
<nav>
|
|
|
|
<ul class="nav nav-pills fields">
|
2022-07-05 13:41:31 -04:00
|
|
|
{{#each this.visibleFields as |field|}}
|
2019-02-19 07:56:01 -05:00
|
|
|
<li>
|
2022-07-06 04:37:54 -04:00
|
|
|
<LinkTo @route={{this.editRouteName}} @models={{array this.theme.id this.currentTargetName field.name}} @replace={{true}} title={{field.title}} class={{if field.edited "edited" "blank"}}>
|
2019-02-19 07:56:01 -05:00
|
|
|
{{#if field.error}}{{d-icon "exclamation-triangle"}}{{/if}}
|
|
|
|
{{#if field.icon}}{{d-icon field.icon}}{{/if}}
|
|
|
|
{{field.translatedName}}
|
2022-06-30 06:30:50 -04:00
|
|
|
</LinkTo>
|
2019-02-19 07:56:01 -05:00
|
|
|
</li>
|
|
|
|
{{/each}}
|
|
|
|
|
2022-07-05 13:41:31 -04:00
|
|
|
{{#if this.showAddField}}
|
2019-02-19 07:56:01 -05:00
|
|
|
<li>
|
2022-07-05 13:41:31 -04:00
|
|
|
{{#if this.addingField}}
|
|
|
|
<Input @type={{this.text}} @value={{this.newFieldName}} @enter={{action "addField"}} @escape-press={{action "cancelAddField"}} />
|
|
|
|
<DButton @class="ok" @action={{action "addField" this.newFieldName}} @icon="check" />
|
2022-06-30 06:30:50 -04:00
|
|
|
<DButton @class="cancel" @action={{action "cancelAddField"}} @icon="times" />
|
2019-02-19 07:56:01 -05:00
|
|
|
{{else}}
|
2022-10-04 07:27:26 -04:00
|
|
|
<a href {{action "toggleAddField" this.currentTargetName}} class="no-text">
|
2019-02-19 07:56:01 -05:00
|
|
|
{{d-icon "plus"}}
|
|
|
|
</a>
|
|
|
|
{{/if}}
|
|
|
|
</li>
|
|
|
|
{{/if}}
|
2020-04-13 11:17:20 -04:00
|
|
|
|
2019-02-19 07:56:01 -05:00
|
|
|
<li class="spacer"></li>
|
|
|
|
<li>
|
2022-10-04 07:27:26 -04:00
|
|
|
<a href {{action "toggleMaximize"}} class="no-text">
|
2022-07-05 13:41:31 -04:00
|
|
|
{{d-icon this.maximizeIcon}}
|
2019-02-19 07:56:01 -05:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
|
2022-07-05 13:41:31 -04:00
|
|
|
{{#if this.error}}
|
|
|
|
<pre class="field-error">{{this.error}}</pre>
|
2019-02-19 07:56:01 -05:00
|
|
|
{{/if}}
|
|
|
|
|
2022-07-05 13:41:31 -04:00
|
|
|
{{#if this.warning}}
|
|
|
|
<pre class="field-warning">{{html-safe this.warning}}</pre>
|
2021-05-11 09:01:06 -04:00
|
|
|
{{/if}}
|
|
|
|
|
2022-07-05 13:41:31 -04:00
|
|
|
<AceEditor @content={{this.activeSection}} @editorId={{this.editorId}} @mode={{this.activeSectionMode}} @autofocus="true" @placeholder={{this.placeholder}} @htmlPlaceholder={{true}} @save={{action "save"}} @setWarning={{action "setWarning"}} />
|