Add indicator to trash and clipboard for assets with children
This commit is contained in:
parent
1a4b77b435
commit
27b3a4d644
4 changed files with 8 additions and 3 deletions
|
|
@ -176,7 +176,9 @@ Returns the number of children this asset has. This excludes assets in the trash
|
|||
|
||||
sub getChildCount {
|
||||
my $self = shift;
|
||||
my ($count) = $self->session->db->quickArray("select count(*) from asset where state in ('published','archived') and parentId=?", [$self->getId]);
|
||||
my $opts = shift || {};
|
||||
my $stateWhere = $opts->{includeTrash} ? '' : "state in ('published','archived') and";
|
||||
my ($count) = $self->session->db->quickArray("select count(*) from asset where $stateWhere parentId=?", [$self->getId]);
|
||||
return $count;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue