Si box vide, on affiche "Pas de ...".
This commit is contained in:
parent
1364f98afd
commit
eab61f62d7
@ -96,6 +96,20 @@ class box_factures_fourn_imp extends ModeleBoxes {
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
$i=$num;
|
||||
while ($i < $max)
|
||||
{
|
||||
if ($num==0 && $i==$num)
|
||||
{
|
||||
$this->info_box_contents[$i][0] = array('align' => 'center','text'=>$langs->trans("NoSupplierBillsUnpayed"));
|
||||
$this->info_box_contents[$i][1] = array('text'=>' ');
|
||||
} else {
|
||||
$this->info_box_contents[$i][0] = array('text'=>' ');
|
||||
$this->info_box_contents[$i][1] = array('text'=>' ');
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else {
|
||||
dolibarr_print_error($db);
|
||||
|
||||
@ -93,8 +93,22 @@ class box_prospect extends ModeleBoxes {
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
$i=$num;
|
||||
while ($i < $max)
|
||||
{
|
||||
if ($num==0 && $i==$num)
|
||||
{
|
||||
$this->info_box_contents[$i][0] = array('align' => 'center','text'=>$langs->trans("NoRecordedProspects"));
|
||||
$this->info_box_contents[$i][1] = array('text'=>' ');
|
||||
} else {
|
||||
$this->info_box_contents[$i][0] = array('text'=>' ');
|
||||
$this->info_box_contents[$i][1] = array('text'=>' ');
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else {
|
||||
$this->info_box_contents[0][0] = array('align' => 'left',
|
||||
|
||||
@ -22,9 +22,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/includes/boxes/box_services_vendus.php
|
||||
\ingroup produits,services
|
||||
\brief Module de génération de l'affichage de la box services_vendus
|
||||
\file htdocs/includes/boxes/box_services_vendus.php
|
||||
\ingroup produits,services
|
||||
\brief Module de génération de l'affichage de la box services_vendus
|
||||
*/
|
||||
|
||||
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
|
||||
@ -89,10 +89,12 @@ class box_services_vendus extends ModeleBoxes {
|
||||
$this->info_box_contents[$i][0] = array('align' => 'left',
|
||||
'logo' => ($objp->fk_product_type?'object_service':'object_product'),
|
||||
'text' => $objp->label,
|
||||
'maxlength' => 16,
|
||||
'url' => DOL_URL_ROOT."/contrat/fiche.php?id=".$objp->rowid);
|
||||
|
||||
$this->info_box_contents[$i][1] = array('align' => 'left',
|
||||
'text' => $objp->nom,
|
||||
'maxlength' => 48,
|
||||
'url' => DOL_URL_ROOT."/comm/fiche.php?socid=".$objp->idp);
|
||||
|
||||
$i++;
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
|
||||
class ModeleBoxes
|
||||
{
|
||||
var $MAXLENGTHBOX=70; // Mettre 0 pour pas de limite
|
||||
var $MAXLENGTHBOX=60; // Mettre 0 pour pas de limite
|
||||
|
||||
var $error='';
|
||||
|
||||
@ -102,13 +102,16 @@ class ModeleBoxes
|
||||
print img_object($langs->trans("Show"),$logo);
|
||||
print '</a></td><td '.$tdparam.'><a href="'.$contents[$i][$j]['url'].'" title="'.$textewithnotags.'">';
|
||||
}
|
||||
if ($this->MAXLENGTHBOX && strlen($textewithnotags) > $this->MAXLENGTHBOX)
|
||||
$maxlength=$this->MAXLENGTHBOX;
|
||||
if (isset($contents[$i][$j]['maxlength'])) $maxlength=$contents[$i][$j]['maxlength'];
|
||||
|
||||
if ($maxlength && strlen($textewithnotags) > $maxlength)
|
||||
{
|
||||
$texte=substr($texte,0,$this->MAXLENGTHBOX)."...";
|
||||
$texte=substr($texte,0,$maxlength)."...";
|
||||
}
|
||||
if ($this->MAXLENGTHBOX && strlen($texte2withnotags) > $this->MAXLENGTHBOX)
|
||||
if ($maxlength && strlen($texte2withnotags) > $maxlength)
|
||||
{
|
||||
$texte2=substr($texte2,0,$this->MAXLENGTHBOX)."...";
|
||||
$texte2=substr($texte2,0,$maxlength)."...";
|
||||
}
|
||||
print $texte;
|
||||
if ($contents[$i][$j]['url']) print '</a>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user