added ui niceties to content adders in asset manager, and exposed page.rank to nav templates
This commit is contained in:
parent
b6ddd2dd78
commit
e513526f46
5 changed files with 43 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 {
|
|||
</div>
|
||||
<div style="float: left; padding-right: 30px; font-size: 14px;"><fieldset><legend>'.WebGUI::International::get(1083,"Asset").'</legend>';
|
||||
foreach my $link (@{$self->getAssetAdderLinks("proceed=manageAssets",1)}) {
|
||||
$output .= '<a href="'.$link->{url}.'">'.$link->{label}.'</a><br />';
|
||||
$output .= '<img src="'.$link->{'icon.small'}.'" align="middle" alt="'.$link->{label}.'" border="0" />
|
||||
<a href="'.$link->{url}.'">'.$link->{label}.'</a> ';
|
||||
$output .= editIcon("func=edit&proceed=manageAssets",$link->{asset}->get("url")) if ($link->{isPrototype});
|
||||
$output .= '<br />';
|
||||
}
|
||||
$output .= '<hr>';
|
||||
foreach my $link (@{$self->getAssetAdderLinks("proceed=manageAssets")}) {
|
||||
$output .= '<a href="'.$link->{url}.'">'.$link->{label}.'</a><br />';
|
||||
$output .= '<img src="'.$link->{'icon.small'}.'" align="middle" alt="'.$link->{label}.'" border="0" />
|
||||
<a href="'.$link->{url}.'">'.$link->{label}.'</a> ';
|
||||
$output .= editIcon("func=edit&proceed=manageAssets",$link->{asset}->get("url")) if ($link->{isPrototype});
|
||||
$output .= '<br />';
|
||||
}
|
||||
$output .= '</fieldset></div>';
|
||||
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}} = '<img src="'.$asset->getIcon(1).'" alt="'.$asset->getName.'" border="0" /> '.$item->{title};
|
||||
$hasClips = 1;
|
||||
}
|
||||
if ($hasClips) {
|
||||
|
|
@ -3126,6 +3137,21 @@ sub www_manageAssets {
|
|||
.WebGUI::Form::formFooter()
|
||||
.' </fieldset></div> ';
|
||||
}
|
||||
my $hasPackages = 0;
|
||||
my $packages;
|
||||
foreach my $item (@{$self->getPackageList}) {
|
||||
my $asset = WebGUI::Asset->newByDynamicClass($item->{assetId},$item->{className});
|
||||
$packages .= '<img src="'.$asset->getIcon(1).'" align="middle" alt="'.$asset->getName.'" border="0" />
|
||||
<a href="'.$self->getUrl("func=deployPackage&assetId=".$item->{assetId}).'">'.$item->{title}.'</a> '
|
||||
.editIcon("func=edit&proceed=manageAssets",$asset->get("url"))
|
||||
.'<br />';
|
||||
$hasPackages = 1;
|
||||
}
|
||||
if ($hasPackages) {
|
||||
$output .= '<div style="float: left; padding-right: 30px; font-size: 14px;"><fieldset>
|
||||
<legend>'.WebGUI::International::get("packages","Asset").'</legend>
|
||||
'.$packages.' </fieldset></div> ';
|
||||
}
|
||||
$output .= '
|
||||
<div class="adminConsoleSpacer">
|
||||
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -98,6 +98,7 @@ the Navigation Template to determine who can see them in the menu.</P>
|
|||
loop variables:</p>
|
||||
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
|
||||
<P dir=ltr><STRONG>page.menuTitle</STRONG><BR>The menu title of this page.</P>
|
||||
<P dir=ltr><STRONG>page.rank</STRONG><BR>The rank of this page compared with is siblings.</P>
|
||||
<P dir=ltr><STRONG>page.title</STRONG><BR>The title of this page.</P>
|
||||
<P dir=ltr><STRONG>page.url</STRONG><BR>The complete URL to this page.</P>
|
||||
<P dir=ltr><STRONG>page.assetId</STRONG><BR>The assetId of this page.</P>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue