ENHANCEMENT: open/7886 added preview button to the settings page so that when a user changes the theme they can preview the change.

This commit is contained in:
Jeremy Bridson 2012-10-05 16:26:41 +13:00
parent 5768e421dc
commit ad7383a58d
2 changed files with 6 additions and 1 deletions

View File

@ -124,7 +124,7 @@
canPreview: function() {
var contentEl = this.getLayoutContainer().find('.cms-content');
// Only load if we're in the "edit page" view
var blockedClasses = ['CMSPagesController', 'CMSSettingsController', 'CMSPageHistoryController'];
var blockedClasses = ['CMSPagesController', 'CMSPageHistoryController'];
return !(contentEl.is('.' + blockedClasses.join(',.')));
},

View File

@ -0,0 +1,5 @@
<div class="cms-navigator">
<a href="#" class="ss-ui-button cms-preview-toggle-link" data-icon="preview">
&laquo; <% _t('SilverStripeNavigator.Edit', 'Edit') %>
</a>
</div>