[Fusionforge-commits] r13841 - in trunk/src/common/docman: . views

Franck VILLAUME nerville at fusionforge.org
Wed Jul 27 12:28:08 CEST 2011


Author: nerville
Date: 2011-07-27 12:28:07 +0200 (Wed, 27 Jul 2011)
New Revision: 13841

Modified:
   trunk/src/common/docman/DocumentManager.class.php
   trunk/src/common/docman/views/tree.php
Log:
check if group is projects_hierarchy plugin

Modified: trunk/src/common/docman/DocumentManager.class.php
===================================================================
--- trunk/src/common/docman/DocumentManager.class.php	2011-07-27 10:14:36 UTC (rev 13840)
+++ trunk/src/common/docman/DocumentManager.class.php	2011-07-27 10:28:07 UTC (rev 13841)
@@ -143,12 +143,15 @@
 		}
 		$subGroupIdArr = $dg->getSubgroup($docGroupId, $stateId);
 		echo '<ul>';
+		echo '<li><a href="?group_id='.$this->Group->getID().'&view='.$linkmenu.'">/</a></il>';
+		echo '<ul>';
 		foreach ($subGroupIdArr as $subGroupIdValue) {
 			$localDg = new DocumentGroup($this->Group, $subGroupIdValue);
 			echo '<li><a href="?group_id='.$this->Group->getID().'&view='.$linkmenu.'&dirid='.$localDg->getID().'">'.$localDg->getName().'</a></il>';
 			$this->getTree($linkmenu, $subGroupIdValue);
 		}
 		echo '</ul>';
+		echo '</ul>';
 	}
 
 	function getJSTree($linkmenu) {

Modified: trunk/src/common/docman/views/tree.php
===================================================================
--- trunk/src/common/docman/views/tree.php	2011-07-27 10:14:36 UTC (rev 13840)
+++ trunk/src/common/docman/views/tree.php	2011-07-27 10:28:07 UTC (rev 13841)
@@ -43,14 +43,20 @@
 $idExposeTreeIndex = 0;
 $idhtml = 0;
 
-echo '<div id="documenttree" style="height:100%">';
-$dm = new DocumentManager($g);
-$dm->getJSTree($linkmenu);
-echo '<noscript>';
-echo '<ul id="0">';
-echo '<li><a href="?group_id='.$group_id.'&view='.$linkmenu.'">/</a></il>';
-$dm->getTree($linkmenu);
-echo '</ul>';
-echo '</noscript>';
-echo '</div>';
+if ($g->usesPlugin('projects_hierarchy')) {
+	$projectsArray = array($g->getID());
+} else {
+	$projectsArray = array($g->getID());
+}
+foreach ($projectsArray as $projectID) {
+	echo '<div id="documenttree" style="height:100%">';
+	$groupObject = group_get_object($projectID);
+	$dm = new DocumentManager($g);
+	$dm->getJSTree($linkmenu);
+	echo '<noscript>';
+	$dm->getTree($linkmenu);
+	echo '</noscript>';
+	echo '</div>';
+}
+
 ?>




More information about the Fusionforge-commits mailing list