manual merge of changes from 6.7.8 for File,Image assets

This commit is contained in:
Colin Kuskie 2005-10-31 04:41:38 +00:00
parent fb396863c6
commit 903ccd0777
6 changed files with 183 additions and 23 deletions

View file

@ -280,6 +280,7 @@ sub www_edit {
my $tabform = $self->getEditForm;
$tabform->getTab("display")->template(
-value=>$self->getValue("templateId"),
-hoverHelp=>WebGUI::International::get('file template description','Asset_Image'),
-namespace=>"FileAsset"
);
$self->getAdminConsole->setHelp("file add/edit", "Asset_File");

View file

@ -231,6 +231,7 @@ sub www_edit {
$tabform->getTab("display")->template(
-value=>$self->get("templateId"),
-namespace=>"ImageAsset",
-hoverHelp=>WebGUI::International::get('image template description','Asset_Image'),
-defaultValue=>"PBtmpl0000000000000088"
);
$self->getAdminConsole->setHelp("image add/edit","Asset_Image");
@ -254,18 +255,24 @@ sub www_resize {
my ($x, $y) = $self->getStorageLocation->getSizeInPixels($self->get("filename"));
$f->readOnly(
-label=>WebGUI::International::get('image size', 'Asset_Image'),
-value=>$x.' x '.$y
-hoverHelp=>WebGUI::International::get('image size description', 'Asset_Image'),
-value=>$x.' x '.$y,
);
$f->integer(
-label=>WebGUI::International::get('new width','Asset_Image'),
-name=>"newWidth"
-hoverHelp=>WebGUI::International::get('new width description','Asset_Image'),
-name=>"newWidth",
-value=>$x,
);
$f->integer(
-label=>WebGUI::International::get('new height','Asset_Image'),
-name=>"newHeight"
-hoverHelp=>WebGUI::International::get('new height description','Asset_Image'),
-name=>"newHeight",
-value=>$y,
);
$f->submit;
my $image = '<div align="center"><img src="'.$self->getStorageLocation->getUrl($self->get("filename")).'" border="1" alt="'.$self->get("filename").'" /></div>';
$self->getAdminConsole->setHelp("image resize","Asset_Image");
return $self->getAdminConsole->render($f->print.$image,WebGUI::International::get("resize image","Asset_Image"));
}

View file

@ -16,6 +16,11 @@ our $HELP = {
description => 'current file description',
namespace => 'Asset_File',
},
{
title => 'file template title',
description => 'file template description',
namespace => 'Asset_File',
},
],
related => [
{

View file

@ -21,8 +21,21 @@ our $HELP = {
description => 'Thumbnail description',
namespace => 'Asset_Image',
},
{
title => 'image template title',
description => 'image template description',
namespace => 'Asset_Image',
},
],
related => [
{
tag => 'image template',
namespace => 'Asset_Image',
},
{
tag => 'image resize',
namespace => 'Asset_Image',
},
{
tag => 'asset fields',
namespace => 'Asset'
@ -34,6 +47,51 @@ our $HELP = {
]
},
'image template' => {
title => 'image template title',
body => 'image template body',
fields => [
],
related => [
{
tag => 'image add/edit',
namespace => 'Asset_Image',
},
{
tag => 'template language',
namespace => 'Asset_Template',
},
]
},
'image resize' => {
title => 'resize image title',
body => 'resize image body',
fields => [
{
title => 'image size',
description => 'image size description',
namespace => 'Asset_Image',
},
{
title => 'new width',
description => 'new width description',
namespace => 'Asset_Image',
},
{
title => 'new height',
description => 'new height description',
namespace => 'Asset_Image',
},
],
related => [
{
tag => 'image add/edit',
namespace => 'Asset_Image',
},
]
},
};
1;

View file

@ -15,32 +15,44 @@ our $I18N = {
context => 'Describing file add/edit form specific fields',
lastUpdated => 1119068839,
},
'file template title' => {
message => q|File, Template|,
lastUpdated => 1109287565,
message => q|File Template|,
lastUpdated => 1130456105,
},
'file template description' => {
message => q|File templates allow you to display information about the file, such as its filename, size or an icon representing the file type.|,
lastUpdated => 1130456105,
},
'file template body' => {
message => q|<p>The following variables are available in File Templates:</p>
<P><b>attachment.icon</b><br/>
<P><b>fileIcon</b><br/>
The icon which describes the type of file.
<P><b>attachment.url</b><br/>
<P><b>fileUrl</b><br/>
The URL to the file.
<P><b>attachment.name</b><br/>
<P><b>controls</b><br/>
A toolbar for working with the file.
<P><b>filename</b><br/>
The name of the file.
<P><b>attachment.size</b><br/>
The size of the file.
<P><b>storageId</b><br/>
The internal storage ID used for the file.
<P><b>attachment.type</b><br/>
The type of the file (PDF, etc.)
<P><b>title</b><br/>
The title set for the file when it was uploaded, or the filename if none was entered.
<P><b>menuTitle</b><br/>
The menu title, displayed in navigations, set for the file when it was uploaded, or the filename if none was entered.
|,
context => 'Describing the file template variables',
lastUpdated => 1109287834,
lastUpdated => 1130439830,
},

View file

@ -65,42 +65,119 @@ shown here.|,
context => q|label for Image asset form|,
lastUpdated => 1106765841
},
'image size' => {
message => q|Image Size|,
context => q|label for Image asset form|,
lastUpdated => 1106765841
},
'image size' => {
message => q|Image Size|,
context => q|label for Image asset form|,
lastUpdated => 1106765841
'image size description' => {
message => q|Current size of the image, width and height, in pixels|,
context => q|hover help for Image asset form, image size field|,
lastUpdated => 1130531739,
},
'edit image' => {
message => q|Edit Image|,
context => q|label to edit the image|,
lastUpdated => 1106765841
},
'resize image' => {
message => q|Resize Image|,
context => q|label to resize the image|,
lastUpdated => 1106765841
},
'resize image title' => {
message => q|Image, Resize|,
context => q|Title for help entry|,
lastUpdated => 1130532366,
},
'resize image body' => {
message => q|<p>This allows you to grow, shrink or stretch images inside of WebGUI. Simply enter
the new width and height in the form, press Submit and the image will be changed on the server.</p>
<p>There is no undo or versioning for this task. You may wish to download a copy of the image
in case you make a mistake.</p>
<p>If you know the new width or height, and do not want to calculate the other dimension, just enter 0
in that field and WebGUI will calculate it for you.</p>|,
lastUpdated => 1130531896,
},
'new width' => {
message => q|New Width|,
context => q|label to resize the image|,
lastUpdated => 1106765841
},
'new width description' => {
message => q|New Width|,
context => q|Enter the new width for the Image in pixels. If 0 is entered, a new width will be calculated using the height.|,
lastUpdated => 1130538990
},
'new height' => {
message => q|New Height|,
context => q|label to resize the image|,
lastUpdated => 1106765841
},
'new height description' => {
message => q|New Height|,
context => q|Enter the new height for the Image in pixels. If 0 is entered, a new height will be calculated using the width.|,
lastUpdated => 1130538987
},
'image template title' => {
message => q|Image Template|,
lastUpdated => 1130440964,
},
'image template description' => {
message => q|Image templates allow you to display information about the image, such as its thumbnail, filename or the image itself.|,
lastUpdated => 1130440964,
},
'image template body' => {
message => q|<p>The following variables are available in Image Templates:</p>
<P><b>fileIcon</b><br/>
The icon which describes the type of file.
<P><b>fileUrl</b><br/>
The URL to the file.
<P><b>controls</b><br/>
A toolbar for working with the file.
<P><b>thumbnail</b><br/>
A URL to the thumbnail of the image;
<P><b>thumbnailSize</b><br/>
An integer representing the length of the longest side
<P><b>parameters</b><br/>
Any additional IMG tag parameters that were entered with the image was uploaded.
<P><b>filename</b><br/>
The name of the image.
<P><b>storageId</b><br/>
The internal storage ID used for the file.
<P><b>title</b><br/>
The title set for the file when it was uploaded, or the filename if none was entered.
<P><b>menuTitle</b><br/>
The menu title, displayed in navigations, set for the image when it was uploaded, or the filename if none was entered.
|,
context => 'Describing the image template variables',
lastUpdated => 1130456281,
},
};