From e20d7a21f8119bd7ca8dfaaa0f6a7f9704831a78 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 30 Apr 2022 15:55:19 +0200 Subject: [PATCH] output number of folders/docs only if not 0 --- views/bootstrap/class.Bootstrap.php | 6 ++++-- views/bootstrap4/class.Bootstrap4.php | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 808035e88..7a8a22458 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -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); $subdoc = $subFolder->getDocuments(); $subdoc = SeedDMS_Core_DMS::filterAccess($subdoc, $user, M_READ); - $content .= ' '.count($subsub)."
"; - $content .= ' '.count($subdoc); + if(count($subsub)) + $content .= ' '.count($subsub)."
"; + if(count($subdoc)) + $content .= ' '.count($subdoc); } $content .= ""; return $content; diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index cec8def39..1acf289df 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -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); $subdoc = $subFolder->getDocuments(); $subdoc = SeedDMS_Core_DMS::filterAccess($subdoc, $user, M_READ); - $content .= ' '.count($subsub)."
"; - $content .= ' '.count($subdoc); + if(count($subsub)) + $content .= ' '.count($subsub)."
"; + if(count($subdoc)) + $content .= ' '.count($subdoc); } $content .= ""; return $content;