New: Text files are opend in a new tab.
This commit is contained in:
parent
10c65eddb7
commit
f624d50f5b
@ -410,7 +410,10 @@ class FormFile
|
||||
|
||||
// Show file name with link to download
|
||||
if (!$iconPDF) print '<td nowrap="nowrap">';
|
||||
print '<a href="'.DOL_URL_ROOT . '/document.php?modulepart='.$modulepart.'&file='.urlencode($relativepath).'">';
|
||||
print '<a href="'.DOL_URL_ROOT . '/document.php?modulepart='.$modulepart.'&file='.urlencode($relativepath).'"';
|
||||
$mime=dol_mimetype($relativepath,'',0);
|
||||
if (preg_match('/text/',$mime)) print ' target="_blank"';
|
||||
print '>';
|
||||
if (!$iconPDF)
|
||||
{
|
||||
print img_mime($file["name"],$langs->trans("File").': '.$file["name"]).' '.dol_trunc($file["name"],$maxfilenamelength);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user