';
+ $out .= '';
}
-
+
$out .= "";
$out .= '';
@@ -663,12 +663,13 @@ class FormFile
* @param int $permtodelete Permission to delete
* @param int $useinecm Change output for use in ecm module
* @param string $textifempty Text to show if filearray is empty ('NoFileFound' if not defined)
- * @param int $maxlength Maximum length of file name shown
+ * @param int $maxlength Maximum length of file name shown
* @param string $title Title before list
* @param string $url Full url to use for click links ('' = autodetect)
+ * @param int $showrelpart 0=Show only filename (default), 1=Show first level 1 dir
* @return int <0 if KO, nb of files shown if OK
*/
- function list_of_documents($filearray,$object,$modulepart,$param='',$forcedownload=0,$relativepath='',$permtodelete=1,$useinecm=0,$textifempty='',$maxlength=0,$title='',$url='')
+ function list_of_documents($filearray,$object,$modulepart,$param='',$forcedownload=0,$relativepath='',$permtodelete=1,$useinecm=0,$textifempty='',$maxlength=0,$title='',$url='', $showrelpart=0)
{
global $user, $conf, $langs, $hookmanager;
global $bc;
@@ -741,8 +742,7 @@ class FormFile
print '&file='.$filepath.'">';
print img_mime($file['name'],$file['name'].' ('.dol_print_size($file['size'],0,0).')').' ';
- if ($file['level1name'] <> $object->id)
- print $file['level1name'].'/';
+ if ($showrelpart == 1) print $file['level1name'].'/';
print dol_trunc($file['name'],$maxlength,'middle');
print '';
print "\n";