diff --git a/htdocs/ecm/ecmdirectory.class.php b/htdocs/ecm/ecmdirectory.class.php index 6f891bec62eb57074391ae231705f5581a8bdb8d..655114ecbade19fefa14f7496dd050d76b34503d 100644 --- a/htdocs/ecm/ecmdirectory.class.php +++ b/htdocs/ecm/ecmdirectory.class.php @@ -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 option Sur quoi pointe le lien \return string Chaine avec URL */ - function getNomUrl($withpicto=0,$option='') + function getNomUrl($withpicto=0,$option='',$max=0) { global $langs; @@ -390,7 +390,7 @@ class EcmDirectory // extends CommonObject if ($withpicto) $result.=($lien.img_object($newlabel,$picto,'',1).$lienfin); 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; } diff --git a/htdocs/ecm/index.php b/htdocs/ecm/index.php index 17b0286d22abea1c2e35d5a83b0a1ba8182386e4..26960b7f0ce4275a10d3de6213c4ca35a2be0857 100644 --- a/htdocs/ecm/index.php +++ b/htdocs/ecm/index.php @@ -504,13 +504,13 @@ if (empty($action) || $action == 'file_manager' || eregi('refresh',$action) || $ $newref=eregi_replace('_',' ',$ref); $lienfin='</a>'; print $lien.$newref.$lienfin; - if (! in_array($val['id'],$expandedsectionarray)) print img_picto('',DOL_URL_ROOT.'/theme/common/treemenu/folder.gif','',1); - else print img_picto('',DOL_URL_ROOT.'/theme/common/treemenu/folder-expanded.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($ecmdirstatic->ref,DOL_URL_ROOT.'/theme/common/treemenu/folder-expanded.gif','',1); print '</td>'; // Show link print '<td valign="middle">'; if ($section == $val['id']) print ' <u>'; - print $ecmdirstatic->getNomUrl(0,'index'); + print $ecmdirstatic->getNomUrl(0,'index',20); if ($section == $val['id']) print '</u>'; print '</td>'; print '<td> </td>';