Better info for Assets that require commit before adding children. Add link is always availiable now, an error message is displayed if you try to post a child to an uncommitted parent. Additionally a new method was added to AssetVersionion.pm to determine whether or not an asset has been committed.

This commit is contained in:
Frank Dillon 2008-09-16 20:08:15 +00:00
parent 0e80937c6b
commit 58f231c87b
9 changed files with 94 additions and 22 deletions

View file

@ -1033,15 +1033,12 @@ instead of having to block things from being added.
sub www_add {
my $self = shift;
if ( $self->getRevisionCount <= 1 && $self->get('status') eq "pending" ) {
unless ( $self->hasBeenCommitted ) {
my $i18n = WebGUI::International->new($self->session, 'Asset_Gallery');
return $self->processStyle(
$i18n->get("error add uncommitted")
);
}
else {
return $self->SUPER::www_add( @_ );
return $self->processStyle($i18n->get("error add uncommitted"));
}
return $self->SUPER::www_add( @_ );
}
#----------------------------------------------------------------------------