2
0
forked from Wavyzz/dolibarr

Show if there is no uploaded files

This commit is contained in:
Laurent Destailleur
2019-04-05 19:39:30 +02:00
parent 734b97e255
commit 0fd1f9abf6
2 changed files with 11 additions and 2 deletions

View File

@@ -2391,7 +2391,8 @@ else
$arrayoffiles=dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png|'.preg_quote(dol_sanitizeFileName($object->ref.'.pdf'), '/').')$');
$nbFiles = count($arrayoffiles);
$nbLinks=Link::count($db, $object->element, $object->id);
if ($nbFiles >= 0)
if ($nbFiles > 0)
{
print '<tr class="oddeven nohover trattachnewfilenow"'.(! GETPOSTISSET('sendit') && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)?' style="display: none"':'').'>';
print '<td colspan="'.$colspan.'">';
@@ -2484,6 +2485,13 @@ else
}
print '</td></tr>';
}
else
{
print '<tr class="oddeven nohover trattachnewfilenow"'.(! GETPOSTISSET('sendit') && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)?' style="display: none"':'').'>';
print '<td colspan="'.$colspan.'">';
print '<span class="opacitymedium">'.$langs->trans("NoFilesUploadedYet").'</span>';
print '</td></tr>';
}
}
print '<tr class="liste_titre">';

View File

@@ -966,4 +966,5 @@ YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode
Inventory=Inventory
AnalyticCode=Analytic code
TMenuMRP=MRP
ShowMoreInfos=Show More Infos
ShowMoreInfos=Show More Infos
NoFilesUploadedYet=Please upload a document first