forked from Wavyzz/dolibarr
Show if there is no uploaded files
This commit is contained in:
@@ -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">';
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user