From 29729d8f37bb1276dc5723084b228420a5388954 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Fri, 1 Dec 2006 15:45:52 +0000 Subject: [PATCH] =?UTF-8?q?Ajoute=20lien=20vers=20les=20fiches=20produits?= =?UTF-8?q?=20associ=E9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/product/sousproduits/fiche.php | 146 +++++++++++++------------- 1 file changed, 71 insertions(+), 75 deletions(-) diff --git a/htdocs/product/sousproduits/fiche.php b/htdocs/product/sousproduits/fiche.php index 7a2bd8fed0a..c8fabfa44cd 100644 --- a/htdocs/product/sousproduits/fiche.php +++ b/htdocs/product/sousproduits/fiche.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2001-2006 Rodolphe Quiedeville * Copyright (C) 2004-2006 Laurent Destailleur * Copyright (C) 2005 Eric Seigne * Copyright (C) 2005-2006 Régis Houssin @@ -24,10 +24,10 @@ */ /** - \file htdocs/product/sousproduits/fiche.php - \ingroup product - \brief Page de la fiche produit - \version $Revision$ + \file htdocs/product/sousproduits/fiche.php + \ingroup product + \brief Page de la fiche produit + \version $Revision$ */ require("./pre.inc.php"); @@ -35,12 +35,9 @@ require_once(DOL_DOCUMENT_ROOT."/lib/product.lib.php"); require_once(DOL_DOCUMENT_ROOT."/product.class.php"); require_once(DOL_DOCUMENT_ROOT."/categories/categorie.class.php"); - - $langs->load("bills"); $langs->load("products"); - $mesg = ''; $ref=isset($_GET["ref"])?$_GET["ref"]:$_POST["ref"]; $key=isset($_GET["key"])?$_GET["key"]:$_POST["key"]; @@ -143,81 +140,80 @@ $html = new Form($db); if ($id || $ref) { - if ( $result ) + if ( $result ) { - - if ($action <> 'edit' &&$action <> 'search' && $action <> 're-edit') - { - /* - * En mode visu - */ - $head=product_prepare_head($product); - $titre=$langs->trans("CardProduct".$product->type); - dolibarr_fiche_head($head, 'subproduct', $titre); - - - print($mesg); - - print ''; - - print ""; - - $nblignes=6; - if ($product->type == 0 && $conf->stock->enabled) $nblignes++; - if ($product->type == 1) $nblignes++; - - // Reference - print ''; - - if ($product->is_photo_available($conf->produit->dir_output)) + + if ($action <> 'edit' &&$action <> 'search' && $action <> 're-edit') + { + /* + * En mode visu + */ + $head=product_prepare_head($product); + $titre=$langs->trans("CardProduct".$product->type); + dolibarr_fiche_head($head, 'subproduct', $titre); + + + print($mesg); + + print '
'.$langs->trans("Ref").''; - - // Suivant/précédent - $product->load_previous_next_ref(); - $previous_ref = $product->ref_previous?''.img_previous().'':''; - $next_ref = $product->ref_next?''.img_next().'':''; - if ($previous_ref || $next_ref) print '
'; - print ''.$product->ref.''; - if ($previous_ref || $next_ref) print ''.$previous_ref.''.$next_ref.'
'; - - print '
'; + + print ""; + + $nblignes=6; + if ($product->type == 0 && $conf->stock->enabled) $nblignes++; + if ($product->type == 1) $nblignes++; + + // Reference + print ''; + + if ($product->is_photo_available($conf->produit->dir_output)) { - // Photo - print ''; + // Photo + print ''; } - - print ''; - - // Libelle - print ''; - print ''; - - $product->get_sousproduits_arbo (); - print ''; - + + print ''; + + // Libelle + print ''; + print ''; + + $product->get_sousproduits_arbo (); + print ''; + // associations sousproduits - $prods_arbo = $product->get_arbo_each_prod(); - if(sizeof($prods_arbo) > 0) + $prods_arbo = $product->get_arbo_each_prod(); + if(sizeof($prods_arbo) > 0) + { + print ''; + print '- '.$value[0].'
'; + } + + + print ''; } - - print "
'.$langs->trans("Ref").''; + + // Suivant/précédent + $product->load_previous_next_ref(); + $previous_ref = $product->ref_previous?''.img_previous().'':''; + $next_ref = $product->ref_next?''.img_next().'':''; + if ($previous_ref || $next_ref) print '
'; + print ''.$product->ref.''; + if ($previous_ref || $next_ref) print ''.$previous_ref.''.$next_ref.'
'; + + print '
'; - $nbphoto=$product->show_photos($conf->produit->dir_output,1,1,0); - print ''; + $nbphoto=$product->show_photos($conf->produit->dir_output,1,1,0); + print '
'.$langs->trans("Label").''.$product->libelle.'
'.$langs->trans("AssociatedProductsNumber").''.sizeof($product->get_arbo_each_prod()).'
'.$langs->trans("Label").''.$product->libelle.'
'.$langs->trans("AssociatedProductsNumber").''.sizeof($product->get_arbo_each_prod()).'
'; + print ''.$langs->trans("ProductAssociationList").'
'; + foreach($prods_arbo as $key => $value) { - print '
'; - print ''.$langs->trans("ProductAssociationList").'
'; - foreach($prods_arbo as $key => $value) - { - // print $value[1].' :: '.$value[0].'
'; - print $value[0].'
'; - } - - - print '
\n"; - - print "\n"; + + print "\n"; + + print "\n"; } } - + /* * Fiche en mode edition */