[-] 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'))
$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(
'id_address' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
'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.')';
$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();
}
@@ -51,12 +51,12 @@ class AdminAttributesGroupsControllerCore extends AdminController
'count_values' => array(
'title' => $this->l('Values count'),
'width' => 120,
'align' => 'center'
'align' => 'center',
),
'position' => array(
'title' => $this->l('Position'),
'width' => 40,
'filter_key' => 'cp!position',
'filter_key' => 'a!position',
'position' => 'position',
'align' => 'center'
),
@@ -95,7 +95,7 @@ class AdminCarriersControllerCore extends AdminController
'position' => array(
'title' => $this->l('Position'),
'width' => 40,
'filter_key' => 'cp!position',
'filter_key' => 'a!position',
'align' => 'center',
'position' => 'position'
)
@@ -66,7 +66,7 @@ class AdminCategoriesControllerCore extends AdminController
'position' => array(
'title' => $this->l('Position'),
'width' => 40,
'filter_key' => 'position',
'filter_key' => 'cs!position',
'align' => 'center',
'position' => 'position'
),
@@ -130,7 +130,8 @@ class AdminCustomersControllerCore extends AdminController
'title' => $this->l('Connection'),
'width' => 100,
'type' => 'datetime',
'search' => false
'search' => false,
'havingFilter' => true
)
);
@@ -51,7 +51,7 @@ class AdminFeaturesControllerCore extends AdminController
'position' => array(
'title' => $this->l('Position'),
'width' => 40,
'filter_key' => 'cp!position',
'filter_key' => 'a!position',
'align' => 'center',
'position' => 'position'
)
@@ -53,7 +53,7 @@ class AdminGroupShopControllerCore extends AdminController
'name' => array(
'title' => $this->l('Group shop'),
'width' => 'auto',
'filter_key' => 'b!name',
'filter_key' => 'a!name',
),
'active' => array(
'title' => $this->l('Enabled'),
@@ -67,13 +67,13 @@ class AdminManufacturersControllerCore extends AdminController
),
'addresses' => array(
'title' => $this->l('Addresses'),
'tmpTableFilter' => true,
'width' => 20,
'align' => 'center',
'havingFilter' => true
),
'products' => array(
'title' => $this->l('Products'),
'tmpTableFilter' => true,
'havingFilter' => true,
'width' => 20,
'align' => 'center',
),
@@ -60,7 +60,8 @@ class AdminOutstandingControllerCore extends AdminController
'title' => $this->l('Date'),
'width' => 150,
'type' => 'date',
'align' => 'right'
'align' => 'right',
'filter_key' => 'a!date_add'
),
'customer' => array(
'title' => $this->l('Customer'),
+5 -3
View File
@@ -43,15 +43,17 @@ class AdminShopControllerCore extends AdminController
'name' => array(
'title' => $this->l('Shop'),
'width' => 'auto',
'filter_key' => 'b!name'
'filter_key' => 'a!name'
),
'group_shop_name' => array(
'title' => $this->l('Group Shop'),
'width' => 150
'width' => 150,
'filter_key' => 'gs!name'
),
'category_name' => array(
'title' => $this->l('Category Root'),
'width' => 150
'width' => 150,
'filter_key' => 'cl!name'
),
'active' => array(
'title' => $this->l('Enabled'),
+4 -2
View File
@@ -47,7 +47,8 @@ class AdminShopUrlControllerCore extends AdminController
),
'shop_name' => array(
'title' => $this->l('Shop name'),
'width' => 150
'width' => 150,
'filter_key' => 's!name'
),
'domain' => array(
'title' => $this->l('Domain'),
@@ -62,7 +63,8 @@ class AdminShopUrlControllerCore extends AdminController
'uri' => array(
'title' => $this->l('Uri'),
'width' => 200,
'filter_key' => 'uri'
'filter_key' => 'uri',
'havingFilter' => true
),
'main' => array(
'title' => $this->l('Main URL'),
@@ -61,22 +61,27 @@ class AdminSpecificPriceRuleControllerCore extends AdminController
),
'name' => array(
'title' => $this->l('Name'),
'filter_key' => 'a!name',
'width' => 200
),
'shop_name' => array(
'title' => $this->l('Shop')
'title' => $this->l('Shop'),
'filter_key' => 's!name'
),
'currency_name' => array(
'title' => $this->l('Currency'),
'align' => 'center',
'filter_key' => 'cu!name'
),
'country_name' => array(
'title' => $this->l('Country'),
'align' => 'center',
'filter_key' => 'cl!name'
),
'group_name' => array(
'title' => $this->l('Group'),
'align' => 'center',
'filter_key' => 'gl!name'
),
'from_quantity' => array(
'title' => $this->l('From quantity'),
@@ -97,6 +102,7 @@ class AdminSpecificPriceRuleControllerCore extends AdminController
'from' => array(
'title' => $this->l('From'),
'align' => 'center',
'type' => 'date'
),
'to' => array(
'title' => $this->l('To'),