Tooltip on filename
This commit is contained in:
parent
304cb6d04c
commit
e1eb1c648f
@ -837,20 +837,27 @@ class FormFile
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Show file name with link to download
|
// Show file name with link to download
|
||||||
|
$imgpreview = $this->showPreview($file, $modulepart, $relativepath, 0, $param);;
|
||||||
|
|
||||||
$out .= '<td class="minwidth200 tdoverflowmax300">';
|
$out .= '<td class="minwidth200 tdoverflowmax300">';
|
||||||
$out .= '<span class="spanoverflow widthcentpercentminusxx">';
|
if ($imgpreview) {
|
||||||
$out .= '<a class="documentdownload paddingright" href="'.$documenturl.'?modulepart='.$modulepart.'&file='.urlencode($relativepath).($param ? '&'.$param : '').'"';
|
$out .= '<span class="spanoverflow widthcentpercentminusx">';
|
||||||
|
} else {
|
||||||
|
$out .= '<span class="spanoverflow">';
|
||||||
|
}
|
||||||
|
$out .= '<a class="documentdownload paddingright" href="'.$documenturl.'?modulepart='.$modulepart.'&file='.urlencode($relativepath).($param ? '&'.$param : '').'"';
|
||||||
|
|
||||||
$mime = dol_mimetype($relativepath, '', 0);
|
$mime = dol_mimetype($relativepath, '', 0);
|
||||||
if (preg_match('/text/', $mime)) {
|
if (preg_match('/text/', $mime)) {
|
||||||
$out .= ' target="_blank" rel="noopener noreferrer"';
|
$out .= ' target="_blank" rel="noopener noreferrer"';
|
||||||
}
|
}
|
||||||
|
$out .= ' title="'.dol_escape_htmltag($file["name"]).'"';
|
||||||
$out .= '>';
|
$out .= '>';
|
||||||
$out .= img_mime($file["name"], $langs->trans("File").': '.$file["name"]);
|
$out .= img_mime($file["name"], $langs->trans("File").': '.$file["name"]);
|
||||||
$out .= dol_trunc($file["name"], 150);
|
$out .= dol_trunc($file["name"], 150);
|
||||||
$out .= '</a>';
|
$out .= '</a>';
|
||||||
$out .= '</span>'."\n";
|
$out .= '</span>'."\n";
|
||||||
$out .= $this->showPreview($file, $modulepart, $relativepath, 0, $param);
|
$out .= $imgpreview;
|
||||||
$out .= '</td>';
|
$out .= '</td>';
|
||||||
|
|
||||||
// Show file size
|
// Show file size
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user