diff --git a/classes/helper/HelperList.php b/classes/helper/HelperList.php index a6fa73999..1b1bc40f3 100644 --- a/classes/helper/HelperList.php +++ b/classes/helper/HelperList.php @@ -281,7 +281,18 @@ class HelperListCore extends Helper $this->_list[$index][$key] = ImageManager::thumbnail($path_to_image, $this->table.'_mini_'.$item_id.'.'.$this->imageType, 45, $this->imageType); } else if (isset($params['icon']) && (isset($params['icon'][$tr[$key]]) || isset($params['icon']['default']))) - $this->_list[$index][$key] = isset($params['icon'][$tr[$key]]) ? $params['icon'][$tr[$key]] : $params['icon']['default']; + { + if (isset($params['icon'][$tr[$key]]) && is_array($params['icon'][$tr[$key]])) + $this->_list[$index][$key] = array( + 'src' => $params['icon'][$tr[$key]]['src'], + 'alt' => $params['icon'][$tr[$key]]['alt'], + ); + else + $this->_list[$index][$key] = array( + 'src' => isset($params['icon'][$tr[$key]]) ? $params['icon'][$tr[$key]] : $params['icon']['default'], + 'alt' => isset($params['icon'][$tr[$key]]) ? $params['icon'][$tr[$key]] : $params['icon']['default'], + ); + } else if (isset($params['float'])) $this->_list[$index][$key] = rtrim(rtrim($tr[$key], '0'), '.'); else if (isset($params['type']) && $params['type'] == 'price') diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php index 0c0c44a41..c7cc0542f 100755 --- a/controllers/admin/AdminOrdersController.php +++ b/controllers/admin/AdminOrdersController.php @@ -63,17 +63,75 @@ class AdminOrdersControllerCore extends AdminController $statuses_array[$status['id_order_state']] = $status['name']; $this->fieldsDisplay = array( - 'id_order' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), - 'reference' => array('title' => $this->l('Reference'), 'align' => 'center', 'width' => 65), - 'new' => array('title' => $this->l('New'), 'width' => 25, 'align' => 'center', 'type' => 'bool', - 'filter_key' => 'new', 'tmpTableFilter' => true, 'icon' => array(0 => 'blank.gif', 1 => 'news-new.gif'), 'orderby' => false), - 'customer' => array('title' => $this->l('Customer'), 'filter_key' => 'customer', 'tmpTableFilter' => true), - 'total_paid_tax_incl' => array('title' => $this->l('Total'), 'width' => 70, 'align' => 'right', 'prefix' => '', 'suffix' => '', 'type' => 'price', 'currency' => true), - 'payment' => array('title' => $this->l('Payment'), 'width' => 100), - 'osname' => array('title' => $this->l('Status'), 'color' => 'color', 'width' => 280, 'type' => 'select', - 'list' => $statuses_array, 'filter_key' => 'os!id_order_state', 'filter_type' => 'int'), - 'date_add' => array('title' => $this->l('Date'), 'width' => 130, 'align' => 'right', 'type' => 'datetime', 'filter_key' => 'a!date_add'), - 'id_pdf' => array('title' => $this->l('PDF'), 'width' => 35, 'align' => 'center', 'callback' => 'printPDFIcons', 'orderby' => false, 'search' => false, 'remove_onclick' => true)); + 'id_order' => array( + 'title' => $this->l('ID'), + 'align' => 'center', + 'width' => 25 + ), + 'reference' => array( + 'title' => $this->l('Reference'), + 'align' => 'center', + 'width' => 65 + ), + 'new' => array( + 'title' => $this->l('New'), + 'width' => 25, + 'align' => 'center', + 'type' => 'bool', + 'filter_key' => 'new', + 'tmpTableFilter' => true, + 'icon' => array( + 0 => 'blank.gif', + 1 => array( + 'src' => 'news-new.gif', + 'alt' => $this->l('First customer order'), + ) + ), + 'orderby' => false + ), + 'customer' => array( + 'title' => $this->l('Customer'), + 'filter_key' => 'customer', + 'tmpTableFilter' => true + ), + 'total_paid_tax_incl' => array( + 'title' => $this->l('Total'), + 'width' => 70, + 'align' => 'right', + 'prefix' => '', + 'suffix' => '', + 'type' => 'price', + 'currency' => true + ), + 'payment' => array( + 'title' => $this->l('Payment'), + 'width' => 100 + ), + 'osname' => array( + 'title' => $this->l('Status'), + 'color' => 'color', + 'width' => 280, + 'type' => 'select', + 'list' => $statuses_array, + 'filter_key' => 'os!id_order_state', + 'filter_type' => 'int' + ), + 'date_add' => array( + 'title' => $this->l('Date'), + 'width' => 130, + 'align' => 'right', + 'type' => 'datetime', + 'filter_key' => 'a!date_add' + ), + 'id_pdf' => array( + 'title' => $this->l('PDF'), + 'width' => 35, + 'align' => 'center', + 'callback' => 'printPDFIcons', + 'orderby' => false, + 'search' => false, + 'remove_onclick' => true) + ); $this->shopLinkType = 'shop'; $this->shopShareDatas = Shop::SHARE_ORDER; diff --git a/translations/fr/admin.php b/translations/fr/admin.php index 109e06424..86634803b 100644 --- a/translations/fr/admin.php +++ b/translations/fr/admin.php @@ -2012,6 +2012,7 @@ $_LANGADM['AdminOrders034d2690db87b737dd810afccbe41b7a'] = 'Créer une commande' $_LANGADM['AdminOrders03ab340b3f99e03cff9e84314ead38c0'] = 'Qté'; $_LANGADM['AdminOrders03c2e7e41ffc181a4e84080b4710e81e'] = 'Nouveau'; $_LANGADM['AdminOrders044083ab9d382e5bed8c049f601c509d'] = 'Aucun bon trouvé'; +$_LANGADM['AdminOrders06218411415e79be5c93e529adf6d2b1'] = 'Première commande du client'; $_LANGADM['AdminOrders068f80c7519d0528fb08e82137a72131'] = 'Produits'; $_LANGADM['AdminOrders06933067aafd48425d67bcb01bba5cb6'] = 'Mettre à jour'; $_LANGADM['AdminOrders074d20a3d8b933b677a76337a81df873'] = 'Numéro de carte :';