diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 16816467a..4890b3d94 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -17,6 +17,11 @@ - Fixed several bugs during the conversion of Help and International files to namespaces. - Fixed bugs in correctly setting default values in forms with anonymous arrays. + - Added class icons to all the content adders in the asset manager. + - Expsosed a page.rank template variable to the Navigation template. + - Added packages list to the content adder in the asset manager. + - Added edit icons to the list of prototypes and packages in the asset + manager. 6.5.6 diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index 062a3f1ca..984441547 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -730,6 +730,8 @@ sub getAssetAdderLinks { $links{$asset->get("title")}{url} = $url; $links{$asset->get("title")}{icon} = $asset->getIcon; $links{$asset->get("title")}{'icon.small'} = $asset->getIcon(1); + $links{$asset->get("title")}{'isPrototype'} = 1; + $links{$asset->get("title")}{'asset'} = $asset; } my @sortedLinks; foreach my $label (sort keys %links) { @@ -737,7 +739,9 @@ sub getAssetAdderLinks { label=>$label, url=>$links{$label}{url}, icon=>$links{$label}{icon}, - 'icon.small'=>$links{$label}{'icon.small'} + 'icon.small'=>$links{$label}{'icon.small'}, + isPrototype=>$links{$label}{isPrototype}, + asset=>$links{$label}{asset} }); } return \@sortedLinks; @@ -3102,18 +3106,25 @@ sub www_manageAssets {
'.WebGUI::International::get(1083,"Asset").''; foreach my $link (@{$self->getAssetAdderLinks("proceed=manageAssets",1)}) { - $output .= ''.$link->{label}.'
'; + $output .= ''.$link->{label}.' + '.$link->{label}.' '; + $output .= editIcon("func=edit&proceed=manageAssets",$link->{asset}->get("url")) if ($link->{isPrototype}); + $output .= '
'; } $output .= '
'; foreach my $link (@{$self->getAssetAdderLinks("proceed=manageAssets")}) { - $output .= ''.$link->{label}.'
'; + $output .= ''.$link->{label}.' + '.$link->{label}.' '; + $output .= editIcon("func=edit&proceed=manageAssets",$link->{asset}->get("url")) if ($link->{isPrototype}); + $output .= '
'; } $output .= '
'; my %options; tie %options, 'Tie::IxHash'; my $hasClips = 0; foreach my $item (@{$self->getAssetsInClipboard(1)}) { - $options{$item->{assetId}} = $item->{title}; + my $asset = WebGUI::Asset->newByDynamicClass($item->{assetId},$item->{className}); + $options{$item->{assetId}} = ''.$asset->getName.' '.$item->{title}; $hasClips = 1; } if ($hasClips) { @@ -3126,6 +3137,21 @@ sub www_manageAssets { .WebGUI::Form::formFooter() .' '; } + my $hasPackages = 0; + my $packages; + foreach my $item (@{$self->getPackageList}) { + my $asset = WebGUI::Asset->newByDynamicClass($item->{assetId},$item->{className}); + $packages .= ''.$asset->getName.' + {assetId}).'">'.$item->{title}.' ' + .editIcon("func=edit&proceed=manageAssets",$asset->get("url")) + .'
'; + $hasPackages = 1; + } + if ($hasPackages) { + $output .= '
+ '.WebGUI::International::get("packages","Asset").' + '.$packages.'
'; + } $output .= '
  diff --git a/lib/WebGUI/Asset/Wobject/Navigation.pm b/lib/WebGUI/Asset/Wobject/Navigation.pm index 41f5b9bdc..a8ce07c53 100644 --- a/lib/WebGUI/Asset/Wobject/Navigation.pm +++ b/lib/WebGUI/Asset/Wobject/Navigation.pm @@ -322,6 +322,7 @@ sub view { $pageData->{"page.".$property} = $asset->get($property); } # build nav variables + $pageData->{"page.rank"} = $asset->getRank; $pageData->{"page.absDepth"} = $asset->getLineageLength; $pageData->{"page.relDepth"} = $asset->getLineageLength - $start->getLineageLength; $pageData->{"page.isSystem"} = $asset->get("isSystem"); diff --git a/lib/WebGUI/i18n/English/Asset.pm b/lib/WebGUI/i18n/English/Asset.pm index 366bca384..8f5247cf6 100644 --- a/lib/WebGUI/i18n/English/Asset.pm +++ b/lib/WebGUI/i18n/English/Asset.pm @@ -8,6 +8,12 @@ our $I18N = { context => q|Used when editing an entire branch, and asks whether the user wants to change this field recursively.| }, + 'packages' => { + message => q|Packages|, + lastUpdated => 1099344172, + context => q|The title of the package chooser in the asset manager| + }, + 'assets' => { message => q|Assets|, lastUpdated => 1099344172, diff --git a/lib/WebGUI/i18n/English/Asset_Navigation.pm b/lib/WebGUI/i18n/English/Asset_Navigation.pm index fea42bbb8..f764a045c 100644 --- a/lib/WebGUI/i18n/English/Asset_Navigation.pm +++ b/lib/WebGUI/i18n/English/Asset_Navigation.pm @@ -98,6 +98,7 @@ the Navigation Template to determine who can see them in the menu.

loop variables:

page.menuTitle
The menu title of this page.

+

page.rank
The rank of this page compared with is siblings.

page.title
The title of this page.

page.url
The complete URL to this page.

page.assetId
The assetId of this page.