* @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision: 7541 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
include_once(PS_ADMIN_DIR.'/tabs/AdminFeaturesValues.php');
class AdminFeatures extends AdminTab
{
public function __construct()
{
$this->adminFeaturesValues = new AdminFeaturesValues();
$this->table = 'feature';
$this->className = 'Feature';
$this->lang = true;
$this->edit = true;
$this->delete = true;
$this->fieldsDisplay = array(
'name' => array('title' => $this->l('Name'), 'width' => 128),
'value' => array('title' => $this->l('Values'), 'width' => 255, 'orderby' => false, 'search' => false));
parent::__construct();
}
public function display()
{
global $currentIndex;
if ((isset($_POST['submitAddfeature_value']) AND sizeof($this->adminFeaturesValues->_errors))
OR isset($_GET['updatefeature_value']) OR isset($_GET['addfeature_value']))
{
$this->adminFeaturesValues->displayForm($this->token);
echo '
'.$this->l('Back to the features list').'
';
}
else
parent::display();
}
/* Report to AdminTab::displayList() for more details */
public function displayList()
{
global $currentIndex;
echo '
'.$this->l('Add a new feature').'
'.$this->l('Add a new feature value').'
'.$this->l('Click on a feature name to view its values and then click again if you want to hide them.').'
';
$this->displayListHeader();
echo '';
if (!sizeof($this->_list))
echo '