<?php
-
/**
* FusionForge Documentation Manager
*
* Copyright 2000, Quentin Cregan/Sourceforge
* Copyright 2002-2003, Tim Perdue/GForge, LLC
* Copyright (C) 2010 Alcatel-Lucent
- * Copyright 2010, Franck Villaume
- *
- * This file is part of FusionForge.
+ * Copyright 2010-2011, Franck Villaume - Capgemini
+
+ * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
+ * http://fusionforge.org
*
- * FusionForge is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
*
* FusionForge is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with FusionForge; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/* please do not add require here : use www/docman/index.php to add require */
/* global variables used */
global $group_id; // id of the group
global $dirid; // id of doc_group
-global $nested_docs; // flat docs array
+global $HTML; // Layout object
+global $u; // User object
+global $g; // the Group object
-?>
+$linkmenu = 'listfile';
+$baseredirecturl = '/docman/?group_id='.$group_id;
+$redirecturl = $baseredirecturl.'&view=listfile&dirid='.$dirid;
+$actionlistfileurl = '?group_id='.$group_id.'&view=listfile&dirid='.$dirid;
+if (!forge_check_perm('docman', $group_id, 'read')) {
+ $return_msg= _('Document Manager Access Denied');
+ session_redirect($baseredirecturl.'&warning_msg='.urlencode($return_msg));
+}
-<script language="javascript">
-function displaySubGroup() {
- if ( 'none' == document.getElementById('addsubdocgroup').style.display ) {
- document.getElementById('addsubdocgroup').style.display = 'inline';
- document.getElementById('addfile').style.display = 'none';
- document.getElementById('editdocgroup').style.display = 'none';
- } else {
- document.getElementById('addsubdocgroup').style.display = 'none';
+echo '<div id="left" style="float:left; width:17%; min-width: 50px; overflow: auto;">';
+include ($gfcommon.'docman/views/tree.php');
+echo '</div>';
+
+// plugin projects_hierarchy
+$childgroup_id = getIntFromRequest('childgroup_id');
+if ($childgroup_id) {
+ if (!forge_check_perm('docman', $childgroup_id, 'read')) {
+ $return_msg= _('Document Manager Access Denied');
+ session_redirect($baseredirecturl.'&warning_msg='.urlencode($return_msg));
}
+ $redirecturl .= '&childgroup_id='.$childgroup_id;
+ $actionlistfileurl .= '&childgroup_id='.$childgroup_id;
+ $g = group_get_object($childgroup_id);
+}
+
+$df = new DocumentFactory($g);
+if ($df->isError())
+ exit_error($df->getErrorMessage(), 'docman');
+
+$dgf = new DocumentGroupFactory($g);
+if ($dgf->isError())
+ exit_error($dgf->getErrorMessage(), 'docman');
+
+$dgh = new DocumentGroupHTML($g);
+if ($dgh->isError())
+ exit_error($dgh->getErrorMessage(), 'docman');
+
+$df->setDocGroupID($dirid);
+
+$df->setStateID('1');
+$d_arr_active =& $df->getDocuments();
+if ($d_arr_active != NULL)
+ $d_arr = $d_arr_active;
+
+$df->setStateID('4');
+$d_arr_hidden =& $df->getDocuments();
+if ($d_arr != NULL && $d_arr_hidden != NULL) {
+ $d_arr = array_merge($d_arr, $d_arr_hidden);
+} else if ($d_arr_hidden != NULL) {
+ $d_arr = $d_arr_hidden;
}
-function displayAddFile() {
- if ( 'none' == document.getElementById('addfile').style.display ) {
- document.getElementById('addfile').style.display = 'inline';
- document.getElementById('addsubdocgroup').style.display = 'none';
- document.getElementById('editdocgroup').style.display = 'none';
- } else {
- document.getElementById('addfile').style.display = 'none';
+
+$df->setStateID('5');
+$d_arr_private =& $df->getDocuments();
+if ($d_arr != NULL && $d_arr_private != NULL) {
+ $d_arr = array_merge($d_arr, $d_arr_private);
+} else if ($d_arr_private != NULL) {
+ $d_arr = $d_arr_private;
+}
+
+$nested_groups = $dgf->getNested();
+
+$nested_docs = array();
+$DocGroupName = 0;
+
+if ($dirid) {
+ $ndg = new DocumentGroup($g, $dirid);
+ $DocGroupName = $ndg->getName();
+ $dgpath = $ndg->getPath(true, false);
+ if (!$DocGroupName) {
+ session_redirect($baseredirecturl.'&error_msg='.urlencode($g->getErrorMessage()));
+ }
+ if ($ndg->getState() != 1) {
+ $error_msg = _('Invalid folder');
+ session_redirect($baseredirecturl.'&view=listfile&error_msg='.urlencode($error_msg));
}
}
-function displayEditDocGroup() {
- if ( 'none' == document.getElementById('editdocgroup').style.display ) {
- document.getElementById('editdocgroup').style.display = 'inline';
- document.getElementById('addsubdocgroup').style.display = 'none';
- document.getElementById('addfile').style.display = 'none';
- } else {
- document.getElementById('editdocgroup').style.display = 'none';
+
+if ($d_arr != NULL ) {
+ if (!$d_arr || count($d_arr) > 0) {
+ // Get the document groups info
+ //put the doc objects into an array keyed off the docgroup
+ foreach ($d_arr as $doc) {
+ $nested_docs[$doc->getDocGroupID()][] = $doc;
+ }
}
}
-function displayEditFile(id) {
- var divid = 'editfile'+id;
- if ( 'none' == document.getElementById(divid).style.display ) {
- document.getElementById(divid).style.display = 'inline';
- } else {
- document.getElementById(divid).style.display = 'none';
+
+$df->setStateID('3');
+$d_pending_arr =& $df->getDocuments();
+$nested_pending_groups =& $dgf->getNested();
+
+if ($d_pending_arr != NULL ) {
+ if (!$d_pending_arr || count($d_pending_arr) > 0) {
+ // Get the document groups info
+ //put the doc objects into an array keyed off the docgroup
+ foreach ($d_pending_arr as $doc) {
+ $nested_pending_docs[$doc->getDocGroupID()][] = $doc;
+ }
}
}
-</script>
+
+?>
+
+<script language="JavaScript" type="text/javascript">/* <![CDATA[ */
+var controllerListFile;
+
+jQuery(document).ready(function() {
+ controllerListFile = new DocManListFileController({
+ groupId: <?php echo $group_id ?>,
+ divAddItem: jQuery('#additem'),
+ divEditDirectory: jQuery('#editdocgroup'),
+ buttonAddItem: jQuery('#docman-additem'),
+ buttonEditDirectory: jQuery('#docman-editdirectory'),
+ docManURL: '<?php util_make_uri("docman") ?>',
+ lockIntervalDelay: 60000, //in millisecond and if you change this value, please update the check value 600
+ divLeft: jQuery('#left'),
+ divHandle: jQuery('#handle'),
+ divRight: jQuery('#right'),
+ childGroupId: <?php echo util_ifsetor($childgroup_id, 0) ?>
+ });
+});
+
+/* ]]> */</script>
<?php
-echo '<h3>Directory : <i>'.getNameDocGroup($dirid,$group_id).'</i> ';
-if (forge_check_perm ('docman', $group_id, 'approve')) {
- echo '<a href="#" onclick="javascript:displayEditDocGroup()" >'. html_image('docman/configure-directory.png',22,22,array('alt'=>'edit')). '</a>';
- echo '<a href="#" onclick="javascript:displaySubGroup()" >'. html_image('docman/insert-directory.png',22,22,array('alt'=>'addsubdir')). '</a>';
- echo '<a href="?group_id='.$group_id.'&action=trashdir&dirid='.$dirid.'">'. html_image('docman/trash-empty.png',22,22,array('alt'=>'trashdir')). '</a>';
- if (!isset($nested_docs[$dirid]) && !isset($nested_groups[$dirid]))
- echo '<a href="?group_id='.$group_id.'&action=deldir&dirid='.$dirid.'">'. html_image('docman/delete-directory.png',22,22,array('alt'=>'deldir')). '</a>';
-}
+echo '<div id="handle" style="float:left; height:100px; margin:3px; width:3px; background: #000; cursor:e-resize;"></div>';
+echo '<div id="right" style="float:left; width: 80%; overflow: auto; max-width: 90%;">';
+if ($DocGroupName) {
+ $headerPath = '<h4>';
+ if ($childgroup_id)
+ $headerPath .= _('Subproject').' '.':'.' '.util_make_link('/docman/?group_id='.$g->getID(),$g->getPublicName()).' ';
-echo '<a href="#" onclick="javascript:displayAddFile()" >'. html_image('docman/insert-file.png',22,22,array('alt'=>'addfile')). '</a>';
+ $headerPath .= _('Path:').' <i>'.$dgpath.'</i></h4>';
+ echo $headerPath;
+ echo '<h3 class="docman_h3" >'._('Document Folder:').' <i>'.$DocGroupName.'</i> ';
+ if (forge_check_perm('docman', $ndg->Group->getID(), 'approve')) {
+ echo '<a href="#" class="tabtitle" id="docman-editdirectory" title="'._('Edit this folder').'" >'. html_image('docman/configure-directory.png',22,22,array('alt'=>'edit')). '</a>';
+ echo '<a href="'.$actionlistfileurl.'&action=trashdir" class="tabtitle" id="docman-trashdirectory" title="'._('Move this folder and his content to trash').'" >'. html_image('docman/trash-empty.png',22,22,array('alt'=>'trashdir')). '</a>';
+ if (!isset($nested_docs[$dirid]) && !isset($nested_groups[$dirid]) && !isset($nested_pending_docs[$dirid])) {
+ echo '<a href="'.$actionlistfileurl.'&action=deldir" class="tabtitle" id="docman-deletedirectory" title="'._('Permanently delete this folder').'" >'. html_image('docman/delete-directory.png',22,22,array('alt'=>'deldir')). '</a>';
+ }
+ }
-echo '</h3>';
+ if (forge_check_perm('docman', $group_id, 'submit')) {
+ echo '<a href="#" class="tabtitle" id="docman-additem" title="'. _('Add a new item in this folder') . '" >'. html_image('docman/insert-directory.png',22,22,array('alt'=>'additem')). '</a>';
+ }
-echo '<div id="editdocgroup" style="display:none">';
-include ('docman/views/editdocgroup.php');
-echo '</div>';
-echo '<div id="addsubdocgroup" style="display:none">';
-include ('docman/views/addsubdocgroup.php');
-echo '</div>';
-echo '<div id="addfile" style="display:none">';
-include ('docman/views/addfile.php');
-echo '</div>';
+ $numFiles = $ndg->getNumberOfDocuments(1);
+ if (forge_check_perm('docman', $group_id, 'approve'))
+ $numPendingFiles = $ndg->getNumberOfDocuments(3);
+ if ($numFiles || (isset($numPendingFiles) && $numPendingFiles))
+ echo '<a href="/docman/view.php/'.$ndg->Group->getID().'/zip/full/'.$dirid.'" class="tabtitle" title="'. _('Download this folder as a zip') . '" >' . html_image('docman/download-directory-zip.png',22,22,array('alt'=>'downloadaszip')). '</a>';
+
+ echo '</h3>';
+
+ if (forge_check_perm('docman', $ndg->Group->getID(), 'approve')) {
+ echo '<div class="docman_div_include" id="editdocgroup" style="display:none;">';
+ echo '<h4 class="docman_h4">'. _('Edit this folder') .'</h4>';
+ include ($gfcommon.'docman/views/editdocgroup.php');
+ echo '</div>';
+ }
+ if (forge_check_perm('docman', $ndg->Group->getID(), 'submit')) {
+ echo '<div class="docman_div_include" id="additem" style="display:none">';
+ echo '<h4 class="docman_h4">'. _('Add a new item') .'</h4>';
+ include ($gfcommon.'docman/views/additem.php');
+ echo '</div>';
+ }
+}
if (isset($nested_docs[$dirid]) && is_array($nested_docs[$dirid])) {
- echo '<table style="width:100%">';
- echo '<tr>';
- echo '<td>Type</td>'
- .'<td>Filename</td>'
- .'<td>Title</td>'
- .'<td>Description</td>'
- .'<td>Author</td>'
- .'<td>Last time</td>'
- .'<td>Etat</td>'
- .'<td>Size</td>';
-
- if (forge_check_perm ('docman', $group_id, 'approve'))
- echo '<td>Actions</td>';
-
- echo '</tr>';
+ $tabletop = array('<input id="checkallactive" type="checkbox" title="'._('Select / Deselect all documents for massaction').'" class="tabtitle-w" onchange="controllerListFile.checkAll(\'checkeddocidactive\', \'active\')" />', '', _('Filename'), _('Title'), _('Description'), _('Author'), _('Last time'), _('Status'), _('Size'));
+ $classth = array('unsortable', 'unsortable', '', '', '', '', '', '', '');
+ if (forge_check_perm('docman', $ndg->Group->getID(), 'approve')) {
+ $tabletop[] = _('Actions');
+ $classth[] = 'unsortable';
+ }
+ echo '<div class="docmanDiv">';
+ echo $HTML->listTableTop($tabletop, false, 'sortable_docman_listfile', 'sortable', $classth);
$time_new = 604800;
foreach ($nested_docs[$dirid] as $d) {
echo '<tr>';
- $docurl=util_make_url ('/docman/view.php/'.$group_id.'/'.$d->getID().'/'.urlencode($d->getFileName()));
- echo '<td><a href="'.$docurl.'">';
+ echo '<td>';
+ if (!$d->getLocked() && !$d->getReserved()) {
+ echo '<input type="checkbox" value="'.$d->getID().'" class="checkeddocidactive tabtitle-w" title="'._('Select / Deselect this document for massaction').'" onchange="controllerListFile.checkgeneral(\'active\')" />';
+ } else {
+ if (session_loggedin() && ($d->getReservedBy() != $u->getID())) {
+ echo '<input type="checkbox" name="disabled" disabled="disabled"';
+ } else {
+ echo '<input type="checkbox" value="'.$d->getID().'" class="checkeddocidactive tabtitle-w" title="'._('Select / Deselect this document for massaction').'"" onchange="controllerListFile.checkgeneral(\'active\')" />';
+ }
+ }
+ echo '</td>';
switch ($d->getFileType()) {
- case "image/png":
- case "image/jpeg":
- echo html_image('docman/file_type_image.png',22,22,array('alt'=>$d->getFileType()));
+ case "URL": {
+ $docurl = $d->getFileName();
break;
- case "application/pdf":
- echo html_image('docman/file_type_pdf.png',22,22,array('alt'=>$d->getFileType()));
- break;
- default:
- echo html_image('docman/file_type_unknown.png',22,22,array('alt'=>$d->getFileType()));
+ }
+ default: {
+ $docurl = util_make_uri('/docman/view.php/'.$d->Group->getID().'/'.$d->getID().'/'.urlencode($d->getFileName()));
+ }
}
- echo '</a></td>';
+ echo '<td><a href="'.$docurl.'" class="tabtitle-nw" title="'._('View this document').'" >';
+ echo html_image($d->getFileTypeImage(), '22', '22', array('alt'=>$d->getFileType()));;
+ echo '</a></td>'."\n";
echo '<td>';
if (($d->getUpdated() && $time_new > (time() - $d->getUpdated())) || $time_new > (time() - $d->getCreated())) {
- echo html_image('docman/new.png',14,14,array('alt'=>'new'));
+ $html_image_attr = array();
+ $html_image_attr['alt'] = _('new');
+ $html_image_attr['class'] = 'tabtitle-ne';
+ $html_image_attr['title'] = _('Created or updated since less than 7 days');
+ echo html_image('docman/new.png', '14', '14', $html_image_attr);
}
echo ' '.$d->getFileName();
echo '</td>';
echo '<td>'.$d->getName().'</td>';
echo '<td>'.$d->getDescription().'</td>';
- echo '<td>'.$d->getCreatorRealName().'</td>';
+ echo '<td>'.make_user_link($d->getCreatorUserName(), $d->getCreatorRealName()).'</td>';
echo '<td>';
if ( $d->getUpdated() ) {
- echo date(_('Y-m-d H:i'),$d->getUpdated());
+ echo date(_('Y-m-d H:i'), $d->getUpdated());
+ } else {
+ echo date(_('Y-m-d H:i'), $d->getCreated());
+ }
+ echo '</td>';
+ echo '<td>';
+ if ($d->getReserved()) {
+ $html_image_attr = array();
+ $html_image_attr['alt'] = _('Reserved Document');
+ $html_image_attr['class'] = 'tabtitle';
+ $html_image_attr['title'] = _('Reserved Document');
+ echo html_image('docman/document-reserved.png', '22', '22', $html_image_attr);
} else {
- echo date(_('Y-m-d H:i'),$d->getCreated());
+ echo $d->getStateName();
}
echo '</td>';
- echo '<td>'.$d->getStateName().'</td>';
echo '<td>';
- $metric = 'B';
- $size = $d->getFileSize();
- if ($size > 1024 ) {
- $metric = 'KB';
- $size = floor ($size/1024);
- if ($size > 1024 ) {
- $metric = 'MB';
- $size = floor ($size/1024);
+ switch ($d->getFileType()) {
+ case "URL": {
+ echo "--";
+ break;
+ }
+ default: {
+ echo human_readable_bytes($d->getFileSize());
+ break;
}
}
- echo $size . $metric;
echo '</td>';
- if (forge_check_perm ('docman', $group_id, 'approve')) {
+ if (forge_check_perm('docman', $group_id, 'approve')) {
echo '<td>';
- echo '<a href="?group_id='.$group_id.'&action=trashfile&view=listfile&dirid='.$dirid.'&fileid='.$d->getID().'">'.html_image('docman/trash-empty.png',22,22,array('alt'=>'trashfile')). '</a>';
- echo '<a href="#" onclick="javascript:displayEditFile(\''.$d->getID().'\')" >'.html_image('docman/edit-file.png',22,22,array('alt'=>'editfile')). '</a>';
+ /* should we steal the lock on file ? */
+ if ($d->getLocked()) {
+ if ($d->getLockedBy() == $u->getID()) {
+ $d->setLock(0);
+ /* if you change the 60000 value above, please update here too */
+ } elseif ((time() - $d->getLockdate()) > 600) {
+ $d->setLock(0);
+ }
+ }
+ if (!$d->getLocked() && !$d->getReserved()) {
+ echo '<a class="tabtitle-ne" href="'.$actionlistfileurl.'&action=trashfile&fileid='.$d->getID().'" title="'. _('Move this document to trash') .'" >'.html_image('docman/trash-empty.png',22,22,array('alt'=>_('Move to trash this document'))). '</a>';
+ if (session_loggedin()) {
+ echo '<a class="tabtitle-ne" href="#" onclick="javascript:controllerListFile.toggleEditFileView(\''.$d->getID().'\')" title="'. _('Edit this document') .'" >'.html_image('docman/edit-file.png',22,22,array('alt'=>_('Edit this document'))). '</a>';
+ echo '<a class="tabtitle-ne" href="'.$actionlistfileurl.'&action=reservefile&fileid='.$d->getID().'" title="'. _('Reserve this document for later edition') .'" >'.html_image('docman/reserve-document.png',22,22,array('alt'=>_('Reserve this document'))). '</a>';
+ }
+ } else {
+ if (session_loggedin() && $d->getReservedBy() != $u->getID()) {
+ if (forge_check_perm('docman', $ndg->Group->getID(), 'admin')) {
+ echo '<a class="docman-enforcereservation" href="'.$actionlistfileurl.'&action=enforcereserve&fileid='.$d->getID().'" title="'. _('Enforce reservation') .'" >'.html_image('docman/enforce-document.png',22,22,array('alt'=>_('Enforce reservation')));
+ }
+ } else {
+ echo '<a class="tabtitle-ne" href="'.$actionlistfileurl.'&action=trashfile&fileid='.$d->getID().'" title="'. _('Move this document to trash') .'" >'.html_image('docman/trash-empty.png',22,22,array('alt'=>_('Move to trash this document'))). '</a>';
+ echo '<a class="tabtitle-ne" href="#" onclick="javascript:controllerListFile.toggleEditFileView(\''.$d->getID().'\')" title="'. _('Edit this document') .'" >'.html_image('docman/edit-file.png',22,22,array('alt'=>_('Edit this document'))). '</a>';
+ echo '<a class="tabtitle-ne" href="'.$actionlistfileurl.'&action=releasefile&fileid='.$d->getID().'" title="'. _('Release reservation') .'" >'.html_image('docman/release-document.png',22,22,array('alt'=>_('Release reservation'))). '</a>';
+ }
+ }
+ if (session_loggedin()) {
+ if ($d->isMonitoredBy($u->getID())) {
+ $option = 'remove';
+ $titleMonitor = _('Stop monitoring this document');
+ } else {
+ $option = 'add';
+ $titleMonitor = _('Start monitoring this document');
+ }
+ echo '<a class="tabtitle-ne" href="'.$actionlistfileurl.'&action=monitorfile&option='.$option.'&fileid='.$d->getID().'" title="'.$titleMonitor.'" >'.html_image('docman/monitor-'.$option.'document.png',22,22,array('alt'=>$titleMonitor)). '</a>';
+ }
echo '</td>';
}
- echo '</tr>';
+ echo '</tr>'."\n";
+ if (forge_check_perm('docman', $d->Group->getID(), 'approve')) {
+ echo '<tr id="docid'.$d->getID().'" class="docman_editfile_nodisplay" ><td colspan="10" >';
+ $d->editFile();
+ echo '</td></tr>';
+ }
+ }
+ echo $HTML->listTableBottom();
+ echo '<p>';
+ echo '<span class="tabtitle" id="docman-massactionmessage" title="'. _('Actions availables for selected documents, you need to check at least one document to get actions') . '" >';
+ echo _('Mass actions for selected documents:');
+ echo '</span>';
+ echo '<span id="massactionactive" style="display: none;" >';
+ if (forge_check_perm('docman', $ndg->Group->getID(), 'approve')) {
+ echo '<a class="tabtitle-ne" href="#" onclick="window.location.href=\'?group_id='.$group_id.'&action=trashfile&view=listfile&dirid='.$dirid.'&fileid=\'+controllerListFile.buildUrlByCheckbox(\'active\')" title="'. _('Move to trash') .'" >'.html_image('docman/trash-empty.png',22,22,array('alt'=>_('Move to trash'))). '</a>';
+ if (session_loggedin()) {
+ echo '<a class="tabtitle-ne" href="#" onclick="window.location.href=\''.$actionlistfileurl.'&action=reservefile&fileid=\'+controllerListFile.buildUrlByCheckbox(\'active\')" title="'. _('Reserve for later edition') .'" >'.html_image('docman/reserve-document.png',22,22,array('alt'=>_('Reserve'))). '</a>';
+ echo '<a class="tabtitle-ne" href="#" onclick="window.location.href=\''.$actionlistfileurl.'&action=releasefile&fileid=\'+controllerListFile.buildUrlByCheckbox(\'active\')" title="'. _('Release reservation') .'">'.html_image('docman/release-document.png',22,22,array('alt'=>_('Release reservation'))). '</a>';
+ echo '<a class="tabtitle-ne" href="#" onclick="window.location.href=\''.$actionlistfileurl.'&action=monitorfile&option=add&fileid=\'+controllerListFile.buildUrlByCheckbox(\'active\')" title="'. _('Start monitoring') .'" >'.html_image('docman/monitor-adddocument.png',22,22,array('alt'=>_('Start monitoring'))). '</a>';
+ echo '<a class="tabtitle-ne" href="#" onclick="window.location.href=\''.$actionlistfileurl.'&action=monitorfile&option=remove&fileid=\'+controllerListFile.buildUrlByCheckbox(\'active\')" title="'. _('Stop monitoring') .'" >'.html_image('docman/monitor-removedocument.png',22,22,array('alt'=>_('Stop monitoring'))). '</a>';
+ }
+ }
+ echo '<a class="tabtitle" href="#" onclick="window.location.href=\'/docman/view.php/'.$group_id.'/zip/selected/'.$dirid.'/\'+controllerListFile.buildUrlByCheckbox(\'active\')" title="'. _('Download as a zip') . '" >' . html_image('docman/download-directory-zip.png',22,22,array('alt'=>'Download as Zip')). '</a>';
+ echo '</span>';
+ echo '</p>';
+ echo '</div>';
+} else {
+ if ($dirid) {
+ echo '<p class="information">'._('No documents.').'</p>';
}
- echo '</table>';
- echo '<div >'.html_image('docman/new.png',14,14,array('alt'=>'new')).' : ' . _('Created or updated since less than 7 days') .'</div>';
- include 'docman/views/editfile.php';
}
-
+if (forge_check_perm('docman', $group_id, 'approve') && $DocGroupName) {
+ include ($gfcommon.'docman/views/pendingfiles.php');
+}
+echo '</div>';
+echo '<div style="clear: both;" />';
?>