[Fusionforge-commits] r14603 - trunk/src/common/docman

Franck VILLAUME nerville at fusionforge.org
Tue Oct 11 13:16:44 CEST 2011


Author: nerville
Date: 2011-10-11 13:16:44 +0200 (Tue, 11 Oct 2011)
New Revision: 14603

Modified:
   trunk/src/common/docman/DocumentManager.class.php
Log:
add nb of documents in trash tree

Modified: trunk/src/common/docman/DocumentManager.class.php
===================================================================
--- trunk/src/common/docman/DocumentManager.class.php	2011-10-11 06:49:16 UTC (rev 14602)
+++ trunk/src/common/docman/DocumentManager.class.php	2011-10-11 11:16:44 UTC (rev 14603)
@@ -164,12 +164,19 @@
 					$nbDocsPrivate = $localDg->getNumberOfDocuments(5);
 				}
 
-				if ($nbDocs && (!isset($nbDocsPending) || $nbDocsPending == 0) && (!isset($nbDocsHidden) || $nbDocsHidden == 0) && (!isset($nbDocsPrivate) || $nbDocsPrivate)) {
-					$nbDocsLabel = '<span class="tabtitle" title="'._('Number of documents in this folder').'" >('.$nbDocs.')</span>';
+				if ($stateId == 2 && forge_check_perm('docman', $this->Group->getID(), 'approve')) {
+					$nbDocsTrashed = $localDg->getNumberOfDocuments(2);
 				}
+
+				if ($nbDocs && (!isset($nbDocsPending) || $nbDocsPending == 0) && (!isset($nbDocsHidden) || $nbDocsHidden == 0) && (!isset($nbDocsPrivate) || $nbDocsPrivate) && (!isset($nbDocsTrashed) || $nbDocsTrashed)) {
+					$nbDocsLabel = '<span class="tabtitle-nw" title="'._('Number of documents in this folder').'" >('.$nbDocs.')</span>';
+				}
 				if (isset($nbDocsPending) && isset($nbDocsHidden) && isset($nbDocsPrivate)) {
-					$nbDocsLabel = '<span class="tabtitle" title="'._('Number of documents in this folder per status. active/pending/hidden/private').'" >('.$nbDocs.'/'.$nbDocsPending.'/'.$nbDocsHidden.'/'.$nbDocsPrivate.')</span>';
+					$nbDocsLabel = '<span class="tabtitle-nw" title="'._('Number of documents in this folder per status. active/pending/hidden/private').'" >('.$nbDocs.'/'.$nbDocsPending.'/'.$nbDocsHidden.'/'.$nbDocsPrivate.')</span>';
 				}
+				if (isset($nbDocsTrashed)) {
+					$nbDocsLabel = '<span class="tabtitle-nw" title="'._('Number of deleted documents in this folder').'" >('.$nbDocsTrashed.')</span>';
+				}
 				echo '<li id="leaf-'.$subGroupIdValue.'" class="'.$liclass.'">'.util_make_link($link, $localDg->getName()).$nbDocsLabel;
 				if ($dg->getSubgroup($subGroupIdValue, $stateId)) {
 					echo '<ul>';




More information about the Fusionforge-commits mailing list