2019-02-19 20:56:01 +08: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 22:55:16 +08:00
|
|
|
theme.id
|
|
|
|
target.name
|
|
|
|
fieldName
|
|
|
|
replace=true
|
|
|
|
title=field.title
|
2019-02-20 04:02:29 +08:00
|
|
|
class=(if target.edited 'edited' 'blank')
|
2019-02-19 20:56:01 +08: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 22:55:16 +08:00
|
|
|
|
2019-02-20 06:25:00 +08:00
|
|
|
{{#if allowAdvanced}}
|
2019-02-19 20:56:01 +08:00
|
|
|
<li>
|
2020-02-11 22:55:16 +08:00
|
|
|
<a {{action "toggleShowAdvanced"}}
|
|
|
|
class='no-text'
|
|
|
|
href
|
2019-02-20 06:25:00 +08:00
|
|
|
title="{{i18n (concat "admin.customize.theme." (if showAdvanced "hide_advanced" "show_advanced"))}}"
|
|
|
|
>
|
2020-02-11 22:55:16 +08:00
|
|
|
{{d-icon (if showAdvanced "angle-double-left" "angle-double-right")}}
|
2019-02-20 06:25:00 +08:00
|
|
|
</a>
|
2019-02-19 20:56:01 +08:00
|
|
|
</li>
|
2019-02-20 06:25:00 +08:00
|
|
|
{{/if}}
|
|
|
|
|
2019-02-19 20:56:01 +08: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 22:55:16 +08:00
|
|
|
theme.id
|
|
|
|
currentTargetName
|
|
|
|
field.name
|
|
|
|
replace=true
|
|
|
|
title=field.title
|
2019-02-19 20:56:01 +08: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}}
|
2020-02-11 22:55:16 +08:00
|
|
|
|
2019-02-19 20:56:01 +08:00
|
|
|
{{/link-to}}
|
|
|
|
</li>
|
|
|
|
{{/each}}
|
|
|
|
|
|
|
|
{{#if showAddField}}
|
|
|
|
<li>
|
|
|
|
{{#if addingField}}
|
2020-02-11 22:55:16 +08: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 20:56:01 +08:00
|
|
|
{{d-button class="cancel" action=(action "cancelAddField") icon="times"}}
|
|
|
|
{{else}}
|
2020-02-11 22:55:16 +08:00
|
|
|
<a href {{action "toggleAddField" currentTargetName}} class="no-text">
|
2019-02-19 20:56:01 +08:00
|
|
|
{{d-icon "plus"}}
|
|
|
|
</a>
|
|
|
|
{{/if}}
|
|
|
|
</li>
|
|
|
|
{{/if}}
|
|
|
|
<li class='spacer'></li>
|
|
|
|
<li>
|
2020-02-11 22:55:16 +08:00
|
|
|
<a href {{action "toggleMaximize"}} class="no-text">
|
|
|
|
{{d-icon maximizeIcon}}
|
2019-02-19 20:56:01 +08:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
{{#if error}}
|
|
|
|
<pre class='field-error'>{{error}}</pre>
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
{{ace-editor content=activeSection editorId=editorId mode=activeSectionMode autofocus="true"}}
|