* * 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, 'product'); $forcereloadpage = empty($conf->global->MAIN_FORCE_RELOAD_PAGE) ? 0 : 1; ?> $attribute) { print ''; print ''; print ''; print ''; print ''; print ''; print ''; print "\n"; } print '
trans('Ref') ?> trans('Label') ?> trans('NbOfDifferentValues') ?> trans('NbProducts') ?>
'.dol_htmlentities($attribute->ref).''.dol_htmlentities($attribute->label).''.$attribute->countChildValues().''.$attribute->countChildProducts().''; print ''.img_edit().''; print ''.img_delete().''; print ''; if ($key > 0) { print ''.img_up('default', 0, 'imgupforline').''; } if ($key < count($variants) - 1) { print ''.img_down('default', 0, 'imgdownforline').''; } print '
'; // End of page llxFooter(); $db->close();