diff --git a/htdocs/product/barcode.php b/htdocs/product/barcode.php
index 62fe31d6ef8..d343e7ea783 100644
--- a/htdocs/product/barcode.php
+++ b/htdocs/product/barcode.php
@@ -46,6 +46,8 @@ accessforbidden();
llxHeader("","",$langs->trans("BarCode"));
+$html = new Form($db);
+
$product = new Product($db);
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
@@ -61,12 +63,7 @@ print '
';
// Reference
print '';
print '| '.$langs->trans("Ref").' | ';
-$product->load_previous_next_ref();
-$previous_ref = $product->ref_previous?'ref_previous.'">'.img_previous().'':'';
-$next_ref = $product->ref_next?'ref_next.'">'.img_next().'':'';
-if ($previous_ref || $next_ref) print '';
+print $html->showrefnav($product,'ref');
print ' | ';
print '
';
diff --git a/htdocs/product/categorie.php b/htdocs/product/categorie.php
index 1e351dd8828..2d8b74f34a4 100644
--- a/htdocs/product/categorie.php
+++ b/htdocs/product/categorie.php
@@ -91,10 +91,8 @@ if ($_GET["id"] || $_GET["ref"])
llxHeader("","",$langs->trans("CardProduct".$product->type));
}
-
$html = new Form($db);
-
/*
* Fiche produit
*/
diff --git a/htdocs/product/sousproduits/fiche.php b/htdocs/product/sousproduits/fiche.php
index 671cc59c6a0..bb79eff5aa9 100644
--- a/htdocs/product/sousproduits/fiche.php
+++ b/htdocs/product/sousproduits/fiche.php
@@ -163,26 +163,8 @@ if ($id || $ref)
// Reference
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 ' | ';
-
- if ($product->is_photo_available($conf->produit->dir_output))
- {
- // Photo
- print '';
- $nbphoto=$product->show_photos($conf->produit->dir_output,1,1,0);
- print ' | ';
- }
-
- print '';
+ print $html->showrefnav($product,'ref');
+ print '';
// Libelle
print '| '.$langs->trans("Label").' | '.$product->libelle.' | ';
diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php
index 395191d71f4..2c9196b548f 100644
--- a/htdocs/product/stock/product.php
+++ b/htdocs/product/stock/product.php
@@ -108,8 +108,9 @@ if ($_GET["id"] || $_GET["ref"])
$head=product_prepare_head($product, $user);
$titre=$langs->trans("CardProduct".$product->type);
dolibarr_fiche_head($head, 'stock', $titre);
-
-
+
+ $html = new Form($db);
+
print($mesg);
print '';
@@ -117,12 +118,7 @@ if ($_GET["id"] || $_GET["ref"])
// Reference
print '';
print '| '.$langs->trans("Ref").' | ';
- $product->load_previous_next_ref();
- $previous_ref = $product->ref_previous?'ref_previous.'">'.img_previous().'':'';
- $next_ref = $product->ref_next?'ref_next.'">'.img_next().'':'';
- if ($previous_ref || $next_ref) print '';
+ print $html->showrefnav($product,'ref');
print ' | ';
print '
';
diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php
index a9e6c39fe84..b01f7e66348 100644
--- a/htdocs/product/traduction.php
+++ b/htdocs/product/traduction.php
@@ -134,29 +134,18 @@ if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
llxHeader("","",$langs->trans("Translation"));
+$html = new Form($db);
$head=product_prepare_head($product, $user);
$titre=$langs->trans("CardProduct".$product->type);
-if ( $_GET["action"] != 'edit') dolibarr_fiche_head($head, 'translation', $titre);
+dolibarr_fiche_head($head, 'translation', $titre);
print '';
// Reference
print '';
print '| '.$langs->trans("Ref").' | ';
-if ($_GET["action"] != 'edit')
-{
- $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.' | ';
-}
-else
-{
- print ''.$product->ref.'';
-}
+print $html->showrefnav($product,'ref');
print ' | ';
print '
';
print '
';