2017-04-12 22:52:52 +08:00
|
|
|
|
<div class="show-current-style">
|
2018-08-31 03:23:15 +08:00
|
|
|
|
<div class="title">
|
2017-04-12 22:52:52 +08:00
|
|
|
|
{{#if editingName}}
|
|
|
|
|
{{text-field value=model.name autofocus="true"}}
|
2019-01-12 08:41:09 +08:00
|
|
|
|
{{d-button action=(action "finishedEditingName") class="btn-primary submit-edit" icon="check"}}
|
|
|
|
|
{{d-button action=(action "cancelEditingName") class="btn-default cancel-edit" icon="times"}}
|
2017-04-12 22:52:52 +08:00
|
|
|
|
{{else}}
|
2019-01-22 19:02:02 +08:00
|
|
|
|
{{model.name}} <a {{action "startEditingName"}}>{{d-icon "pencil-alt"}}</a>
|
2017-04-12 22:52:52 +08:00
|
|
|
|
{{/if}}
|
2018-08-31 03:23:15 +08:00
|
|
|
|
</div>
|
2017-04-12 22:52:52 +08:00
|
|
|
|
|
2018-10-04 05:03:06 +08:00
|
|
|
|
{{#each model.errors as |error|}}
|
|
|
|
|
<div class="alert alert-error">
|
|
|
|
|
<button class="close" data-dismiss="alert">×</button>
|
|
|
|
|
{{error}}
|
|
|
|
|
</div>
|
|
|
|
|
{{/each}}
|
|
|
|
|
|
2017-04-12 22:52:52 +08:00
|
|
|
|
{{#if model.remote_theme}}
|
2019-01-17 00:09:16 +08:00
|
|
|
|
{{#if model.remote_theme.remote_url}}
|
|
|
|
|
<a class="remote-url" href="{{model.remote_theme.remote_url}}">{{model.remote_theme.remote_url}}</a>
|
|
|
|
|
{{/if}}
|
2018-08-31 03:23:15 +08:00
|
|
|
|
<a class="url about-url" href="{{model.remote_theme.about_url}}">{{i18n "admin.customize.theme.about_theme"}}</a>
|
|
|
|
|
{{#if model.remote_theme.license_url}}
|
|
|
|
|
<a class="url license-url" href="{{model.remote_theme.license_url}}">{{i18n "admin.customize.theme.license"}} {{d-icon "copyright"}}</a>
|
|
|
|
|
{{/if}}
|
2017-04-12 22:52:52 +08:00
|
|
|
|
{{/if}}
|
|
|
|
|
|
2019-01-23 17:20:13 +08:00
|
|
|
|
{{#if model.parentThemes}}
|
2018-08-31 03:23:15 +08:00
|
|
|
|
<div class="control-unit">
|
|
|
|
|
<div class="mini-title">{{i18n "admin.customize.theme.component_of"}}</div>
|
|
|
|
|
<ul>
|
2019-01-23 17:20:13 +08:00
|
|
|
|
{{#each model.parentThemes as |theme|}}
|
2018-08-31 03:23:15 +08:00
|
|
|
|
<li>{{#link-to 'adminCustomizeThemes.show' theme replace=true}}{{theme.name}}{{/link-to}}</li>
|
|
|
|
|
{{/each}}
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
2017-04-12 22:52:52 +08:00
|
|
|
|
{{/if}}
|
|
|
|
|
|
2018-08-24 09:30:00 +08:00
|
|
|
|
{{#unless model.component}}
|
2018-08-31 03:23:15 +08:00
|
|
|
|
<div class="control-unit">
|
2019-01-10 18:06:01 +08:00
|
|
|
|
{{inline-edit-checkbox action=(action "applyDefault") labelKey="admin.customize.theme.is_default" checked=model.default}}
|
|
|
|
|
{{inline-edit-checkbox action=(action "applyUserSelectable") labelKey="admin.customize.theme.user_selectable" checked=model.user_selectable}}
|
2018-08-31 03:23:15 +08:00
|
|
|
|
</div>
|
2018-08-24 09:30:00 +08:00
|
|
|
|
|
2018-08-31 03:23:15 +08:00
|
|
|
|
<div class="control-unit">
|
|
|
|
|
<div class="mini-title">{{i18n "admin.customize.theme.color_scheme"}}</div>
|
|
|
|
|
<div class="description">{{i18n "admin.customize.theme.color_scheme_select"}}</div>
|
|
|
|
|
<div class="control">{{combo-box content=colorSchemes
|
|
|
|
|
filterable=true
|
|
|
|
|
forceEscape=true
|
|
|
|
|
value=colorSchemeId
|
|
|
|
|
icon="paint-brush"}}
|
|
|
|
|
{{#if colorSchemeChanged}}
|
2019-01-12 08:41:09 +08:00
|
|
|
|
{{d-button action=(action "changeScheme") class="btn-primary submit-edit" icon="check"}}
|
|
|
|
|
{{d-button action=(action "cancelChangeScheme") class="btn-default cancel-edit" icon="times"}}
|
2018-08-31 03:23:15 +08:00
|
|
|
|
{{/if}}
|
|
|
|
|
</div>
|
2018-10-25 04:09:36 +08:00
|
|
|
|
{{#link-to 'adminCustomize.colors' class="btn btn-default edit"}}{{i18n 'admin.customize.colors.edit'}}{{/link-to}}
|
2018-08-31 03:23:15 +08:00
|
|
|
|
</div>
|
2018-08-24 09:30:00 +08:00
|
|
|
|
{{/unless}}
|
|
|
|
|
|
2018-08-31 03:23:15 +08:00
|
|
|
|
<div class="control-unit">
|
|
|
|
|
<div class="mini-title">{{i18n "admin.customize.theme.css_html"}}</div>
|
2018-09-07 02:56:00 +08:00
|
|
|
|
{{#if model.hasEditedFields}}
|
2018-08-31 03:23:15 +08:00
|
|
|
|
<div class="description">{{i18n "admin.customize.theme.custom_sections"}}</div>
|
|
|
|
|
<ul>
|
2018-09-07 02:56:00 +08:00
|
|
|
|
{{#each editedFieldsFormatted as |field|}}
|
|
|
|
|
<li>{{field}}</li>
|
2018-08-31 03:23:15 +08:00
|
|
|
|
{{/each}}
|
|
|
|
|
</ul>
|
|
|
|
|
{{else}}
|
|
|
|
|
<div class="description">
|
|
|
|
|
{{i18n "admin.customize.theme.edit_css_html_help"}}
|
|
|
|
|
</div>
|
|
|
|
|
{{/if}}
|
2018-08-24 09:30:00 +08:00
|
|
|
|
|
2019-01-23 22:40:21 +08:00
|
|
|
|
{{#if model.remote_theme.is_git}}
|
2017-04-12 22:52:52 +08:00
|
|
|
|
{{#if model.remote_theme.commits_behind}}
|
2019-01-10 18:06:01 +08:00
|
|
|
|
{{#d-button action=(action "updateToLatest") icon="download" class='btn-primary'}}{{i18n "admin.customize.theme.update_to_latest"}}{{/d-button}}
|
2017-04-12 22:52:52 +08:00
|
|
|
|
{{else}}
|
2019-01-10 18:06:01 +08:00
|
|
|
|
{{#d-button action=(action "checkForThemeUpdates") icon="refresh" class="btn-default"}}{{i18n "admin.customize.theme.check_for_updates"}}{{/d-button}}
|
2017-04-12 22:52:52 +08:00
|
|
|
|
{{/if}}
|
|
|
|
|
{{/if}}
|
2018-08-24 09:30:00 +08:00
|
|
|
|
|
2019-01-10 18:06:01 +08:00
|
|
|
|
{{#d-button action=(action "editTheme") class="btn btn-default edit"}}{{i18n 'admin.customize.theme.edit_css_html'}}{{/d-button}}
|
2019-01-23 22:40:21 +08:00
|
|
|
|
{{#if model.remote_theme.is_git}}
|
2018-03-05 08:04:23 +08:00
|
|
|
|
<span class='status-message'>
|
|
|
|
|
{{#if updatingRemote}}
|
|
|
|
|
{{i18n 'admin.customize.theme.updating'}}
|
2017-04-12 22:52:52 +08:00
|
|
|
|
{{else}}
|
2018-03-05 08:04:23 +08:00
|
|
|
|
{{#if model.remote_theme.commits_behind}}
|
|
|
|
|
{{i18n 'admin.customize.theme.commits_behind' count=model.remote_theme.commits_behind}}
|
2018-08-06 13:29:15 +08:00
|
|
|
|
{{#if model.remote_theme.github_diff_link}}
|
|
|
|
|
<a href="{{model.remote_theme.github_diff_link}}">
|
|
|
|
|
{{i18n 'admin.customize.theme.compare_commits'}}
|
|
|
|
|
</a>
|
|
|
|
|
{{/if}}
|
2018-03-05 08:04:23 +08:00
|
|
|
|
{{else}}
|
2018-09-08 21:24:11 +08:00
|
|
|
|
{{#unless showRemoteError}}
|
|
|
|
|
{{i18n 'admin.customize.theme.up_to_date'}} {{format-date model.remote_theme.updated_at leaveAgo="true"}}
|
|
|
|
|
{{/unless}}
|
2018-03-05 08:04:23 +08:00
|
|
|
|
{{/if}}
|
2017-04-12 22:52:52 +08:00
|
|
|
|
{{/if}}
|
2018-03-05 08:04:23 +08:00
|
|
|
|
</span>
|
2018-09-08 21:24:11 +08:00
|
|
|
|
{{#if showRemoteError}}
|
|
|
|
|
<div class="error-message">
|
|
|
|
|
{{d-icon "exclamation-triangle"}} {{I18n "admin.customize.theme.repo_unreachable"}}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="raw-error">
|
|
|
|
|
<code>{{model.remoteError}}</code>
|
|
|
|
|
</div>
|
|
|
|
|
{{/if}}
|
2019-01-23 22:40:21 +08:00
|
|
|
|
{{else if model.remote_theme}}
|
|
|
|
|
<span class='status-message'>
|
|
|
|
|
{{d-icon "info-circle"}} {{i18n "admin.customize.theme.imported_from_archive"}}
|
|
|
|
|
</span>
|
2017-04-12 22:52:52 +08:00
|
|
|
|
{{/if}}
|
2018-08-31 03:23:15 +08:00
|
|
|
|
</div>
|
2017-05-10 05:20:28 +08:00
|
|
|
|
|
2018-08-31 03:23:15 +08:00
|
|
|
|
<div class="control-unit">
|
|
|
|
|
<div class="mini-title">{{i18n "admin.customize.theme.uploads"}}</div>
|
|
|
|
|
{{#if model.uploads}}
|
|
|
|
|
<ul class='removable-list'>
|
|
|
|
|
{{#each model.uploads as |upload|}}
|
|
|
|
|
<li>
|
|
|
|
|
<span class='col'>${{upload.name}}: <a href={{upload.url}} target='_blank'>{{upload.filename}}</a></span>
|
|
|
|
|
<span class='col'>
|
2019-01-12 08:41:09 +08:00
|
|
|
|
{{d-button action=(action "removeUpload") actionParam=upload class="second btn-default btn-default cancel-edit" icon="times"}}
|
2018-08-31 03:23:15 +08:00
|
|
|
|
</span>
|
|
|
|
|
</li>
|
|
|
|
|
{{/each}}
|
|
|
|
|
</ul>
|
|
|
|
|
{{else}}
|
|
|
|
|
<div class="description">{{i18n "admin.customize.theme.no_uploads"}}</div>
|
|
|
|
|
{{/if}}
|
2019-01-10 18:06:01 +08:00
|
|
|
|
{{#d-button action=(action "addUploadModal") class="btn-default" icon="plus"}}{{i18n "admin.customize.theme.add"}}{{/d-button}}
|
2018-08-31 03:23:15 +08:00
|
|
|
|
</div>
|
2017-05-10 05:20:28 +08:00
|
|
|
|
|
2018-03-05 08:11:21 +08:00
|
|
|
|
{{#if hasSettings}}
|
2018-08-31 03:23:15 +08:00
|
|
|
|
<div class="control-unit">
|
|
|
|
|
<div class="mini-title">{{i18n "admin.customize.theme.theme_settings"}}</div>
|
|
|
|
|
{{#d-section class="form-horizontal theme settings"}}
|
|
|
|
|
{{#each settings as |setting|}}
|
2019-01-17 19:46:11 +08:00
|
|
|
|
{{theme-setting-editor setting=setting model=model class="theme-setting"}}
|
|
|
|
|
{{/each}}
|
|
|
|
|
{{/d-section}}
|
|
|
|
|
</div>
|
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
|
|
{{#if hasTranslations}}
|
|
|
|
|
<div class="control-unit">
|
|
|
|
|
<div class="mini-title">{{i18n "admin.customize.theme.theme_translations"}}</div>
|
|
|
|
|
{{#d-section class="form-horizontal theme settings translations"}}
|
|
|
|
|
{{#each translations as |translation|}}
|
|
|
|
|
{{theme-translation translation=translation model=model class="theme-translation"}}
|
2018-08-31 03:23:15 +08:00
|
|
|
|
{{/each}}
|
|
|
|
|
{{/d-section}}
|
|
|
|
|
</div>
|
2018-03-05 08:11:21 +08:00
|
|
|
|
{{/if}}
|
2018-03-05 08:04:23 +08:00
|
|
|
|
|
2017-04-12 22:52:52 +08:00
|
|
|
|
{{#if availableChildThemes}}
|
2018-08-31 03:23:15 +08:00
|
|
|
|
<div class="control-unit">
|
|
|
|
|
<div class="mini-title">{{i18n "admin.customize.theme.theme_components"}}</div>
|
2018-09-07 02:56:00 +08:00
|
|
|
|
{{#if model.childThemes.length}}
|
|
|
|
|
<ul class='removable-list'>
|
|
|
|
|
{{#each model.childThemes as |child|}}
|
2019-01-12 08:41:09 +08:00
|
|
|
|
<li>{{#link-to 'adminCustomizeThemes.show' child replace=true class='col'}}{{child.name}}{{/link-to}} {{d-button action=(action "removeChildTheme") actionParam=child class="btn-default cancel-edit col" icon="times"}}</li>
|
2018-09-07 02:56:00 +08:00
|
|
|
|
{{/each}}
|
|
|
|
|
</ul>
|
|
|
|
|
{{/if}}
|
2018-08-31 03:23:15 +08:00
|
|
|
|
{{#if selectableChildThemes}}
|
|
|
|
|
<div class="description">
|
2018-09-07 02:56:00 +08:00
|
|
|
|
{{combo-box forceEscape=true filterable=true content=selectableChildThemes value=selectedChildThemeId none="admin.customize.theme.select_component"}}
|
2019-01-10 18:06:01 +08:00
|
|
|
|
{{#d-button action=(action "addChildTheme") icon="plus" disabled=addButtonDisabled class="btn-default add-component-button"}}{{i18n "admin.customize.theme.add"}}{{/d-button}}
|
2018-08-31 03:23:15 +08:00
|
|
|
|
</div>
|
|
|
|
|
{{/if}}
|
|
|
|
|
</div>
|
2017-04-12 22:52:52 +08:00
|
|
|
|
{{/if}}
|
|
|
|
|
|
2018-10-25 04:09:36 +08:00
|
|
|
|
<a href='{{previewUrl}}' title="{{i18n 'admin.customize.explain_preview'}}" target='_blank' class='btn btn-default'>{{d-icon 'desktop'}}{{i18n 'admin.customize.theme.preview'}}</a>
|
|
|
|
|
<a class="btn btn-default export" target="_blank" href={{downloadUrl}}>{{d-icon "download"}} {{i18n 'admin.export_json.button_text'}}</a>
|
2017-04-12 22:52:52 +08:00
|
|
|
|
|
2019-01-10 18:06:01 +08:00
|
|
|
|
{{d-button action=(action "switchType") label="admin.customize.theme.convert" icon=convertIcon class="btn-default btn-normal" title=convertTooltip}}
|
2019-01-22 19:02:02 +08:00
|
|
|
|
{{d-button action=(action "destroy") label="admin.customize.delete" icon="trash-alt" class="btn-danger"}}
|
2017-04-12 22:52:52 +08:00
|
|
|
|
</div>
|