MINOR Consistent link method names: LeftAndMain->PreviewLink() changed to LinkPreview()

This commit is contained in:
Ingo Schommer 2012-04-18 22:59:31 +02:00
parent e5000dd330
commit 4fd757341a
5 changed files with 7 additions and 7 deletions

View File

@ -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;

View File

@ -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;
}

View File

@ -50,7 +50,7 @@ class CMSSettingsController extends CMSMain {
return $form->forTemplate();
}
function PreviewLink() {
function LinkPreview() {
return false;
}

View File

@ -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') %> &raquo;
</a>
<% end_if %>

View File

@ -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') %> &raquo;
</a>
<% end_if %>