Amélioration: définir la constante MAIN_USE_SHORT_TITLE à 0 pour afficher les références des pièces en entier dans les onglets

This commit is contained in:
marc_ocebo 2005-12-06 15:26:39 +00:00
parent 89ba682000
commit 8acd81629a

View File

@ -232,8 +232,10 @@ function dolibarr_fiche_head($links, $active=0, $title='')
{ {
$limittitle=30; $limittitle=30;
print '<a class="tabTitle">'; print '<a class="tabTitle">';
if (strlen($title) > $limittitle) print substr($title,0,$limittitle).'...'; print
else print $title; ((!defined('MAIN_USE_SHORT_TITLE')) || (defined('MAIN_USE_SHORT_TITLE') && MAIN_USE_SHORT_TITLE))
? dolibarr_trunc($title,$limittitle)
: $title;
print '</a>'; print '</a>';
} }
@ -519,8 +521,10 @@ function dolibarr_print_phone($phone,$country="FR")
*/ */
function dolibarr_trunc($string,$size=40) function dolibarr_trunc($string,$size=40)
{ {
if (strlen($string) > $size) return substr($string,0,$size).'...'; if (strlen($string) > $size)
else return $string; return substr($string,0,$size).'...';
else
return $string;
} }
/** /**