added a thumbnail for the photo edit screen

This commit is contained in:
Doug Bell 2008-06-09 20:17:04 +00:00
parent 008c12ab48
commit e7260285be
2 changed files with 35 additions and 0 deletions

View file

@ -99,6 +99,7 @@
- fixed: Gallery Search now correctly limits by class name
- added: A template variable to distinguish between Files and Albums in the Gallery
Search
- added: A thumbnail for Photo edit screen
7.5.10
- fix: Syntax error in GetCsMail

View file

@ -164,6 +164,40 @@ sub getDownloadFileUrl {
return $self->getStorageLocation->getUrl( $resolution . ".jpg" );
}
#----------------------------------------------------------------------------
=head2 getEditFormUploadControl
Returns the HTML to render the upload box and link to delete the existing
file, if necessary.
=cut
sub getEditFormUploadControl {
my $self = shift;
my $session = $self->session;
my $i18n = WebGUI::International->new($session, 'Asset_File');
my $html = '';
if ($self->get("filename") ne "") {
$html .= WebGUI::Form::readOnly( $session, {
label => $i18n->get('current file'),
hoverHelp => $i18n->get('current file description'),
value => '<p style="display:inline;vertical-align:middle;"><a href="'.$self->getFileUrl.'"><img src="'.$self->getThumbnailUrl.'" alt="'.$self->get("filename").'" style="border-style:none;vertical-align:middle;" /> '.$self->get("filename").'</a></p>'
});
}
# Control to upload a new file
$html .= WebGUI::Form::file( $session, {
name => 'newFile',
label => $i18n->get('new file'),
hoverHelp => $i18n->get('new file description'),
});
return $html;
}
#----------------------------------------------------------------------------
=head2 getExifData ( )