exposed a form variable for Gallery Album Others Can Add asset property

checkin missing WebGUI::User method
This commit is contained in:
Doug Bell 2008-07-29 17:11:13 +00:00
parent 26d353e7e6
commit afea092a97
4 changed files with 44 additions and 0 deletions

View file

@ -500,6 +500,11 @@ sub getTemplateVars {
}
}
# Set a flag for pending files
if ( $self->get( "status" ) eq "pending" ) {
$var->{ 'isPending' } = 1;
}
# Permissions
$var->{ canAddFile } = $self->canAddFile;
$var->{ canEdit } = $self->canEdit;
@ -1065,6 +1070,12 @@ sub www_edit {
richEditId => $self->getParent->get("richEditIdAlbum"),
});
$var->{ form_othersCanAdd }
= WebGUI::Form::yesNo( $session, {
name => "othersCanAdd",
value => $form->get( "othersCanAdd" ) || $self->get( "othersCanAdd" ),
} );
# Generate the file loop
my $assetIdThumbnail = $form->get("assetIdThumbnail") || $self->get("assetIdThumbnail");
$self->appendTemplateVarsFileLoop( $var, $self->getFileIds );