Look: Modif esthétiques mineures sur page des catégories

This commit is contained in:
Laurent Destailleur 2006-03-03 20:32:55 +00:00
parent 5de43dc552
commit b11c6f3a3b
3 changed files with 183 additions and 175 deletions

View File

@ -32,3 +32,4 @@ AddProductToCat=Add this product to a category?
ImpossibleAddCat=Impossible to add the category ImpossibleAddCat=Impossible to add the category
ImpossibleAssociateCategory=Impossible to associate the category to ImpossibleAssociateCategory=Impossible to associate the category to
WasAddedSuccessfully=was added successfully. WasAddedSuccessfully=was added successfully.
ProductIsInCategories=Product/Service is in following categories

View File

@ -32,3 +32,4 @@ AddProductToCat=Ajouter ce produit
ImpossibleAddCat=Impossible d'ajouter la catégorie ImpossibleAddCat=Impossible d'ajouter la catégorie
ImpossibleAssociateCategory=Impossible d'associer la catégorie ŕ ImpossibleAssociateCategory=Impossible d'associer la catégorie ŕ
WasAddedSuccessfully=a été ajoutée avec succčs. WasAddedSuccessfully=a été ajoutée avec succčs.
ProductIsInCategories=Ce produit/service est dans les catégorie suivantes

View File

@ -2,6 +2,7 @@
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005 Brice Davoleau <brice.davoleau@gmail.com> * Copyright (C) 2005 Brice Davoleau <brice.davoleau@gmail.com>
* Copyright (C) 2005-2006 Regis Houssin <regis.houssin@cap-networks.com> * Copyright (C) 2005-2006 Regis Houssin <regis.houssin@cap-networks.com>
* Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -51,6 +52,8 @@ if ($_GET["id"] || $_GET["ref"])
if ($_GET["id"]) $result = $product->fetch($_GET["id"]); if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
} }
llxHeader("","",$langs->trans("CardProduct0")); llxHeader("","",$langs->trans("CardProduct0"));
/* /*
@ -164,6 +167,23 @@ if ($_GET["id"] || $_GET["ref"])
// Libelle // Libelle
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$product->libelle.'</td>'; print '<tr><td>'.$langs->trans("Label").'</td><td>'.$product->libelle.'</td>';
print '</tr>'; print '</tr>';
print '</table><br/>';
// Formulaire ajout dans une categorie
print $langs->trans("AddProductToCat")."<br/>";
print '<table class="border" width="100%">';
print '<form method="post" action="'.DOL_URL_ROOT.'/product/categorie.php?id='.$product->id.'">';
print '<tr><td>';
print '<select class="flat" name="add_cat"><option value="-1">'.$langs->trans("Choose")."</option>";
$cat = new Categorie($db);
foreach ($cat->get_all_categories() as $categorie)
{
print "<option value='".$categorie->id."'>".$categorie->label."</option>\n";
}
print '</select>';
print '</td><td><input type="submit" class="button" value="'.$langs->trans("Add").'"></td></tr>';
print '</form></table><br/>';
$c = new Categorie($db); $c = new Categorie($db);
@ -179,11 +199,11 @@ if ($_GET["id"] || $_GET["ref"])
if (sizeof($cats) > 0) if (sizeof($cats) > 0)
{ {
print "Vous avez stocké le produit dans les catégorie suivantes:<br/><br/>"; print $langs->trans("ProductIsInCategories");
print '<br/>';
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("AllWays").'</td></tr>'; print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("AllWays").'</td></tr>';
foreach ($cats as $cat) foreach ($cats as $cat)
{ {
@ -197,7 +217,7 @@ if ($_GET["id"] || $_GET["ref"])
} }
} }
print "</table><br/><br/>\n"; print "</table><br/>\n";
} }
else if($cats < 0) else if($cats < 0)
{ {
@ -206,29 +226,15 @@ if ($_GET["id"] || $_GET["ref"])
else else
{ {
print $langs->trans("NoCat")."<br/><br/>"; print $langs->trans("NoCat")."<br/>";
} }
} }
print $langs->trans("AddProductToCat")."<br/><br/>";
print '<table class="border" width="100%">';
print '<form method="post" action="'.DOL_URL_ROOT.'/product/categorie.php?id='.$product->id.'">';
print '<tr><td>';
print '<select class="flat" name="add_cat"><option value="-1">'.$langs->trans("Choose")."</option>";
$cat = new Categorie($db);
foreach ($cat->get_all_categories() as $categorie)
{
print "<option value='".$categorie->id."'>".$categorie->label."</option>\n";
}
print '</select>';
print '</td><td><input type="submit" class="button" value="'.$langs->trans("Select").'"></td></tr>';
print '</form></table><br/>';
} }
$db->close(); $db->close();
llxFooter("<em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>"); llxFooter('$Date$ - $Revision$');
?> ?>