NEW conf to allow show full arbo in getnomurl

This commit is contained in:
atm-quentin 2020-05-19 11:05:45 +02:00
parent d89c9abcb6
commit d61cef28d7
4 changed files with 14 additions and 2 deletions

View File

@ -458,7 +458,17 @@ if ($conf->use_javascript_ajax) {
}
print "</td>\n";
print "</tr>\n";
print '<tr class="oddeven">';
print '<td>'.$langs->trans("AlwaysShowFullArbo").'</td>';
print '<td class="right">';
if ($conf->use_javascript_ajax) {
print ajax_constantonoff('STOCK_ALWAYS_SHOW_FULL_ARBO');
} else {
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
print $form->selectarray("STOCK_ALWAYS_SHOW_FULL_ARBO", $arrval, $conf->global->STOCK_ALWAYS_SHOW_FULL_ARBO);
}
print "</td>\n";
print "</tr>\n";
print '</table>';
/*

View File

@ -218,3 +218,4 @@ InventoryForASpecificWarehouse=Inventory for a specific warehouse
InventoryForASpecificProduct=Inventory for a specific product
StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to use
ForceTo=Force to
AlwaysShowFullArbo=Always display full tree on card link

View File

@ -218,3 +218,4 @@ InventoryForASpecificWarehouse=Inventaire pour un entrepôt spécifique
InventoryForASpecificProduct=Inventaire pour un produit spécifique
StockIsRequiredToChooseWhichLotToUse=Le module Stock est requis pour choisir une lot
ForceTo=Forcer à
AlwaysShowFullArbo=Toujours afficher l'arborescence complète dans le lien vers la fiche

View File

@ -745,7 +745,7 @@ class Entrepot extends CommonObject
$result .= $linkstart;
if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
if ($withpicto != 2) $result .= ($showfullpath ? $this->get_full_arbo() : (empty($this->label) ? $this->libelle : $this->label));
if ($withpicto != 2) $result.= (($showfullpath || !empty($conf->global->STOCK_ALWAYS_SHOW_FULL_ARBO))? $this->get_full_arbo() : (empty($this->label)?$this->libelle:$this->label));
$result .= $linkend;
return $result;