2017-04-12 10:52:52 -04:00
|
|
|
<div class="show-current-style">
|
|
|
|
<h2>
|
|
|
|
{{#if editingName}}
|
|
|
|
{{text-field value=model.name autofocus="true"}}
|
|
|
|
{{d-button action="finishedEditingName" class="btn-primary btn-small submit-edit" icon="check"}}
|
|
|
|
{{d-button action="cancelEditingName" class="btn-small cancel-edit" icon="times"}}
|
|
|
|
{{else}}
|
2017-07-26 16:25:09 -04:00
|
|
|
{{model.name}} <a {{action "startEditingName"}}>{{d-icon "pencil"}}</a>
|
2017-04-12 10:52:52 -04:00
|
|
|
{{/if}}
|
|
|
|
</h2>
|
|
|
|
|
|
|
|
{{#if model.remote_theme}}
|
|
|
|
<p>
|
|
|
|
<a href="{{model.remote_theme.about_url}}">{{i18n "admin.customize.theme.about_theme"}}</a>
|
|
|
|
</p>
|
|
|
|
{{#if model.remote_theme.license_url}}
|
|
|
|
<p>
|
2017-07-26 16:25:09 -04:00
|
|
|
<a href="{{model.remote_theme.license_url}}">{{i18n "admin.customize.theme.license"}} {{d-icon "copyright"}}</a>
|
2017-04-12 10:52:52 -04:00
|
|
|
</p>
|
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
|
2017-04-17 15:56:13 -04:00
|
|
|
{{#if parentThemes}}
|
|
|
|
<h3>{{i18n "admin.customize.theme.component_of"}}</h3>
|
|
|
|
<ul>
|
|
|
|
{{#each parentThemes as |theme|}}
|
|
|
|
<li>{{#link-to 'adminCustomizeThemes.show' theme replace=true}}{{theme.name}}{{/link-to}}</li>
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
|
|
|
{{else}}
|
2017-04-12 10:52:52 -04:00
|
|
|
<p>
|
|
|
|
{{inline-edit-checkbox action="applyDefault" labelKey="admin.customize.theme.is_default" checked=model.default}}
|
|
|
|
{{inline-edit-checkbox action="applyUserSelectable" labelKey="admin.customize.theme.user_selectable" checked=model.user_selectable}}
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<h3>{{i18n "admin.customize.theme.color_scheme"}}</h3>
|
|
|
|
<p>{{i18n "admin.customize.theme.color_scheme_select"}}</p>
|
2017-08-24 10:04:47 -04:00
|
|
|
<p>{{select-box content=colorSchemes
|
|
|
|
textKey="name"
|
|
|
|
filterable=true
|
|
|
|
value=colorSchemeId
|
|
|
|
icon="paint-brush"}}
|
2017-04-12 10:52:52 -04:00
|
|
|
{{#if colorSchemeChanged}}
|
|
|
|
{{d-button action="changeScheme" class="btn-primary btn-small submit-edit" icon="check"}}
|
|
|
|
{{d-button action="cancelChangeScheme" class="btn-small cancel-edit" icon="times"}}
|
|
|
|
{{/if}}
|
|
|
|
</p>
|
|
|
|
{{#link-to 'adminCustomize.colors' class="btn edit"}}{{i18n 'admin.customize.colors.edit'}}{{/link-to}}
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
<h3>{{i18n "admin.customize.theme.css_html"}}</h3>
|
|
|
|
{{#if hasEditedFields}}
|
|
|
|
<p>{{i18n "admin.customize.theme.custom_sections"}}</p>
|
|
|
|
<ul>
|
|
|
|
{{#each editedDescriptions as |desc|}}
|
|
|
|
<li>{{desc}}</li>
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
|
|
|
{{else}}
|
|
|
|
<p>
|
|
|
|
{{i18n "admin.customize.theme.edit_css_html_help"}}
|
|
|
|
</p>
|
|
|
|
{{/if}}
|
|
|
|
<p>
|
|
|
|
{{#if model.remote_theme}}
|
|
|
|
{{#if model.remote_theme.commits_behind}}
|
2017-04-17 16:55:53 -04:00
|
|
|
{{#d-button action="updateToLatest" icon="download" class='btn-primary'}}{{i18n "admin.customize.theme.update_to_latest"}}{{/d-button}}
|
2017-04-12 10:52:52 -04:00
|
|
|
{{else}}
|
|
|
|
{{#d-button action="checkForThemeUpdates" icon="refresh"}}{{i18n "admin.customize.theme.check_for_updates"}}{{/d-button}}
|
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
|
|
|
{{#d-button action="editTheme" class="btn edit"}}{{i18n 'admin.customize.theme.edit_css_html'}}{{/d-button}}
|
|
|
|
{{#if model.remote_theme}}
|
|
|
|
<span class='status-message'>
|
|
|
|
{{#if updatingRemote}}
|
|
|
|
{{i18n 'admin.customize.theme.updating'}}
|
|
|
|
{{else}}
|
|
|
|
{{#if model.remote_theme.commits_behind}}
|
|
|
|
{{i18n 'admin.customize.theme.commits_behind' count=model.remote_theme.commits_behind}}
|
|
|
|
{{else}}
|
|
|
|
{{i18n 'admin.customize.theme.up_to_date'}} {{format-date model.remote_theme.updated_at leaveAgo="true"}}
|
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
|
|
|
</span>
|
|
|
|
{{/if}}
|
|
|
|
</p>
|
|
|
|
|
2017-05-09 17:20:28 -04:00
|
|
|
|
|
|
|
<h3>{{i18n "admin.customize.theme.uploads"}}</h3>
|
|
|
|
{{#if model.uploads}}
|
|
|
|
<ul class='removable-list'>
|
|
|
|
{{#each model.uploads as |upload|}}
|
2017-05-10 14:43:05 -04:00
|
|
|
<li>
|
|
|
|
<span class='col'>${{upload.name}}: <a href={{upload.url}} target='_blank'>{{upload.filename}}</a></span>
|
|
|
|
<span class='col'>
|
|
|
|
{{d-button action="removeUpload" actionParam=upload class="second btn-small cancel-edit" icon="times"}}
|
|
|
|
</span>
|
|
|
|
</li>
|
2017-05-09 17:20:28 -04:00
|
|
|
{{/each}}
|
|
|
|
</ul>
|
|
|
|
{{else}}
|
|
|
|
<p>{{i18n "admin.customize.theme.no_uploads"}}</p>
|
|
|
|
{{/if}}
|
|
|
|
<p>
|
|
|
|
{{#d-button action="addUploadModal" icon="plus"}}{{i18n "admin.customize.theme.add"}}{{/d-button}}
|
|
|
|
</p>
|
|
|
|
|
2017-04-12 10:52:52 -04:00
|
|
|
{{#if availableChildThemes}}
|
2017-04-17 15:56:13 -04:00
|
|
|
<h3>{{i18n "admin.customize.theme.theme_components"}}</h3>
|
2017-04-12 10:52:52 -04:00
|
|
|
{{#unless model.childThemes.length}}
|
|
|
|
<p>
|
|
|
|
<label class='checkbox-label'>
|
|
|
|
{{input type="checkbox" checked=allowChildThemes}}
|
|
|
|
{{i18n "admin.customize.theme.child_themes_check"}}
|
|
|
|
</label>
|
|
|
|
</p>
|
|
|
|
{{else}}
|
2017-05-09 17:20:28 -04:00
|
|
|
<ul class='removable-list'>
|
2017-04-12 10:52:52 -04:00
|
|
|
{{#each model.childThemes as |child|}}
|
2017-05-10 14:43:05 -04:00
|
|
|
<li>{{#link-to 'adminCustomizeThemes.show' child replace=true class='col'}}{{child.name}}{{/link-to}} {{d-button action="removeChildTheme" actionParam=child class="btn-small cancel-edit col" icon="times"}}</li>
|
2017-04-12 10:52:52 -04:00
|
|
|
{{/each}}
|
|
|
|
</ul>
|
|
|
|
{{/unless}}
|
|
|
|
{{#if selectableChildThemes}}
|
|
|
|
<p>{{combo-box content=selectableChildThemes
|
|
|
|
nameProperty="name"
|
|
|
|
value=selectedChildThemeId
|
|
|
|
valueAttribute="id"}}
|
|
|
|
|
|
|
|
{{#d-button action="addChildTheme" icon="plus"}}{{i18n "admin.customize.theme.add"}}{{/d-button}}
|
|
|
|
</p>
|
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
|
|
|
|
2017-07-26 16:25:09 -04:00
|
|
|
<a href='{{previewUrl}}' title="{{i18n 'admin.customize.explain_preview'}}" target='_blank' class='btn'>{{d-icon 'desktop'}}{{i18n 'admin.customize.theme.preview'}}</a>
|
|
|
|
<a class="btn export" target="_blank" href={{downloadUrl}}>{{d-icon "download"}} {{i18n 'admin.export_json.button_text'}}</a>
|
2017-04-12 10:52:52 -04:00
|
|
|
|
|
|
|
{{d-button action="destroy" label="admin.customize.delete" icon="trash" class="btn-danger"}}
|
|
|
|
</div>
|