Merge pull request #18965 from vincentjdc/expensereport-pdf-preview

NEW Preview of pdf files of expense report line
This commit is contained in:
Laurent Destailleur 2021-10-17 15:06:42 +02:00 committed by GitHub
commit c7152e5c7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2174,7 +2174,10 @@ if ($action == 'create') {
// If the preview file is found
if (file_exists($fileimage)) {
$thumbshown = 1;
$urlforhref = getAdvancedPreviewUrl($modulepart, $relativepath.'/'.$fileinfo['filename'].'.'.strtolower($fileinfo['extension']), 1, '&entity='.(!empty($object->entity) ? $object->entity : $conf->entity));
print '<a href="'.$urlforhref['url'].'" class="'.$urlforhref['css'].'" target="'.$urlforhref['target'].'" mime="'.$urlforhref['mime'].'">';
print '<img height="'.$heightforphotref.'" class="photo photowithmargin photowithborder" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=apercu'.$modulepart.'&amp;file='.urlencode($relativepathimage).'">';
print '</a>';
}
}
}