mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
MINOR Consistent link method names: LeftAndMain->PreviewLink() changed to LinkPreview()
This commit is contained in:
parent
e5000dd330
commit
4fd757341a
@ -200,7 +200,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function PreviewLink() {
|
||||
public function LinkPreview() {
|
||||
$record = $this->getRecord($this->currentPageID());
|
||||
$baseLink = ($record && $record instanceof Page) ? $record->Link('?stage=Stage') : Director::absoluteBaseURL();
|
||||
return $baseLink;
|
||||
|
@ -11,7 +11,7 @@ class CMSPagesController extends CMSMain {
|
||||
static $menu_title = 'Pages';
|
||||
static $required_permission_codes = 'CMS_ACCESS_CMSMain';
|
||||
|
||||
function PreviewLink() {
|
||||
function LinkPreview() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ class CMSSettingsController extends CMSMain {
|
||||
return $form->forTemplate();
|
||||
}
|
||||
|
||||
function PreviewLink() {
|
||||
function LinkPreview() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -19,8 +19,8 @@
|
||||
<% control Actions %>
|
||||
$Field
|
||||
<% end_control %>
|
||||
<% if CurrentPage.PreviewLink %>
|
||||
<a href="$CurrentPage.PreviewLink" class="cms-preview-toggle-link ss-ui-button" data-icon="preview">
|
||||
<% if CurrentPage.LinkPreview %>
|
||||
<a href="$CurrentPage.LinkPreview" class="cms-preview-toggle-link ss-ui-button" data-icon="preview">
|
||||
<% _t('LeftAndMain.PreviewButton', 'Preview') %> »
|
||||
</a>
|
||||
<% end_if %>
|
||||
|
@ -22,8 +22,8 @@
|
||||
<% control Actions %>
|
||||
$Field
|
||||
<% end_control %>
|
||||
<% if Controller.PreviewLink %>
|
||||
<a href="$Controller.PreviewLink" class="cms-preview-toggle-link ss-ui-button" data-icon="preview">
|
||||
<% if Controller.LinkPreview %>
|
||||
<a href="$Controller.LinkPreview" class="cms-preview-toggle-link ss-ui-button" data-icon="preview">
|
||||
<% _t('LeftAndMain.PreviewButton', 'Preview') %> »
|
||||
</a>
|
||||
<% end_if %>
|
||||
|
Loading…
Reference in New Issue
Block a user