discourse/app/assets/javascripts/admin/templates/customize.js.handlebars

71 lines
2.6 KiB
Handlebars
Raw Normal View History

2013-02-06 03:16:51 +08:00
<div class='content-list span6'>
<h3>{{i18n admin.customize.long_title}}</h3>
<ul>
{{#each model}}
<li><a {{action selectStyle this}} {{bindAttr class="this.selected:active"}}>{{this.description}}</a></li>
2013-02-06 03:16:51 +08:00
{{/each}}
</ul>
<button {{action newCustomization}} class='btn'>{{i18n admin.customize.new}}</button>
2013-02-06 03:16:51 +08:00
</div>
{{#if selectedItem}}
2013-04-10 09:54:51 +08:00
<div class='current-style'>
{{#with selectedItem}}
{{textField class="style-name" value=name}}
<div class='admin-controls'>
<ul class="nav nav-pills">
<li {{bindAttr class="view.stylesheetActive:active"}}>
<a {{action selectStylesheet href="true" target="view"}}>{{i18n admin.customize.css}}</a>
</li>
<li {{bindAttr class="view.headerActive:active"}}>
<a {{action selectHeader href="true" target="view"}}>{{i18n admin.customize.header}}</a>
</li>
<li {{bindAttr class="view.mobileStylesheetActive:active"}}>
<a {{action selectMobileStylesheet href="true" target="view"}}>{{i18n admin.customize.mobile_css}}</a>
</li>
<li {{bindAttr class="view.mobileHeaderActive:active"}}>
<a {{action selectMobileHeader href="true" target="view"}}>{{i18n admin.customize.mobile_header}}</a>
</li>
</ul>
</div>
2013-02-06 03:16:51 +08:00
{{#if view.headerActive}}
{{aceEditor content=header mode="html"}}
2013-02-06 03:16:51 +08:00
{{/if}}
{{#if view.stylesheetActive}}
2013-06-19 13:18:22 +08:00
{{aceEditor content=stylesheet mode="scss"}}
{{/if}}
{{#if view.mobileHeaderActive}}
{{aceEditor content=mobile_header mode="html"}}
{{/if}}
{{#if view.mobileStylesheetActive}}
{{aceEditor content=mobile_stylesheet mode="scss"}}
2013-02-06 03:16:51 +08:00
{{/if}}
{{/with}}
<br>
<div class='status-actions'>
<span>{{i18n admin.customize.override_default}} {{view Ember.Checkbox checkedBinding="selectedItem.override_default_style"}}</span>
<span>{{i18n admin.customize.enabled}} {{view Ember.Checkbox checkedBinding="selectedItem.enabled"}}</span>
{{#unless selectedItem.changed}}
<a class='preview-link' {{bindAttr href="selectedItem.previewUrl"}} target='_blank'>{{i18n admin.customize.preview}}</a>
2013-04-10 09:54:51 +08:00
|
2013-02-06 03:16:51 +08:00
<a href="/?preview-style=" target='_blank'>{{i18n admin.customize.undo_preview}}</a><br>
{{/unless}}
</div>
<div class='buttons'>
<button {{action save}} {{bindAttr disabled="selectedItem.disableSave"}} class='btn'>{{i18n admin.customize.save}}</button>
<span class='saving'>{{selectedItem.savingStatus}}</span>
<a {{action destroy}} class='delete-link'>{{i18n admin.customize.delete}}</a>
2013-02-06 03:16:51 +08:00
</div>
</div>
{{else}}
<p class="about">{{i18n admin.customize.about}}</p>
2013-02-06 03:16:51 +08:00
{{/if}}
<div class='clearfix'></div>