4 * FusionForge Documentation Manager
6 * Copyright 2000, Quentin Cregan/Sourceforge
7 * Copyright 2002-2003, Tim Perdue/GForge, LLC
8 * Copyright 2010-2011, Franck Villaume - Capgemini
9 * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
10 * Copyright 2013, Franck Villaume - TrivialDev
11 * http://fusionforge.org
13 * This file is part of FusionForge. FusionForge is free software;
14 * you can redistribute it and/or modify it under the terms of the
15 * GNU General Public License as published by the Free Software
16 * Foundation; either version 2 of the Licence, or (at your option)
19 * FusionForge is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License along
25 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
26 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
29 /* please do not add require here : use www/docman/index.php to add require */
30 /* global variables used */
31 global $g; //group object
32 global $group_id; // id of the group
33 global $dirid; // id of doc_group
34 global $dgf; // document directory factory of this group
35 global $dgh; // document directory html
37 if (!forge_check_perm('docman', $group_id, 'approve')) {
38 $return_msg= _('Document Manager Access Denied');
39 session_redirect('/docman/?group_id='.$group_id.'&warning_msg='.urlencode($return_msg));
42 // plugin projects-hierarchy
43 $actionurl = '?group_id='.$group_id.'&action=editdocgroup';
45 $g = group_get_object($childgroup_id);
46 $actionurl = '?group_id='.$group_id.'&action=editdocgroup&childgroup_id='.$childgroup_id;
49 $dg = new DocumentGroup($g, $dirid);
51 session_redirect('/docman/?group_id='.$group_id.'&error_msg='.urlencode($dg->getErrorMessage()));
54 <div class="docmanDivIncluded">
55 <form name="editgroup" action="<?php echo $actionurl; ?>" method="post">
56 <input type="hidden" name="dirid" value="<?php echo $dirid; ?>" />
59 <td><?php echo _('Folder Name') ?></td>
60 <td><input required="required" type="text" name="groupname" value="<?php echo $dg->getName(); ?>" /></td>
62 <td><?php echo _('belongs to') ?></td>
65 if ($dg->getState() == 2) {
66 $newdgf = new DocumentGroupFactory($g);
67 $dgh->showSelectNestedGroups($newdgf->getNested(), 'parent_dirid', true, false);
68 $labelSubmit = _('Restore');
70 $dgh->showSelectNestedGroups($dgf->getNested(), 'parent_dirid', true, $dg->getParentId(), array($dg->getID()));
71 $labelSubmit = _('Edit');
75 <td><input type="submit" value="<?php echo $labelSubmit ?>" name="submit" /></td>
79 <?php echo _('Folder name will be used as a title, so it should be formatted correspondingly.') ?>