From 9abea64e993709dd985cfb1985c2ef449397c0b5 Mon Sep 17 00:00:00 2001 From: dMetzger Date: Tue, 25 Sep 2012 08:38:17 +0000 Subject: [PATCH] // 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 --- controllers/admin/AdminImagesController.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/controllers/admin/AdminImagesController.php b/controllers/admin/AdminImagesController.php index 5795e29bd..b6cc56793 100644 --- a/controllers/admin/AdminImagesController.php +++ b/controllers/admin/AdminImagesController.php @@ -41,9 +41,15 @@ class AdminImagesControllerCore extends AdminController $this->fields_list = array( '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), - '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( @@ -372,6 +378,11 @@ class AdminImagesControllerCore extends AdminController parent::postProcess(); } + public static function printEntityActiveIcon($value, $object) + { + return ($value ? '' : ''); + } + protected function _childValidation() { if (!Tools::getValue('id_image_type') && Validate::isImageTypeName($typeName = Tools::getValue('name')) && ImageType::typeAlreadyExists($typeName))