diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index fcdbdb043..220b141d4 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -8,6 +8,8 @@ - Added an IP based limiter to the debug option, and for that reason eliminated the unlikely, though potentially dangerous debug=1 URL option. - Added a performance indicator debug option to the settings. + - The locked icon in the asset manager no longer shows up unless autocommit + is disabled. 6.7.3 diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index 20675ba59..289b6f783 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -1463,8 +1463,8 @@ sub www_manageAssets { assetManager.AddColumn('".$i18n->get("99")."','','left',''); assetManager.AddColumn('".$i18n->get("type")."','','left',''); assetManager.AddColumn('".$i18n->get("last updated")."','','center',''); - assetManager.AddColumn('".$i18n->get("size")."','','right',''); - assetManager.AddColumn('".$i18n->get("locked")."','','center','');\n"; + assetManager.AddColumn('".$i18n->get("size")."','','right','');\n"; + $output .= "assetManager.AddColumn('".$i18n->get("locked")."','','center','');\n" unless ($session{setting}{autoCommit}); foreach my $child (@{$self->getLineage(["children"],{returnObjects=>1})}) { my $commit = 'contextMenu.addLink("'.$child->getUrl("func=commitRevision").'","'.$i18n->get("commit").'");' if ($child->canEditIfLocked); $output .= 'var contextMenu = new contextMenu_createWithLink("'.$child->getId.'","More"); @@ -1484,6 +1484,7 @@ sub www_manageAssets { $edit = "'getUrl("func=edit;proceed=manageAssets")."\">Edit<\\/a> | '+"; $locked = 'unlocked'; } + my $lockLink = ", 'getUrl("func=manageRevisions")."\">".$locked."<\\/a>'" unless ($session{setting}{autoCommit}); $output .= "assetManager.AddLine('" .WebGUI::Form::checkbox({ name=>'assetId', @@ -1494,9 +1495,9 @@ sub www_manageAssets { .",'getUrl("func=manageAssets")."\">".$title ."<\\/a>','getIcon(1)."\" border=\"0\" alt=\"".$child->getName."\" /> ".$child->getName ."','".WebGUI::DateTime::epochToHuman($child->get("revisionDate")) - ."','".formatBytes($child->get("assetSize"))."','getUrl("func=manageRevisions")."\">".$locked."<\\/a>');\n"; + ."','".formatBytes($child->get("assetSize"))."'".$lockLink.");\n"; $output .= "assetManager.AddLineSortData('','','','".$title."','".$child->getName - ."','".$child->get("revisionDate")."','".$child->get("assetSize")."',''); + ."','".$child->get("revisionDate")."','".$child->get("assetSize")."'); assetManager.addAssetMetaData('".$child->getUrl."', '".$child->getRank."', '".$title."');\n"; } $output .= ' diff --git a/lib/WebGUI/Asset/Template.pm b/lib/WebGUI/Asset/Template.pm index 5e18abe20..1cd9d136f 100644 --- a/lib/WebGUI/Asset/Template.pm +++ b/lib/WebGUI/Asset/Template.pm @@ -17,7 +17,6 @@ package WebGUI::Asset::Template; use HTML::Template; use strict; use WebGUI::Asset; -use WebGUI::ErrorHandler; use WebGUI::HTTP; use WebGUI::Session; use WebGUI::SQL;