diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php index 1e12f450c09..472c1afcee2 100644 --- a/htdocs/compta/facture/impayees.php +++ b/htdocs/compta/facture/impayees.php @@ -144,12 +144,12 @@ $formfile = new FormFile($db); ?> diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index a1a452a939d..b76ed8c3724 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -439,12 +439,17 @@ class FormFile $file_list=dol_dir_list($filedir,'files',0,$filter,'\.meta$'.($png?'|'.$png:''),'date',SORT_DESC); // Affiche en-tete tableau si non deja affiche - if (count($file_list) && ! $headershown && !$iconPDF) + if (! empty($file_list) && ! $headershown && ! $iconPDF) { $headershown=1; $out.= '
'.$titletoshow.'
'; $out.= ''; } + else if (empty($file_list) && ! empty($iconPDF)) + { + // For ajax treatment + $out.= '
'.img_picto('', 'refresh').'
'."\n"; + } // Loop on each file found foreach($file_list as $file) @@ -458,15 +463,15 @@ class FormFile if ($modulepart == 'donation') { $relativepath = get_exdir($filename,2).$file["name"]; } if ($modulepart == 'export') { $relativepath = $file["name"]; } - if (!$iconPDF) $out.= ""; + if (! $iconPDF) $out.= ""; // Show file name with link to download - if (!$iconPDF) $out.= ''; - // Affiche taille fichier - if (!$iconPDF) $out.= ''; - // Affiche date fichier - if (!$iconPDF) $out.= ''; + $out.= ''."\n"; + if (! $iconPDF) + { + $out.= ''; + // Show file size + $out.= ''; + // Show file date + $out.= ''; + } if ($delallowed) { @@ -489,7 +497,7 @@ class FormFile $out.= '">'.img_delete().''; } - if (!$iconPDF) $out.= ''; + if (! $iconPDF) $out.= ''; $this->numoffiles++; } diff --git a/htdocs/langs/HOWTO-Translation.txt b/htdocs/langs/HOWTO-Translation.txt old mode 100755 new mode 100644
'; + if (! $iconPDF) $out.= ''; $out.= 'trans("File").': '.$file["name"]).' '.dol_trunc($file["name"],$maxfilenamelength); } @@ -474,12 +479,15 @@ class FormFile { $out.= img_pdf($file["name"],2); } - $out.= ''; - if (!$iconPDF) $out.= ''.dol_print_size(dol_filesize($filedir."/".$file["name"])).''.dol_print_date(dol_filemtime($filedir."/".$file["name"]),'dayhour').''.dol_print_size(dol_filesize($filedir."/".$file["name"])).''.dol_print_date(dol_filemtime($filedir."/".$file["name"]),'dayhour').'