// fix list callback
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9955 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
+8
-15
@@ -149,7 +149,6 @@ class HelperListCore extends Helper
|
|||||||
|
|
||||||
$this->_list = $list;
|
$this->_list = $list;
|
||||||
$this->fieldsDisplay = $fields_display;
|
$this->fieldsDisplay = $fields_display;
|
||||||
|
|
||||||
/* Display list header (filtering, pagination and column names) */
|
/* Display list header (filtering, pagination and column names) */
|
||||||
$tpl_vars['header'] = $this->displayListHeader();
|
$tpl_vars['header'] = $this->displayListHeader();
|
||||||
/* Show the content of the table */
|
/* Show the content of the table */
|
||||||
@@ -185,7 +184,6 @@ class HelperListCore extends Helper
|
|||||||
|
|
||||||
public function displayListContent($token = null)
|
public function displayListContent($token = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($this->is_dnd_identifier)
|
if ($this->is_dnd_identifier)
|
||||||
$id_category = (int)Tools::getValue('id_'.($this->is_cms ? 'cms_' : '').'category', '1');
|
$id_category = (int)Tools::getValue('id_'.($this->is_cms ? 'cms_' : '').'category', '1');
|
||||||
else
|
else
|
||||||
@@ -227,7 +225,6 @@ class HelperListCore extends Helper
|
|||||||
|
|
||||||
// @todo skip action for bulk actions
|
// @todo skip action for bulk actions
|
||||||
// $this->_list[$index]['has_bulk_actions'] = true;
|
// $this->_list[$index]['has_bulk_actions'] = true;
|
||||||
|
|
||||||
foreach ($this->fieldsDisplay as $key => $params)
|
foreach ($this->fieldsDisplay as $key => $params)
|
||||||
{
|
{
|
||||||
$tmp = explode('!', $key);
|
$tmp = explode('!', $key);
|
||||||
@@ -281,18 +278,15 @@ class HelperListCore extends Helper
|
|||||||
$this->_list[$index][$key] = isset($params['icon'][$tr[$key]]) ? $params['icon'][$tr[$key]] : $params['icon']['default'];
|
$this->_list[$index][$key] = isset($params['icon'][$tr[$key]]) ? $params['icon'][$tr[$key]] : $params['icon']['default'];
|
||||||
elseif (isset($params['float']))
|
elseif (isset($params['float']))
|
||||||
$this->_list[$index][$key] = rtrim(rtrim($tr[$key], '0'), '.');
|
$this->_list[$index][$key] = rtrim(rtrim($tr[$key], '0'), '.');
|
||||||
elseif (isset($params['type']))
|
elseif (isset($params['type']) && $params['type'] == 'price')
|
||||||
{
|
{
|
||||||
if ($params['type'] == 'price')
|
$currency = isset($params['currency']) ? Currency::getCurrencyInstance($tr['id_currency']) : $this->context->currency;
|
||||||
{
|
$this->_list[$index][$key] = Tools::displayPrice($tr[$key], $currency, false);
|
||||||
$currency = isset($params['currency']) ? Currency::getCurrencyInstance($tr['id_currency']) : $this->context->currency;
|
|
||||||
$this->_list[$index][$key] = Tools::displayPrice($tr[$key], $currency, false);
|
|
||||||
}
|
|
||||||
elseif ($params['type'] == 'date')
|
|
||||||
$this->_list[$index][$key] = Tools::displayDate($tr[$key], $this->context->language->id);
|
|
||||||
elseif ($params['type'] == 'datetime')
|
|
||||||
$this->_list[$index][$key] = Tools::displayDate($tr[$key], $this->context->language->id, true);
|
|
||||||
}
|
}
|
||||||
|
elseif (isset($params['type']) && $params['type'] == 'date')
|
||||||
|
$this->_list[$index][$key] = Tools::displayDate($tr[$key], $this->context->language->id);
|
||||||
|
elseif (isset($params['type']) && $params['type'] == 'datetime')
|
||||||
|
$this->_list[$index][$key] = Tools::displayDate($tr[$key], $this->context->language->id, true);
|
||||||
elseif (isset($tr[$key]))
|
elseif (isset($tr[$key]))
|
||||||
{
|
{
|
||||||
if ($key == 'price')
|
if ($key == 'price')
|
||||||
@@ -555,12 +549,11 @@ class HelperListCore extends Helper
|
|||||||
case 'text':
|
case 'text':
|
||||||
if (!Validate::isCleanHtml($value))
|
if (!Validate::isCleanHtml($value))
|
||||||
$value = '';
|
$value = '';
|
||||||
|
|
||||||
}
|
}
|
||||||
$params['value'] = $value;
|
$params['value'] = $value;
|
||||||
$this->fieldsDisplay[$key] = $params;
|
$this->fieldsDisplay[$key] = $params;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->header_tpl->assign(array_merge($this->tpl_vars, array(
|
$this->header_tpl->assign(array_merge($this->tpl_vars, array(
|
||||||
'table' => $this->table,
|
'table' => $this->table,
|
||||||
'currentIndex' => $this->currentIndex,
|
'currentIndex' => $this->currentIndex,
|
||||||
|
|||||||
Reference in New Issue
Block a user