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
|
|
@ -12,6 +12,7 @@
|
|||
- fix: Recover Password by Profile Field can now work with subclasses of
|
||||
WebGUI::Auth::WebGUI and with custom WebGUI::Form::Controls as profile
|
||||
fields.
|
||||
- Add indicator to trash and clipboard in asset has children
|
||||
|
||||
|
||||
7.4.0
|
||||
|
|
|
|||
|
|
@ -390,13 +390,14 @@ $self->session->style->setLink($self->session->url->extras('assetManager/assetMa
|
|||
\n";
|
||||
foreach my $child (@{$self->getAssetsInClipboard($limit)}) {
|
||||
my $title = $child->getTitle;
|
||||
my $plus = $child->getChildCount({includeTrash => 1}) ? "+ " : " ";
|
||||
$title =~ s/\'/\\\'/g;
|
||||
$output .= "assetManager.AddLine('"
|
||||
.WebGUI::Form::checkbox($self->session,{
|
||||
name=>'assetId',
|
||||
value=>$child->getId
|
||||
})
|
||||
."','<a href=\"".$child->getUrl("func=manageAssets")."\">".$title
|
||||
."','" . $plus . "<a href=\"".$child->getUrl("func=manageAssets")."\">" . $title
|
||||
."</a>','<p style=\"display:inline;vertical-align:middle;\"><img src=\"".$child->getIcon(1)."\" style=\"border-style:none;vertical-align:middle;\" alt=\"".$child->getName."\" /></p> ".$child->getName
|
||||
."','".$self->session->datetime->epochToHuman($child->get("revisionDate"))
|
||||
."','".formatBytes($child->get("assetSize"))."');\n";
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -293,12 +293,13 @@ sub www_manageTrash {
|
|||
foreach my $child (@{$self->getAssetsInTrash($limit)}) {
|
||||
my $title = $child->getTitle;
|
||||
$title =~ s/\'/\\\'/g;
|
||||
my $plus =$child->getChildCount({includeTrash => 1}) ? "+ " : " ";
|
||||
$output .= "assetManager.AddLine('"
|
||||
.WebGUI::Form::checkbox($self->session, {
|
||||
name=>'assetId',
|
||||
value=>$child->getId
|
||||
})
|
||||
."','<a href=\"".$child->getUrl("func=manageAssets")."\">".$title
|
||||
."','" . $plus . "<a href=\"".$child->getUrl("func=manageAssets")."\">" . $title
|
||||
."</a>','<p style=\"display:inline;vertical-align:middle;\"><img src=\"".$child->getIcon(1)."\" style=\"vertical-align:middle;border-style:none;\" alt=\"".$child->getName."\" /></p> ".$child->getName
|
||||
."','".$self->session->datetime->epochToHuman($child->get("revisionDate"))
|
||||
."','".formatBytes($child->get("assetSize"))."');\n";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue