From 50c493183431ec1d7795fd3b282c9bb02bfe1f56 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 30 Apr 2022 14:58:28 +0200 Subject: [PATCH] fix font-size of status column, use icons for folder count in status column --- views/bootstrap/class.Bootstrap.php | 8 +++++--- views/bootstrap4/class.Bootstrap4.php | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index f3f496250..4eea25977 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -2958,7 +2958,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) $revlinks = $document->getReverseDocumentLinks(); $revlinks = SeedDMS_Core_DMS::filterDocumentLinks($user, $revlinks); - $content .= "
"; + $content .= "
"; if(count($files)) $content .= ' '.count($files)."
"; if(count($links) || count($revlinks)) @@ -3224,8 +3224,10 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) $rr = 100.0; else $rr = 10.0; - $content .= (!$cc['folder_precise'] ? '~'.(round($cc['folder_count']/$rr)*$rr) : $cc['folder_count'])." ".getMLText("folders")."
"; - $content .= (!$cc['document_precise'] ? '~'.(round($cc['document_count']/$rr)*$rr) : $cc['document_count'])." ".getMLText("documents"); + if($cc['folder_count']) + $content .= ' '.(!$cc['folder_precise'] ? '~'.(round($cc['folder_count']/$rr)*$rr) : $cc['folder_count'])."
"; + if($cc['document_count']) + $content .= ' '.(!$cc['document_precise'] ? '~'.(round($cc['document_count']/$rr)*$rr) : $cc['document_count']); } } else { /* FIXME: the following is very inefficient for just getting the number of diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php index 97ffff578..f1716b646 100644 --- a/views/bootstrap4/class.Bootstrap4.php +++ b/views/bootstrap4/class.Bootstrap4.php @@ -3033,7 +3033,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) $revlinks = $document->getReverseDocumentLinks(); $revlinks = SeedDMS_Core_DMS::filterDocumentLinks($user, $revlinks); - $content .= "
"; + $content .= "
"; if(count($files)) $content .= ' '.count($files)."
"; if(count($links) || count($revlinks)) @@ -3257,8 +3257,10 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) $rr = 100.0; else $rr = 10.0; - $content .= (!$cc['folder_precise'] ? '~'.(round($cc['folder_count']/$rr)*$rr) : $cc['folder_count'])." ".getMLText("folders")."
"; - $content .= (!$cc['document_precise'] ? '~'.(round($cc['document_count']/$rr)*$rr) : $cc['document_count'])." ".getMLText("documents"); + if($cc['folder_count']) + $content .= ' '.(!$cc['folder_precise'] ? '~'.(round($cc['folder_count']/$rr)*$rr) : $cc['folder_count'])."
"; + if($cc['document_count']) + $content .= ' '.(!$cc['document_precise'] ? '~'.(round($cc['document_count']/$rr)*$rr) : $cc['document_count']); } } else { /* FIXME: the following is very inefficient for just getting the number of