Truncate too long dir
This commit is contained in:
parent
1312b0d8fd
commit
8763124683
@ -365,12 +365,12 @@ class EcmDirectory // extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Renvoie nom clicable (avec eventuellement le picto)
|
\brief Return directory name you can click (and picto)
|
||||||
\param withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
|
\param withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
|
||||||
\param option Sur quoi pointe le lien
|
\param option Sur quoi pointe le lien
|
||||||
\return string Chaine avec URL
|
\return string Chaine avec URL
|
||||||
*/
|
*/
|
||||||
function getNomUrl($withpicto=0,$option='')
|
function getNomUrl($withpicto=0,$option='',$max=0)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
@ -390,7 +390,7 @@ class EcmDirectory // extends CommonObject
|
|||||||
|
|
||||||
if ($withpicto) $result.=($lien.img_object($newlabel,$picto,'',1).$lienfin);
|
if ($withpicto) $result.=($lien.img_object($newlabel,$picto,'',1).$lienfin);
|
||||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||||
if ($withpicto != 2) $result.=$lien.$newref.$lienfin;
|
if ($withpicto != 2) $result.=$lien.($max?dol_trunc($newref,$max,'middle'):$newref).$lienfin;
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -504,13 +504,13 @@ if (empty($action) || $action == 'file_manager' || eregi('refresh',$action) || $
|
|||||||
$newref=eregi_replace('_',' ',$ref);
|
$newref=eregi_replace('_',' ',$ref);
|
||||||
$lienfin='</a>';
|
$lienfin='</a>';
|
||||||
print $lien.$newref.$lienfin;
|
print $lien.$newref.$lienfin;
|
||||||
if (! in_array($val['id'],$expandedsectionarray)) print img_picto('',DOL_URL_ROOT.'/theme/common/treemenu/folder.gif','',1);
|
if (! in_array($val['id'],$expandedsectionarray)) print img_picto($ecmdirstatic->ref,DOL_URL_ROOT.'/theme/common/treemenu/folder.gif','',1);
|
||||||
else print img_picto('',DOL_URL_ROOT.'/theme/common/treemenu/folder-expanded.gif','',1);
|
else print img_picto($ecmdirstatic->ref,DOL_URL_ROOT.'/theme/common/treemenu/folder-expanded.gif','',1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
// Show link
|
// Show link
|
||||||
print '<td valign="middle">';
|
print '<td valign="middle">';
|
||||||
if ($section == $val['id']) print ' <u>';
|
if ($section == $val['id']) print ' <u>';
|
||||||
print $ecmdirstatic->getNomUrl(0,'index');
|
print $ecmdirstatic->getNomUrl(0,'index',20);
|
||||||
if ($section == $val['id']) print '</u>';
|
if ($section == $val['id']) print '</u>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user