mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
ENHANCEMENT Allow subclass of CMSMain to view the SwitchView context for staging/published site links
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@56816 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
a75fadda1b
commit
3015bea8dc
@ -100,6 +100,16 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
Requirements::javascript('gallery/javascript/GalleryPage_CMS.js');
|
||||
}
|
||||
|
||||
/**
|
||||
* If this is set to true, the "switchView" context in the
|
||||
* template is shown, with links to the staging and publish site.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
function ShowSwitchView() {
|
||||
return true;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------//
|
||||
// Main controllers
|
||||
|
||||
|
@ -52,7 +52,7 @@
|
||||
</div>
|
||||
|
||||
<div id="switchView" class="bottomTabs">
|
||||
<% if class = CMSMain %>
|
||||
<% if ShowSwitchView %>
|
||||
<div class="blank"> <% _t('VIEWPAGEIN','Page view:') %> </div>
|
||||
<span class="current" title="<% _t('EDITINCMS', 'Edit this page in the CMS') %>"><% _t('EDIT','Edit') %></span>
|
||||
| <a id="viewStageSite" title="<% _t('VIEWINDRAFT', 'View the Page in the Draft Site') %>" href="home/?stage=Stage"><% _t('DRAFTS','Draft Site') %></a>
|
||||
|
Loading…
Reference in New Issue
Block a user