Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MINOR make showing virtual pages tab conditional

MINOR made virtual page tracking sitetree tablelistfield subsite agnostic (from r98005) (from r98223)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102630 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
commit 5ff636c6b4f63337be6be5c25ae7dae2b9571bc8 1 parent a2883d0
@chillu chillu authored
Showing with 9 additions and 7 deletions.
  1. +9 −7 core/model/SiteTree.php
View
16 core/model/SiteTree.php
@@ -1661,8 +1661,7 @@ function getCMSFields() {
'AbsoluteLink' => 'URL'
),
'"CopyContentFromID" = ' . $this->ID,
- ''//,
- // 'LEFT JOIN "SiteTree_LinkTracking" ON "SiteTree"."ID" = "SiteTree_LinkTracking"."SiteTreeID"'
+ ''
);
$virtualPagesTable->setFieldFormatting(array(
'Title' => '<a href=\"admin/show/$ID\">$Title</a>'
@@ -1674,7 +1673,7 @@ function getCMSFields() {
// Lay out the fields
$fields = new FieldSet(
- new TabSet("Root",
+ $rootTab = new TabSet("Root",
$tabContent = new TabSet('Content',
$tabMain = new Tab('Main',
new TextField("Title", $this->fieldLabel('Title')),
@@ -1739,10 +1738,6 @@ function getCMSFields() {
$tabBacklinks = new Tab('Backlinks',
$backLinksNote,
$backLinksTable
- ),
- $tabVirtualPages = new Tab('VirtualPages',
- $virtualPagesNote,
- $virtualPagesTable
)
),
$tabAccess = new Tab('Access',
@@ -1762,6 +1757,13 @@ function getCMSFields() {
)
);
+ if ($virtualPagesTable->TotalCount()) {
+ $rootTab->push($tabVirtualPages = new Tab('VirtualPages',
+ $virtualPagesNote,
+ $virtualPagesTable
+ ));
+ }
+
// Make page location fields read-only if the user doesn't have the appropriate permission
if(!Permission::check("SITETREE_REORGANISE")) {
$fields->makeFieldReadonly('ParentType');

0 comments on commit 5ff636c

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