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'), '/').')$');
|
$arrayoffiles=dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png|'.preg_quote(dol_sanitizeFileName($object->ref.'.pdf'), '/').')$');
|
||||||
$nbFiles = count($arrayoffiles);
|
$nbFiles = count($arrayoffiles);
|
||||||
$nbLinks=Link::count($db, $object->element, $object->id);
|
$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 '<tr class="oddeven nohover trattachnewfilenow"'.(! GETPOSTISSET('sendit') && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)?' style="display: none"':'').'>';
|
||||||
print '<td colspan="'.$colspan.'">';
|
print '<td colspan="'.$colspan.'">';
|
||||||
@@ -2484,6 +2485,13 @@ else
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
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">';
|
print '<tr class="liste_titre">';
|
||||||
|
|||||||
@@ -967,3 +967,4 @@ Inventory=Inventory
|
|||||||
AnalyticCode=Analytic code
|
AnalyticCode=Analytic code
|
||||||
TMenuMRP=MRP
|
TMenuMRP=MRP
|
||||||
ShowMoreInfos=Show More Infos
|
ShowMoreInfos=Show More Infos
|
||||||
|
NoFilesUploadedYet=Please upload a document first
|
||||||
|
|||||||
Reference in New Issue
Block a user