4 * FusionForge Documentation Manager
6 * Copyright 2000, Quentin Cregan/Sourceforge
7 * Copyright 2002-2003, Tim Perdue/GForge, LLC
8 * Copyright 2010, Franck Villaume - Capgemini
10 * This file is part of FusionForge.
12 * FusionForge is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * FusionForge is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with FusionForge; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 /* please do not add require here : use www/docman/index.php to add require */
28 /* global variables used */
29 global $d_arr; // documents array
30 global $group_id; // id of the group
32 session_require_perm ('docman',$group_id,'read');
34 echo '<h3>Document Tree</h3>';
36 $idExposeTreeIndex = 0;
38 if ($d_arr != NULL ) {
39 if (!$d_arr || count($d_arr) > 0) {
40 // Get the document groups info
41 //put the doc objects into an array keyed off the docgroup
42 foreach ($d_arr as $doc) {
43 $nested_docs[$doc->getDocGroupID()][] = $doc;
47 echo '<div id="documenttree" style="height:100%">';
50 <script language="JavaScript"><!--
51 var myThemeXPBase = "<?php echo util_make_uri ('/jscook/ThemeXP/'); ?>";
53 <script language="JavaScript" src="<?php echo util_make_uri ('/jscook/JSCookTree.js'); ?>"></script>
54 <link rel="stylesheet" href="<?php echo util_make_uri ('/jscook/ThemeXP/theme.css'); ?>" type="text/css" />
55 <script src="<?php echo util_make_uri ('/jscook/ThemeXP/theme.js'); ?>" type="text/javascript"></script>
57 <div id="myMenuID" style="overflow:auto; height:300px"></div>
58 <!-- if someone wants to make it dynamic.... please do it -->
59 <!--<script language="Javascript">
60 var mymenuidDiv = document.getElementById("myMenuID");
61 var documenttreeDiv = document.getElementById("documenttree");
62 mymenuidDiv.style.height = documenttreeDiv.offsetHeight+"px";
65 <script language="JavaScript"><!--
68 ['<span class="JSCookTreeFolderClosed"><i><img alt="" src="' + ctThemeXPBase + 'folder1.gif" /></i></span><span id="ctItemID0" class="JSCookTreeFolderOpen"><i><img alt="" src="' + ctThemeXPBase + 'folderopen1.gif" /></i></span>', '/', '#', '', '', <?php docman_recursive_display(0); ?>
72 var treeIndex = ctDraw ('myMenuID', myMenu, ctThemeXP1, 'ThemeXP', 0, 1);
73 ctExposeTreeIndex (treeIndex, <?php echo $idExposeTreeIndex ?>);
74 var openItem = ctGetSelectedItem (treeIndex)
75 ctOpenFolder (openItem)