From 0c0bb09e247c5ea7bd32a13b45534d403b8dc05b Mon Sep 17 00:00:00 2001 From: Romain Louis Date: Thu, 20 Sep 2007 04:06:50 +0000 Subject: [PATCH] Detail Form Modifications to be able to set some file parameters for the gallery git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@42327 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/AssetTableField.php | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/code/AssetTableField.php b/code/AssetTableField.php index cc9377da..7107ea29 100755 --- a/code/AssetTableField.php +++ b/code/AssetTableField.php @@ -73,7 +73,7 @@ class AssetTableField extends ComplexTableField { ) ) ); - + if(is_a($childData,'Image')) { $big = $childData->URL; $thumbnail = $childData->getFormattedImage('AssetLibraryPreview')->URL; @@ -92,8 +92,37 @@ class AssetTableField extends ComplexTableField { ), 'Main' ); + + $detailFormFields->addFieldToTab("BottomRoot", + new Tab("Gallery Options", + new TextField( "Content", "Caption" ) + ) + ); } - + else { + if( $childData->Extension == 'swf' ) { + $detailFormFields->addFieldToTab("BottomRoot", + new Tab("Gallery Options", + new TextField( "Content", "Caption" ), + new TextField( 'PopupWidth', 'Popup Width' ), + new TextField( 'PopupHeight', 'Popup Height' ), + new HeaderField( 'SWF File Options' ), + new CheckboxField( 'Embed', 'Force Embeding' ), + new CheckboxField( 'LimitDimensions', 'Limit The Dimensions In The Popup Window' ) + ) + ); + } + else { + $detailFormFields->addFieldToTab("BottomRoot", + new Tab("Gallery Options", + new TextField( "Content", "Caption" ), + new TextField( 'PopupWidth', 'Popup Width' ), + new TextField( 'PopupHeight', 'Popup Height' ) + ) + ); + } + } + if($childData && $childData->hasMethod('BackLinkTracking')) { $links = $childData->BackLinkTracking(); if($links->exists()) {