// Added some informations in Image type listing
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17519 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -41,9 +41,15 @@ class AdminImagesControllerCore extends AdminController
|
|||||||
|
|
||||||
$this->fields_list = array(
|
$this->fields_list = array(
|
||||||
'id_image_type' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
|
'id_image_type' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
|
||||||
'name' => array('title' => $this->l('Name'), 'size' => 16),
|
'name' => array('title' => $this->l('Name'), 'width' => 300),
|
||||||
'width' => array('title' => $this->l('Width'), 'align' => 'right', 'suffix' => ' px', 'width' => 50, 'size' => 5),
|
'width' => array('title' => $this->l('Width'), 'align' => 'right', 'suffix' => ' px', 'width' => 50, 'size' => 5),
|
||||||
'height' => array('title' => $this->l('Height'), 'align' => 'right', 'suffix' => ' px', 'width' => 50, 'size' => 5)
|
'height' => array('title' => $this->l('Height'), 'align' => 'right', 'suffix' => ' px', 'width' => 50, 'size' => 5),
|
||||||
|
'products' => array('title' => $this->l('Products'), 'width' => 50, 'align' => 'center', 'type' => 'bool', 'callback' => 'printEntityActiveIcon', 'orderby' => false),
|
||||||
|
'categories' => array('title' => $this->l('Categories'), 'width' => 50, 'align' => 'center', 'type' => 'bool', 'callback' => 'printEntityActiveIcon', 'orderby' => false),
|
||||||
|
'manufacturers' => array('title' => $this->l('Manufacturers'), 'width' => 50, 'align' => 'center', 'type' => 'bool', 'callback' => 'printEntityActiveIcon', 'orderby' => false),
|
||||||
|
'suppliers' => array('title' => $this->l('Suppliers'), 'width' => 50, 'align' => 'center', 'type' => 'bool', 'callback' => 'printEntityActiveIcon', 'orderby' => false),
|
||||||
|
'scenes' => array('title' => $this->l('Scenes'), 'width' => 50, 'align' => 'center', 'type' => 'bool', 'callback' => 'printEntityActiveIcon', 'orderby' => false),
|
||||||
|
'stores' => array('title' => $this->l('Stores'), 'width' => 50, 'align' => 'center', 'type' => 'bool', 'callback' => 'printEntityActiveIcon', 'orderby' => false)
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->fields_options = array(
|
$this->fields_options = array(
|
||||||
@@ -372,6 +378,11 @@ class AdminImagesControllerCore extends AdminController
|
|||||||
parent::postProcess();
|
parent::postProcess();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function printEntityActiveIcon($value, $object)
|
||||||
|
{
|
||||||
|
return ($value ? '<img src="../img/admin/enabled.gif" />' : '<img src="../img/admin/disabled.gif" />');
|
||||||
|
}
|
||||||
|
|
||||||
protected function _childValidation()
|
protected function _childValidation()
|
||||||
{
|
{
|
||||||
if (!Tools::getValue('id_image_type') && Validate::isImageTypeName($typeName = Tools::getValue('name')) && ImageType::typeAlreadyExists($typeName))
|
if (!Tools::getValue('id_image_type') && Validate::isImageTypeName($typeName = Tools::getValue('name')) && ImageType::typeAlreadyExists($typeName))
|
||||||
|
|||||||
Reference in New Issue
Block a user