Skip to content
This repository
Browse code

MINOR Consistent link method names: LeftAndMain->PreviewLink() change…

…d to LinkPreview()
  • Loading branch information...
commit 4fd757341aa7bb2d44b9f0b76ba19a132f7d61bd 1 parent e5000dd
Ingo Schommer authored April 18, 2012
2  code/controllers/CMSMain.php
@@ -200,7 +200,7 @@ function LinkPageAdd() {
200 200
 	/**
201 201
 	 * @return string
202 202
 	 */
203  
-	public function PreviewLink() {
  203
+	public function LinkPreview() {
204 204
 		$record = $this->getRecord($this->currentPageID());
205 205
 		$baseLink = ($record && $record instanceof Page) ? $record->Link('?stage=Stage') : Director::absoluteBaseURL();
206 206
 		return $baseLink;
2  code/controllers/CMSPagesController.php
@@ -11,7 +11,7 @@ class CMSPagesController extends CMSMain {
11 11
 	static $menu_title = 'Pages';	
12 12
 	static $required_permission_codes = 'CMS_ACCESS_CMSMain';
13 13
 
14  
-	function PreviewLink() {
  14
+	function LinkPreview() {
15 15
 		return false;
16 16
 	}
17 17
 
2  code/controllers/CMSSettingsController.php
@@ -50,7 +50,7 @@ function save_siteconfig($data, $form) {
50 50
 		return $form->forTemplate();
51 51
 	}
52 52
 	
53  
-	function PreviewLink() {
  53
+	function LinkPreview() {
54 54
 		return false;
55 55
 	}
56 56
 
4  templates/Includes/AssetAdmin_EditForm.ss
@@ -19,8 +19,8 @@
19 19
 		<% control Actions %>
20 20
 			$Field
21 21
 		<% end_control %>
22  
-		<% if CurrentPage.PreviewLink %>
23  
-		<a href="$CurrentPage.PreviewLink" class="cms-preview-toggle-link ss-ui-button" data-icon="preview">
  22
+		<% if CurrentPage.LinkPreview %>
  23
+		<a href="$CurrentPage.LinkPreview" class="cms-preview-toggle-link ss-ui-button" data-icon="preview">
24 24
 			<% _t('LeftAndMain.PreviewButton', 'Preview') %> &raquo;
25 25
 		</a>
26 26
 		<% end_if %>
4  templates/Includes/CMSMain_EditForm.ss
@@ -22,8 +22,8 @@
22 22
 			<% control Actions %>
23 23
 				$Field
24 24
 			<% end_control %>
25  
-			<% if Controller.PreviewLink %>
26  
-			<a href="$Controller.PreviewLink" class="cms-preview-toggle-link ss-ui-button" data-icon="preview">
  25
+			<% if Controller.LinkPreview %>
  26
+			<a href="$Controller.LinkPreview" class="cms-preview-toggle-link ss-ui-button" data-icon="preview">
27 27
 				<% _t('LeftAndMain.PreviewButton', 'Preview') %> &raquo;
28 28
 			</a>
29 29
 			<% end_if %>

0 notes on commit 4fd7573

Please sign in to comment.
Something went wrong with that request. Please try again.