output number of folders/docs only if not 0

This commit is contained in:
Uwe Steinmann 2022-04-30 15:55:19 +02:00
parent b5120113f7
commit e20d7a21f8
2 changed files with 8 additions and 4 deletions

View File

@ -3238,8 +3238,10 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
$subsub = SeedDMS_Core_DMS::filterAccess($subsub, $user, M_READ); $subsub = SeedDMS_Core_DMS::filterAccess($subsub, $user, M_READ);
$subdoc = $subFolder->getDocuments(); $subdoc = $subFolder->getDocuments();
$subdoc = SeedDMS_Core_DMS::filterAccess($subdoc, $user, M_READ); $subdoc = SeedDMS_Core_DMS::filterAccess($subdoc, $user, M_READ);
$content .= '<i class="fa fa-folder" title="'.getMLText("folders").'"></i> '.count($subsub)."<br />"; if(count($subsub))
$content .= '<i class="fa fa-file" title="'.getMLText("documents").'"></i> '.count($subdoc); $content .= '<i class="fa fa-folder" title="'.getMLText("folders").'"></i> '.count($subsub)."<br />";
if(count($subdoc))
$content .= '<i class="fa fa-file" title="'.getMLText("documents").'"></i> '.count($subdoc);
} }
$content .= "</div>"; $content .= "</div>";
return $content; return $content;

View File

@ -3271,8 +3271,10 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
$subsub = SeedDMS_Core_DMS::filterAccess($subsub, $user, M_READ); $subsub = SeedDMS_Core_DMS::filterAccess($subsub, $user, M_READ);
$subdoc = $subFolder->getDocuments(); $subdoc = $subFolder->getDocuments();
$subdoc = SeedDMS_Core_DMS::filterAccess($subdoc, $user, M_READ); $subdoc = SeedDMS_Core_DMS::filterAccess($subdoc, $user, M_READ);
$content .= '<i class="fa fa-folder" title="'.getMLText("folders").'"></i> '.count($subsub)."<br />"; if(count($subsub))
$content .= '<i class="fa fa-file" title="'.getMLText("documents").'"></i> '.count($subdoc); $content .= '<i class="fa fa-folder" title="'.getMLText("folders").'"></i> '.count($subsub)."<br />";
if(count($subdoc))
$content .= '<i class="fa fa-file" title="'.getMLText("documents").'"></i> '.count($subdoc);
} }
$content .= "</div>"; $content .= "</div>";
return $content; return $content;