[-] BO: Fix some listing filters bug

This commit is contained in:
rGaillard
2012-02-09 16:56:17 +00:00
parent 4d05bf8fa7
commit b1ddbcbba1
12 changed files with 32 additions and 20 deletions
@@ -48,6 +48,10 @@ class AdminAddressesControllerCore extends AdminController
if (!Tools::getValue('realedit')) if (!Tools::getValue('realedit'))
$this->deleted = true; $this->deleted = true;
$countries = Country::getCountries($this->context->language->id);
foreach ($countries as $country)
$this->countries_array[$country['id_country']] = $country['name'];
$this->fieldsDisplay = array( $this->fieldsDisplay = array(
'id_address' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), 'id_address' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
'firstname' => array('title' => $this->l('First name'), 'width' => 120, 'filter_key' => 'a!firstname'), 'firstname' => array('title' => $this->l('First name'), 'width' => 120, 'filter_key' => 'a!firstname'),
@@ -67,10 +71,6 @@ class AdminAddressesControllerCore extends AdminController
LEFT JOIN `'._DB_PREFIX_.'country_lang` cl ON (cl.`id_country` = a.`id_country` AND cl.`id_lang` = '.(int)$this->context->language->id.')'; LEFT JOIN `'._DB_PREFIX_.'country_lang` cl ON (cl.`id_country` = a.`id_country` AND cl.`id_lang` = '.(int)$this->context->language->id.')';
$this->_where = 'AND a.id_customer != 0'; $this->_where = 'AND a.id_customer != 0';
$countries = Country::getCountries($this->context->language->id);
foreach ($countries as $country)
$this->countries_array[$country['id_country']] = $country['name'];
return parent::renderList(); return parent::renderList();
} }
@@ -51,12 +51,12 @@ class AdminAttributesGroupsControllerCore extends AdminController
'count_values' => array( 'count_values' => array(
'title' => $this->l('Values count'), 'title' => $this->l('Values count'),
'width' => 120, 'width' => 120,
'align' => 'center' 'align' => 'center',
), ),
'position' => array( 'position' => array(
'title' => $this->l('Position'), 'title' => $this->l('Position'),
'width' => 40, 'width' => 40,
'filter_key' => 'cp!position', 'filter_key' => 'a!position',
'position' => 'position', 'position' => 'position',
'align' => 'center' 'align' => 'center'
), ),
@@ -95,7 +95,7 @@ class AdminCarriersControllerCore extends AdminController
'position' => array( 'position' => array(
'title' => $this->l('Position'), 'title' => $this->l('Position'),
'width' => 40, 'width' => 40,
'filter_key' => 'cp!position', 'filter_key' => 'a!position',
'align' => 'center', 'align' => 'center',
'position' => 'position' 'position' => 'position'
) )
@@ -66,7 +66,7 @@ class AdminCategoriesControllerCore extends AdminController
'position' => array( 'position' => array(
'title' => $this->l('Position'), 'title' => $this->l('Position'),
'width' => 40, 'width' => 40,
'filter_key' => 'position', 'filter_key' => 'cs!position',
'align' => 'center', 'align' => 'center',
'position' => 'position' 'position' => 'position'
), ),
@@ -130,7 +130,8 @@ class AdminCustomersControllerCore extends AdminController
'title' => $this->l('Connection'), 'title' => $this->l('Connection'),
'width' => 100, 'width' => 100,
'type' => 'datetime', 'type' => 'datetime',
'search' => false 'search' => false,
'havingFilter' => true
) )
); );
@@ -51,7 +51,7 @@ class AdminFeaturesControllerCore extends AdminController
'position' => array( 'position' => array(
'title' => $this->l('Position'), 'title' => $this->l('Position'),
'width' => 40, 'width' => 40,
'filter_key' => 'cp!position', 'filter_key' => 'a!position',
'align' => 'center', 'align' => 'center',
'position' => 'position' 'position' => 'position'
) )
@@ -53,7 +53,7 @@ class AdminGroupShopControllerCore extends AdminController
'name' => array( 'name' => array(
'title' => $this->l('Group shop'), 'title' => $this->l('Group shop'),
'width' => 'auto', 'width' => 'auto',
'filter_key' => 'b!name', 'filter_key' => 'a!name',
), ),
'active' => array( 'active' => array(
'title' => $this->l('Enabled'), 'title' => $this->l('Enabled'),
@@ -67,13 +67,13 @@ class AdminManufacturersControllerCore extends AdminController
), ),
'addresses' => array( 'addresses' => array(
'title' => $this->l('Addresses'), 'title' => $this->l('Addresses'),
'tmpTableFilter' => true,
'width' => 20, 'width' => 20,
'align' => 'center', 'align' => 'center',
'havingFilter' => true
), ),
'products' => array( 'products' => array(
'title' => $this->l('Products'), 'title' => $this->l('Products'),
'tmpTableFilter' => true, 'havingFilter' => true,
'width' => 20, 'width' => 20,
'align' => 'center', 'align' => 'center',
), ),
@@ -60,7 +60,8 @@ class AdminOutstandingControllerCore extends AdminController
'title' => $this->l('Date'), 'title' => $this->l('Date'),
'width' => 150, 'width' => 150,
'type' => 'date', 'type' => 'date',
'align' => 'right' 'align' => 'right',
'filter_key' => 'a!date_add'
), ),
'customer' => array( 'customer' => array(
'title' => $this->l('Customer'), 'title' => $this->l('Customer'),
+5 -3
View File
@@ -43,15 +43,17 @@ class AdminShopControllerCore extends AdminController
'name' => array( 'name' => array(
'title' => $this->l('Shop'), 'title' => $this->l('Shop'),
'width' => 'auto', 'width' => 'auto',
'filter_key' => 'b!name' 'filter_key' => 'a!name'
), ),
'group_shop_name' => array( 'group_shop_name' => array(
'title' => $this->l('Group Shop'), 'title' => $this->l('Group Shop'),
'width' => 150 'width' => 150,
'filter_key' => 'gs!name'
), ),
'category_name' => array( 'category_name' => array(
'title' => $this->l('Category Root'), 'title' => $this->l('Category Root'),
'width' => 150 'width' => 150,
'filter_key' => 'cl!name'
), ),
'active' => array( 'active' => array(
'title' => $this->l('Enabled'), 'title' => $this->l('Enabled'),
+4 -2
View File
@@ -47,7 +47,8 @@ class AdminShopUrlControllerCore extends AdminController
), ),
'shop_name' => array( 'shop_name' => array(
'title' => $this->l('Shop name'), 'title' => $this->l('Shop name'),
'width' => 150 'width' => 150,
'filter_key' => 's!name'
), ),
'domain' => array( 'domain' => array(
'title' => $this->l('Domain'), 'title' => $this->l('Domain'),
@@ -62,7 +63,8 @@ class AdminShopUrlControllerCore extends AdminController
'uri' => array( 'uri' => array(
'title' => $this->l('Uri'), 'title' => $this->l('Uri'),
'width' => 200, 'width' => 200,
'filter_key' => 'uri' 'filter_key' => 'uri',
'havingFilter' => true
), ),
'main' => array( 'main' => array(
'title' => $this->l('Main URL'), 'title' => $this->l('Main URL'),
@@ -61,22 +61,27 @@ class AdminSpecificPriceRuleControllerCore extends AdminController
), ),
'name' => array( 'name' => array(
'title' => $this->l('Name'), 'title' => $this->l('Name'),
'filter_key' => 'a!name',
'width' => 200 'width' => 200
), ),
'shop_name' => array( 'shop_name' => array(
'title' => $this->l('Shop') 'title' => $this->l('Shop'),
'filter_key' => 's!name'
), ),
'currency_name' => array( 'currency_name' => array(
'title' => $this->l('Currency'), 'title' => $this->l('Currency'),
'align' => 'center', 'align' => 'center',
'filter_key' => 'cu!name'
), ),
'country_name' => array( 'country_name' => array(
'title' => $this->l('Country'), 'title' => $this->l('Country'),
'align' => 'center', 'align' => 'center',
'filter_key' => 'cl!name'
), ),
'group_name' => array( 'group_name' => array(
'title' => $this->l('Group'), 'title' => $this->l('Group'),
'align' => 'center', 'align' => 'center',
'filter_key' => 'gl!name'
), ),
'from_quantity' => array( 'from_quantity' => array(
'title' => $this->l('From quantity'), 'title' => $this->l('From quantity'),
@@ -97,6 +102,7 @@ class AdminSpecificPriceRuleControllerCore extends AdminController
'from' => array( 'from' => array(
'title' => $this->l('From'), 'title' => $this->l('From'),
'align' => 'center', 'align' => 'center',
'type' => 'date'
), ),
'to' => array( 'to' => array(
'title' => $this->l('To'), 'title' => $this->l('To'),