Fixed [ 1480536 ] "Add Files" link in Folder template doesn't work and added intl label to the template
This commit is contained in:
parent
115d85a79a
commit
ec2f50af2b
4 changed files with 23 additions and 3 deletions
|
|
@ -168,6 +168,9 @@ sub purgeCache {
|
|||
#-------------------------------------------------------------------
|
||||
sub view {
|
||||
my $self = shift;
|
||||
|
||||
my $i18n = WebGUI::International->new($self->session, 'Asset_Folder');
|
||||
|
||||
if ($self->session->user->userId eq '1') {
|
||||
my $out = WebGUI::Cache->new($self->session,"view_".$self->getId)->get;
|
||||
return $out if $out;
|
||||
|
|
@ -211,6 +214,10 @@ sub view {
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
$vars{'addFile.label'} = $i18n->get('add file label');
|
||||
$vars{'addFile.url'} = $self->getUrl('func=add&class=WebGUI::Asset::FilePile');
|
||||
|
||||
my $out = $self->processTemplate(\%vars,undef,$self->{_viewTemplate});
|
||||
if ($self->session->user->userId eq '1') {
|
||||
WebGUI::Cache->new($self->session,"view_".$self->getId)->set($out,$self->get("visitorCacheTimeout"));
|
||||
|
|
|
|||
|
|
@ -63,6 +63,12 @@ to do you want to go to the new Folder?</p>|,
|
|||
|
||||
'folder template body' => {
|
||||
message => q|The following variables are available in Folder Templates:
|
||||
<p><b>addFile.url</b><br />
|
||||
The url for adding files to the Folder.</p>
|
||||
|
||||
<p><b>addFile.label</b><br />
|
||||
The internationalized label for adding files to the Folder.</p>
|
||||
|
||||
<p><b>subfolder_loop</b><br />
|
||||
A loop containing all Folder assets which are children of the Folder.
|
||||
|
||||
|
|
@ -141,7 +147,7 @@ this variable will be empty
|
|||
|
||||
</blockquote>
|
||||
|,
|
||||
lastUpdated => 1121790331,
|
||||
lastUpdated => 1146649269,
|
||||
},
|
||||
|
||||
'assetName' => {
|
||||
|
|
@ -150,6 +156,10 @@ this variable will be empty
|
|||
lastUpdated => 1121703567,
|
||||
},
|
||||
|
||||
'add file label' => {
|
||||
message => q|Add files.|,
|
||||
lastUpdated => 1146649269,
|
||||
},
|
||||
};
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue