*
* 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
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
require '../main.inc.php';
require DOL_DOCUMENT_ROOT.'/variants/class/ProductAttribute.class.php';
$id = GETPOST('id', 'int');
$action = GETPOST('action', 'aZ09');
$object = new ProductAttribute($db);
/*
* Actions
*/
if ($action == 'up') {
$object->fetch($rowid);
$object->moveUp();
header('Location: '.$_SERVER['PHP_SELF']);
exit();
} elseif ($action == 'down') {
$object->fetch($rowid);
$object->moveDown();
header('Location: '.$_SERVER['PHP_SELF']);
exit();
}
/*
* View
*/
$langs->load('products');
$title = $langs->trans($langs->trans('ProductAttributes'));
$variants = $object->fetchAll();
llxHeader('', $title);
$newcardbutton='';
if ($user->rights->produit->creer)
{
$newcardbutton.= dolGetButtonTitle($langs->trans('Create'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/variants/create.php');
}
print load_fiche_titre($title, $newcardbutton, 'title_products');
$forcereloadpage=empty($conf->global->MAIN_FORCE_RELOAD_PAGE)?0:1;
?>
| trans('Ref') ?> |
trans('Label') ?> |
trans('NbOfDifferentValues') ?> |
trans('NbProducts') ?> |
|
$attribute): ?>
| ref) ?> |
label) ?> |
countChildValues() ?> |
countChildProducts() ?> |
|
0): ?>
|
close();