forked from Wavyzz/dolibarr
Fix: do not show desc if empty
This commit is contained in:
@@ -850,8 +850,8 @@ class Categorie extends CommonObject
|
||||
* fulllabel = nom avec chemin complet de la categorie
|
||||
* fullpath = chemin complet compose des id
|
||||
*
|
||||
* @param string $type Type of categories ('customer', 'supplier', 'contact', 'product', 'member'). Old
|
||||
* mode (0, 1, 2, ...) is deprecated.
|
||||
* @param string $type Type of categories ('customer', 'supplier', 'contact', 'product', 'member').
|
||||
* Old mode (0, 1, 2, ...) is deprecated.
|
||||
* @param int $markafterid Removed all categories including the leaf $markafterid in category tree.
|
||||
*
|
||||
* @return array Array of categories. this->cats and this->motherof are set.
|
||||
@@ -861,12 +861,12 @@ class Categorie extends CommonObject
|
||||
global $conf, $langs;
|
||||
|
||||
// For backward compatibility
|
||||
if (is_numeric( $type )) {
|
||||
if (is_numeric($type))
|
||||
{
|
||||
// We want to reverse lookup
|
||||
$map_type = array_flip($this->MAP_ID);
|
||||
$type = $map_type[$type];
|
||||
dol_syslog( get_class( $this ) . "::get_full_arbo(): numeric types are deprecated, please use string instead",
|
||||
LOG_WARNING );
|
||||
dol_syslog( get_class( $this ) . "::get_full_arbo(): numeric types are deprecated, please use string instead", LOG_WARNING);
|
||||
}
|
||||
|
||||
$this->cats = array();
|
||||
|
||||
@@ -148,12 +148,13 @@ foreach($fulltree as $key => $val)
|
||||
$categstatic->ref=$val['label'];
|
||||
$categstatic->type=$type;
|
||||
$li=$categstatic->getNomUrl(1,'',60);
|
||||
$desc=dol_htmlcleanlastbr($val['description']);
|
||||
|
||||
$data[] = array(
|
||||
'rowid'=>$val['rowid'],
|
||||
'fk_menu'=>$val['fk_parent'],
|
||||
'entry'=>'<table class="nobordernopadding centpercent"><tr><td>'.$li.
|
||||
'</td><td width="50%">'.dolGetFirstLineOfText($val['description']).'</td>'.
|
||||
'</td><td width="50%">'.dolGetFirstLineOfText($desc).'</td>'.
|
||||
'<td align="right" width="20px;"><a href="'.DOL_URL_ROOT.'/categories/viewcat.php?id='.$val['id'].'&type='.$type.'">'.img_view().'</a></td>'.
|
||||
'</tr></table>'
|
||||
);
|
||||
|
||||
@@ -94,7 +94,7 @@ function tree_showpad(&$fulltree,$key,$silent=0)
|
||||
|
||||
|
||||
|
||||
// ------------------------------- Used by menu editor -----------------
|
||||
// ------------------------------- Used by menu editor, category view, ... -----------------
|
||||
|
||||
/**
|
||||
* Recursive function to output menu tree. <ul id="iddivjstree"><li>...</li></ul>
|
||||
|
||||
Reference in New Issue
Block a user