2019-02-19 07:56:01 -05:00
|
|
|
<div class="edit-main-nav admin-controls">
|
|
|
|
<nav>
|
|
|
|
<ul class="nav nav-pills target">
|
|
|
|
{{#each visibleTargets as |target|}}
|
|
|
|
<li>
|
|
|
|
{{#link-to editRouteName
|
2020-02-11 09:55:16 -05:00
|
|
|
theme.id
|
|
|
|
target.name
|
|
|
|
fieldName
|
|
|
|
replace=true
|
|
|
|
title=field.title
|
2019-02-19 15:02:29 -05:00
|
|
|
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)}}
|
|
|
|
{{/link-to}}
|
|
|
|
</li>
|
|
|
|
{{/each}}
|
2020-02-11 09:55:16 -05:00
|
|
|
|
2019-02-19 17:25:00 -05:00
|
|
|
{{#if allowAdvanced}}
|
2019-02-19 07:56:01 -05:00
|
|
|
<li>
|
2020-02-11 09:55:16 -05:00
|
|
|
<a {{action "toggleShowAdvanced"}}
|
|
|
|
href
|
2020-03-07 06:58:48 -05:00
|
|
|
title={{i18n (concat "admin.customize.theme." (if showAdvanced "hide_advanced" "show_advanced"))}}
|
|
|
|
class="no-text">
|
2020-02-11 09:55:16 -05:00
|
|
|
{{d-icon (if 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>
|
|
|
|
{{input type="checkbox" checked=onlyOverridden click=(action "onlyOverriddenChanged" value="target.checked")}}
|
|
|
|
{{i18n "admin.customize.theme.hide_unused_fields"}}
|
|
|
|
</label>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="admin-controls">
|
|
|
|
<nav>
|
|
|
|
<ul class="nav nav-pills fields">
|
|
|
|
{{#each visibleFields as |field|}}
|
|
|
|
<li>
|
|
|
|
{{#link-to editRouteName
|
2020-02-11 09:55:16 -05:00
|
|
|
theme.id
|
|
|
|
currentTargetName
|
|
|
|
field.name
|
|
|
|
replace=true
|
|
|
|
title=field.title
|
2019-02-19 07:56:01 -05:00
|
|
|
class=(if field.edited "edited" "blank")
|
|
|
|
}}
|
|
|
|
{{#if field.error}}{{d-icon "exclamation-triangle"}}{{/if}}
|
|
|
|
{{#if field.icon}}{{d-icon field.icon}}{{/if}}
|
|
|
|
{{field.translatedName}}
|
|
|
|
{{/link-to}}
|
|
|
|
</li>
|
|
|
|
{{/each}}
|
|
|
|
|
|
|
|
{{#if showAddField}}
|
|
|
|
<li>
|
|
|
|
{{#if addingField}}
|
2020-02-11 09:55:16 -05:00
|
|
|
{{input type=text value=newFieldName enter=(action "addField") escape-press=(action "cancelAddField")}}
|
|
|
|
{{d-button class="ok" action=(action "addField" newFieldName) icon="check"}}
|
2019-02-19 07:56:01 -05:00
|
|
|
{{d-button class="cancel" action=(action "cancelAddField") icon="times"}}
|
|
|
|
{{else}}
|
2020-02-11 09:55:16 -05:00
|
|
|
<a href {{action "toggleAddField" 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>
|
2020-02-11 09:55:16 -05:00
|
|
|
<a href {{action "toggleMaximize"}} class="no-text">
|
|
|
|
{{d-icon maximizeIcon}}
|
2019-02-19 07:56:01 -05:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{#if error}}
|
|
|
|
<pre class="field-error">{{error}}</pre>
|
|
|
|
{{/if}}
|
|
|
|
|
2021-05-11 09:01:06 -04:00
|
|
|
{{#if warning}}
|
|
|
|
<pre class="field-warning">{{html-safe warning}}</pre>
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
{{ace-editor
|
|
|
|
content=activeSection
|
|
|
|
editorId=editorId
|
|
|
|
mode=activeSectionMode
|
|
|
|
autofocus="true"
|
|
|
|
placeholder=placeholder
|
|
|
|
htmlPlaceholder=true
|
|
|
|
save=(action "save")
|
|
|
|
setWarning=(action "setWarning")
|
|
|
|
}}
|