diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index c741bde91..97c242fda 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -11,6 +11,7 @@ editing a Thing and the 'return after edit' setting was set to 'Thing Default' ( Martin Kamerbeek / Oqapi ) - fixed: In the Asset Manager, if you pasted an asset if returned you to the page instead the manager. + - fixed: In the Asset Manager, only display a Select All button if there is more than one asset. 7.7.10 - Made a change to LDAP auth that adds an OR to that query so that it also searches for a row with fieldData REGEXP '^uid=(value-from-ldap-directory-server),'. (Wes Morgan) diff --git a/lib/WebGUI/Content/AssetManager.pm b/lib/WebGUI/Content/AssetManager.pm index c9240af9d..979999c43 100644 --- a/lib/WebGUI/Content/AssetManager.pm +++ b/lib/WebGUI/Content/AssetManager.pm @@ -464,16 +464,21 @@ ENDHTML tie my %options, 'Tie::IxHash'; my $hasClips = 0; + my $clipNum = 0; foreach my $asset (@{$currentAsset->getAssetsInClipboard(1)}) { $options{$asset->getId} = ''.$asset->getName.' '.$asset->getTitle; $hasClips = 1; + $clipNum++; } if ($hasClips) { $output .= '
'.$i18n->get(1082).'' .WebGUI::Form::formHeader($session, {action=>$currentAsset->getUrl}) .WebGUI::Form::hidden($session,{name=>"func",value=>"pasteList"}) - .WebGUI::Form::checkbox($session,{extras=>'onclick="toggleClipboardSelectAll(this.form);"'}) - .' '.$i18n->get("select all").'
' + .( $clipNum > 1 + ? WebGUI::Form::checkbox($session,{extras=>'onclick="toggleClipboardSelectAll(this.form);"'}).' '.$i18n->get("select all").'
' + : '' + ) + .WebGUI::Form::checkList($session,{name=>"assetId",vertical=>1,options=>\%options}) .'
' .WebGUI::Form::submit($session,{value=>"Paste"})