From 4fd757341aa7bb2d44b9f0b76ba19a132f7d61bd Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Wed, 18 Apr 2012 22:59:31 +0200 Subject: [PATCH] MINOR Consistent link method names: LeftAndMain->PreviewLink() changed to LinkPreview() --- code/controllers/CMSMain.php | 2 +- code/controllers/CMSPagesController.php | 2 +- code/controllers/CMSSettingsController.php | 2 +- templates/Includes/AssetAdmin_EditForm.ss | 4 ++-- templates/Includes/CMSMain_EditForm.ss | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/code/controllers/CMSMain.php b/code/controllers/CMSMain.php index 6ee8efa0..804c489a 100644 --- a/code/controllers/CMSMain.php +++ b/code/controllers/CMSMain.php @@ -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; diff --git a/code/controllers/CMSPagesController.php b/code/controllers/CMSPagesController.php index 1cdfdb88..62180d60 100644 --- a/code/controllers/CMSPagesController.php +++ b/code/controllers/CMSPagesController.php @@ -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; } diff --git a/code/controllers/CMSSettingsController.php b/code/controllers/CMSSettingsController.php index b0ab5519..94d807f1 100644 --- a/code/controllers/CMSSettingsController.php +++ b/code/controllers/CMSSettingsController.php @@ -50,7 +50,7 @@ class CMSSettingsController extends CMSMain { return $form->forTemplate(); } - function PreviewLink() { + function LinkPreview() { return false; } diff --git a/templates/Includes/AssetAdmin_EditForm.ss b/templates/Includes/AssetAdmin_EditForm.ss index 9f562bb3..e72225d4 100644 --- a/templates/Includes/AssetAdmin_EditForm.ss +++ b/templates/Includes/AssetAdmin_EditForm.ss @@ -19,8 +19,8 @@ <% control Actions %> $Field <% end_control %> - <% if CurrentPage.PreviewLink %> - + <% if CurrentPage.LinkPreview %> + <% _t('LeftAndMain.PreviewButton', 'Preview') %> » <% end_if %> diff --git a/templates/Includes/CMSMain_EditForm.ss b/templates/Includes/CMSMain_EditForm.ss index f1d5b774..bfebbe1f 100644 --- a/templates/Includes/CMSMain_EditForm.ss +++ b/templates/Includes/CMSMain_EditForm.ss @@ -22,8 +22,8 @@ <% control Actions %> $Field <% end_control %> - <% if Controller.PreviewLink %> - + <% if Controller.LinkPreview %> + <% _t('LeftAndMain.PreviewButton', 'Preview') %> » <% end_if %>