This commit is contained in:
Laurent Destailleur 2021-06-19 19:12:57 +02:00
parent 6911cc93d1
commit 94ab340bba
2 changed files with 823 additions and 814 deletions

File diff suppressed because it is too large Load Diff

View File

@ -18,6 +18,7 @@ if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) {
$modulepart = 'expensereport'; $maxheightmini = 48;
$relativepath = (!empty($object->ref) ?dol_sanitizeFileName($object->ref) : '').'/';
$filei = 0;
// Loop on each attached file
foreach ($arrayoffiles as $file) {
$urlforhref = array();
$filei++;
@ -77,7 +78,7 @@ if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) {
}
if (empty($urlforhref) || empty($thumbshown)) {
print '<a href="#" class="aphoto" target="_blank">';
print '<span href="" class="aphoto" target="_blank">';
} else {
print '<a href="'.$urlforhref['url'].'" class="'.$urlforhref['css'].'" target="'.$urlforhref['target'].'" mime="'.$urlforhref['mime'].'">';
}
@ -85,7 +86,12 @@ if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) {
print $thumbshown ? $thumbshown : img_mime($minifile);
print '</div></a>';
print '</div>';
if (empty($urlforhref) || empty($thumbshown)) {
print '</span>';
} else {
print '</a>';
}
}
print '<br>';
$checked = '';
@ -106,7 +112,7 @@ if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) {
if (!empty($filenamelinked) && $filenamelinked == $file['relativename']) {
$checked = ' checked';
}
print '<div class="margintoponly maxwidth150"><input type="checkbox"'.$checked.' id="radio'.$filei.'" name="attachfile[]" class="checkboxattachfile" value="'.$file['relativename'].'">';
print '<div class="margintoponly minwidth150 maxwidth150"><input type="checkbox"'.$checked.' id="radio'.$filei.'" name="attachfile[]" class="checkboxattachfile" value="'.$file['relativename'].'">';
print '<label class="wordbreak checkboxattachfilelabel" for="radio'.$filei.'"> '.$file['relativename'].'</label>';
print '</div>';