Look: Modif esthétiques mineures sur page des catégories
This commit is contained in:
parent
b11c6f3a3b
commit
93d784614b
@ -65,7 +65,8 @@ if ($_POST["action"] == 'add' && $user->rights->produit->creer)
|
|||||||
if ($ok)
|
if ($ok)
|
||||||
{
|
{
|
||||||
if (sizeof($cats_meres) > 1 && sizeof(array_unique($cats_meres)) != sizeof($cats_meres))
|
if (sizeof($cats_meres) > 1 && sizeof(array_unique($cats_meres)) != sizeof($cats_meres))
|
||||||
{ // alors il y a des valeurs en double
|
{
|
||||||
|
// alors il y a des valeurs en double
|
||||||
print '<p>'.$langs->trans("ErrSameCatSelected").'</p>';
|
print '<p>'.$langs->trans("ErrSameCatSelected").'</p>';
|
||||||
$_GET["action"] = 'create';
|
$_GET["action"] = 'create';
|
||||||
$ok = false;
|
$ok = false;
|
||||||
@ -116,6 +117,7 @@ if ($user->rights->produit->creer)
|
|||||||
print '<input type="hidden" name="nom" value="'.$nom.'">';
|
print '<input type="hidden" name="nom" value="'.$nom.'">';
|
||||||
print '<input type="hidden" name="description" value="'.$description.'">';
|
print '<input type="hidden" name="description" value="'.$description.'">';
|
||||||
|
|
||||||
|
$catsMeres = isset($_POST['catsMeres']) ? $_POST['catsMeres'] : array();
|
||||||
foreach ($catsMeres as $id => $cat_mere)
|
foreach ($catsMeres as $id => $cat_mere)
|
||||||
{
|
{
|
||||||
print '<input type="hidden" name="catsMeres[$id]" value="'.$cat_mere.'">';
|
print '<input type="hidden" name="catsMeres[$id]" value="'.$cat_mere.'">';
|
||||||
@ -142,7 +144,7 @@ if ($user->rights->produit->creer)
|
|||||||
print '<input type="submit" class="button" value="'.$langs->trans("modify").'" name="choicenbcats" id="choicenbcats"/>';
|
print '<input type="submit" class="button" value="'.$langs->trans("modify").'" name="choicenbcats" id="choicenbcats"/>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
print $html->select_all_categories($nbcats);
|
print $html->select_all_categories($nbcats);
|
||||||
print '<tr><td colspan="2">';
|
print '<tr><td colspan="2" align="center">';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("CreateThisCat").'" name="creation" id="creation"/>';
|
print '<input type="submit" class="button" value="'.$langs->trans("CreateThisCat").'" name="creation" id="creation"/>';
|
||||||
print '</td></tr></form>';
|
print '</td></tr></form>';
|
||||||
|
|
||||||
@ -253,5 +255,5 @@ print '</table>';
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
llxFooter('$Date$ - $Revision$');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -18,8 +18,6 @@
|
|||||||
|
|
||||||
require "./pre.inc.php";
|
require "./pre.inc.php";
|
||||||
|
|
||||||
llxHeader ("","",$langs->trans("Categories"));
|
|
||||||
|
|
||||||
if ($_REQUEST['id'] == "")
|
if ($_REQUEST['id'] == "")
|
||||||
{
|
{
|
||||||
dolibarr_print_error ();
|
dolibarr_print_error ();
|
||||||
@ -28,11 +26,17 @@ if ($_REQUEST['id'] == "")
|
|||||||
|
|
||||||
$c = new Categorie ($db, $_REQUEST['id']);
|
$c = new Categorie ($db, $_REQUEST['id']);
|
||||||
|
|
||||||
print_titre ($langs->trans("Categorie")." ".$c->label);
|
|
||||||
?>
|
/*
|
||||||
<table border="0" width="100%">
|
* Affichage fiche categorie
|
||||||
<tr><td valign="top" width="30%">
|
*/
|
||||||
<?php
|
|
||||||
|
llxHeader ("","",$langs->trans("Categories"));
|
||||||
|
|
||||||
|
print_fiche_titre($langs->trans("Categorie")." ".$c->label);
|
||||||
|
|
||||||
|
print '<table border="0" width="100%" class="notopnoleftnoright">';
|
||||||
|
print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||||
|
|
||||||
$ways = $c->print_all_ways ();
|
$ways = $c->print_all_ways ();
|
||||||
print "<div id='ways'>";
|
print "<div id='ways'>";
|
||||||
@ -48,24 +52,29 @@ if ($cats < 0)
|
|||||||
{
|
{
|
||||||
dolibarr_print_error();
|
dolibarr_print_error();
|
||||||
}
|
}
|
||||||
else if (sizeof ($cats) > 0)
|
else
|
||||||
{
|
{
|
||||||
|
print "<br>";
|
||||||
print "<table class='noborder' width='100%'>\n";
|
print "<table class='noborder' width='100%'>\n";
|
||||||
print "<tr class='liste_titre'><td colspan='2'>".$langs->trans("SubCats")."</td></tr>\n";
|
print "<tr class='liste_titre'><td colspan='2'>".$langs->trans("SubCats")."</td></tr>\n";
|
||||||
|
if (sizeof ($cats) > 0)
|
||||||
|
{
|
||||||
|
$var=true;
|
||||||
foreach ($cats as $cat)
|
foreach ($cats as $cat)
|
||||||
{
|
{
|
||||||
$i++;
|
$i++;
|
||||||
print "\t<tr ".$bc[$i%2].">\n";
|
$var=!$var;
|
||||||
|
print "\t<tr ".$bc[$var].">\n";
|
||||||
print "\t\t<td><a href='viewcat.php?id=".$cat->id."'>".$cat->label."</a></td>\n";
|
print "\t\t<td><a href='viewcat.php?id=".$cat->id."'>".$cat->label."</a></td>\n";
|
||||||
print "\t\t<td>".$cat->description."</td>\n";
|
print "\t\t<td>".$cat->description."</td>\n";
|
||||||
print "\t</tr>\n";
|
print "\t</tr>\n";
|
||||||
}
|
}
|
||||||
print "</table>\n<br/>\n";
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<p>".$langs->trans("NoSubCat")."</p>";
|
print "<tr><td>".$langs->trans("NoSubCat")."</td></tr>";
|
||||||
|
}
|
||||||
|
print "</table>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
@ -76,33 +85,44 @@ if ($prods < 0)
|
|||||||
{
|
{
|
||||||
dolibarr_print_error();
|
dolibarr_print_error();
|
||||||
}
|
}
|
||||||
else if (sizeof ($prods) > 0)
|
else
|
||||||
{
|
{
|
||||||
|
print "<br>";
|
||||||
print "<table class='noborder' width='100%'>\n";
|
print "<table class='noborder' width='100%'>\n";
|
||||||
print "<tr class='liste_titre'><td colspan='2'>".$langs->trans("Products")."</td></tr>\n";
|
print "<tr class='liste_titre'><td colspan='2'>".$langs->trans("ProductsAndServices")."</td></tr>\n";
|
||||||
|
|
||||||
|
if (sizeof ($prods) > 0)
|
||||||
|
{
|
||||||
|
$var=true;
|
||||||
foreach ($prods as $prod)
|
foreach ($prods as $prod)
|
||||||
{
|
{
|
||||||
$i++;
|
$i++;
|
||||||
print "\t<tr ".$bc[$i%2].">\n";
|
$var=!$var;
|
||||||
|
print "\t<tr ".$bc[$var].">\n";
|
||||||
print "\t\t<td><a href='".DOL_URL_ROOT."/product/fiche.php?id=".$prod->id."'>".$prod->libelle."</a></td>\n";
|
print "\t\t<td><a href='".DOL_URL_ROOT."/product/fiche.php?id=".$prod->id."'>".$prod->libelle."</a></td>\n";
|
||||||
print "\t\t<td>".$prod->description."</td>\n";
|
print "\t\t<td>".$prod->description."</td>\n";
|
||||||
print "\t</tr>\n";
|
print "\t</tr>\n";
|
||||||
}
|
}
|
||||||
print "</table>\n";
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<p>".$langs->trans ("NoProd")."</p>";
|
print "<tr><td>".$langs->trans ("NoProd")."</td></tr>";
|
||||||
|
}
|
||||||
|
print "</table>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Boutons actions
|
||||||
|
*/
|
||||||
print "<div class='tabsAction'>\n";
|
print "<div class='tabsAction'>\n";
|
||||||
print "<a class='tabAction' href='edit.php?id=".$c->id."'>Éditer</a>";
|
print "<a class='tabAction' href='edit.php?id=".$c->id."'>".$langs->trans("Edit")."</a>";
|
||||||
print "<a class='tabAction' href='delete.php?id=".$c->id."'>Supprimer</a>";
|
print "<a class='tabAction' href='delete.php?id=".$c->id."'>".$langs->trans("Delete")."</a>";
|
||||||
print "</div>";
|
print "</div>";
|
||||||
|
|
||||||
|
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
llxFooter('$Date$ - $Revision$');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -33,3 +33,4 @@ 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
|
ProductIsInCategories=Product/Service is in following categories
|
||||||
|
ClassifyInCategory=Classify in category
|
||||||
@ -33,3 +33,4 @@ ImpossibleAddCat=Impossible d'ajouter la cat
|
|||||||
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
|
ProductIsInCategories=Ce produit/service est dans les catégorie suivantes
|
||||||
|
ClassifyInCategory=Classer dans la catégorie
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user