8802 fix Folder template variable problem

This commit is contained in:
Colin Kuskie 2008-10-10 17:16:41 +00:00
parent 94f14353f4
commit 6eb8c0aad2
2 changed files with 11 additions and 6 deletions

View file

@ -35,6 +35,7 @@
- rfe: Thingy: Max entries per user (SDH Consulting Group)
- fixed: #4174: UserList template show links that should be hidden (Yung Han
Khoe)
- fixed #8802: isImage not functioning in Folders
7.6.0
- added: users may now customize the post received page for the CS

View file

@ -255,16 +255,20 @@ sub view {
url => $child->getUrl,
canEdit => $child->canEdit,
controls => $child->getToolbar,
class => ref $child,
};
if ( ref $child =~ /^WebGUI::Asset::File::Image/ ) {
$child->{ "isImage" } = 1;
$child->{ "thumbnail.url" } = $child->getThumbnailUrl;
$self->session->log->warn(ref $child);
if ( $child->isa('WebGUI::Asset::File::Image') ) {
$self->session->log->warn('is image');
$childVars->{ "isImage" } = 1;
$childVars->{ "thumbnail.url" } = $child->getThumbnailUrl;
}
if ( ref $child =~ /^WebGUI::Asset::File/ ) {
$child->{ "isFile" } = 1;
$child->{ "file.url" } = $child->getFileUrl;
if ( $child->isa('WebGUI::Asset::File') ) {
$self->session->log->warn('is file');
$childVars->{ "isFile" } = 1;
$childVars->{ "file.url" } = $child->getFileUrl;
}
push @{ $vars->{ "file_loop" } }, $childVars;