la boite account de l'accueil ne marchait pas
- manquait un include - manquait des colonnes en cas de cellule vide
This commit is contained in:
parent
aec62b5a61
commit
e86efa925e
@ -27,6 +27,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
|
include_once(DOL_DOCUMENT_ROOT."/includes/boxes/modules_boxes.php");
|
||||||
|
include_once(DOL_DOCUMENT_ROOT."/compta/bank/account.class.php");
|
||||||
|
|
||||||
|
|
||||||
class box_comptes extends ModeleBoxes {
|
class box_comptes extends ModeleBoxes {
|
||||||
|
|||||||
@ -98,44 +98,42 @@ class ModeleBoxes
|
|||||||
if (isset($contents[$i][$j]['colspan'])) $tdparam.=' colspan="'. $contents[$i][$j]['colspan'].'"';
|
if (isset($contents[$i][$j]['colspan'])) $tdparam.=' colspan="'. $contents[$i][$j]['colspan'].'"';
|
||||||
if (isset($contents[$i][$j]['class'])) $tdparam.=' class="'. $contents[$i][$j]['class'].'"';
|
if (isset($contents[$i][$j]['class'])) $tdparam.=' class="'. $contents[$i][$j]['class'].'"';
|
||||||
|
|
||||||
if ($contents[$i][$j]['text']) {
|
if (!$contents[$i][$j]['text']) $contents[$i][$j]['text']="";
|
||||||
$texte=isset($contents[$i][$j]['text'])?$contents[$i][$j]['text']:'';
|
$texte=isset($contents[$i][$j]['text'])?$contents[$i][$j]['text']:'';
|
||||||
$textewithnotags=eregi_replace('<[^>]+>','',$texte);
|
$textewithnotags=eregi_replace('<[^>]+>','',$texte);
|
||||||
$texte2=isset($contents[$i][$j]['text2'])?$contents[$i][$j]['text2']:'';
|
$texte2=isset($contents[$i][$j]['text2'])?$contents[$i][$j]['text2']:'';
|
||||||
$texte2withnotags=eregi_replace('<[^>]+>','',$texte2);
|
$texte2withnotags=eregi_replace('<[^>]+>','',$texte2);
|
||||||
//print "xxx $textewithnotags y";
|
//print "xxx $textewithnotags y";
|
||||||
|
|
||||||
if (isset($contents[$i][$j]['logo']) && $contents[$i][$j]['logo']) print '<td width="16">';
|
if (isset($contents[$i][$j]['logo']) && $contents[$i][$j]['logo']) print '<td width="16">';
|
||||||
else print '<td '.$tdparam.'>';
|
else print '<td '.$tdparam.'>';
|
||||||
|
|
||||||
if (isset($contents[$i][$j]['url'])) print '<a href="'.$contents[$i][$j]['url'].'" title="'.$textewithnotags.'">';
|
if (isset($contents[$i][$j]['url'])) print '<a href="'.$contents[$i][$j]['url'].'" title="'.$textewithnotags.'">';
|
||||||
if (isset($contents[$i][$j]['logo']) && $contents[$i][$j]['logo'])
|
if (isset($contents[$i][$j]['logo']) && $contents[$i][$j]['logo'])
|
||||||
{
|
{
|
||||||
$logo=eregi_replace("^object_","",$contents[$i][$j]['logo']);
|
$logo=eregi_replace("^object_","",$contents[$i][$j]['logo']);
|
||||||
print img_object($langs->trans("Show"),$logo);
|
print img_object($langs->trans("Show"),$logo);
|
||||||
print '</a></td><td '.$tdparam.'><a href="'.$contents[$i][$j]['url'].'"';
|
print '</a></td><td '.$tdparam.'><a href="'.$contents[$i][$j]['url'].'"';
|
||||||
print ' title="'.$textewithnotags.'"';
|
print ' title="'.$textewithnotags.'"';
|
||||||
//print ' alt="'.$textewithnotags.'"'; // Pas de alt sur un "<a href>"
|
//print ' alt="'.$textewithnotags.'"'; // Pas de alt sur un "<a href>"
|
||||||
print isset($contents[$i][$j]['target'])?' target="'.$contents[$i][$j]['target'].'"':'';
|
print isset($contents[$i][$j]['target'])?' target="'.$contents[$i][$j]['target'].'"':'';
|
||||||
print '>';
|
print '>';
|
||||||
}
|
|
||||||
$maxlength=$this->MAXLENGTHBOX;
|
|
||||||
if (isset($contents[$i][$j]['maxlength'])) $maxlength=$contents[$i][$j]['maxlength'];
|
|
||||||
|
|
||||||
if ($maxlength && strlen($textewithnotags) > $maxlength)
|
|
||||||
{
|
|
||||||
$texte=substr($texte,0,$maxlength)."...";
|
|
||||||
}
|
|
||||||
if ($maxlength && strlen($texte2withnotags) > $maxlength)
|
|
||||||
{
|
|
||||||
$texte2=substr($texte2,0,$maxlength)."...";
|
|
||||||
}
|
|
||||||
print $texte;
|
|
||||||
if ($contents[$i][$j]['url']) print '</a>';
|
|
||||||
print $texte2;
|
|
||||||
|
|
||||||
print "</td>";
|
|
||||||
}
|
}
|
||||||
|
$maxlength=$this->MAXLENGTHBOX;
|
||||||
|
if (isset($contents[$i][$j]['maxlength'])) $maxlength=$contents[$i][$j]['maxlength'];
|
||||||
|
|
||||||
|
if ($maxlength && strlen($textewithnotags) > $maxlength)
|
||||||
|
{
|
||||||
|
$texte=substr($texte,0,$maxlength)."...";
|
||||||
|
}
|
||||||
|
if ($maxlength && strlen($texte2withnotags) > $maxlength)
|
||||||
|
{
|
||||||
|
$texte2=substr($texte2,0,$maxlength)."...";
|
||||||
|
}
|
||||||
|
print $texte;
|
||||||
|
if ($contents[$i][$j]['url']) print '</a>';
|
||||||
|
print $texte2;
|
||||||
|
print "</td>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sizeof($contents[$i])) print '</tr>';
|
if (sizeof($contents[$i])) print '</tr>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user