diff --git a/admin-dev/themes/default/template/helper/list/list_content.tpl b/admin-dev/themes/default/template/helper/list/list_content.tpl index 98e40a89f..1fb535439 100644 --- a/admin-dev/themes/default/template/helper/list/list_content.tpl +++ b/admin-dev/themes/default/template/helper/list/list_content.tpl @@ -101,7 +101,11 @@ {elseif isset($tr.$key) && $key == 'color'}
{elseif isset($tr.$key)} - {$tr.$key|escape:'htmlall':'UTF-8'} + {if isset($params.maxlength) && Tools::strlen($tr.$key) > $params.maxlength} + {$tr.$key|truncate:$params.maxlength:'...'|escape:'htmlall':'UTF-8'} + {else} + {$tr.$key|escape:'htmlall':'UTF-8'} + {/if} {else} -- {/if} diff --git a/classes/helper/HelperList.php b/classes/helper/HelperList.php index 0eb83cbde..f77e2f3e1 100644 --- a/classes/helper/HelperList.php +++ b/classes/helper/HelperList.php @@ -295,13 +295,7 @@ class HelperListCore extends Helper $this->_list[$index][$key] = Tools::displayDate($tr[$key], $this->context->language->id, true); else if (isset($tr[$key])) { - if ($key == 'price') - $echo = round($tr[$key], 2); - else if (isset($params['maxlength']) && Tools::strlen($tr[$key]) > $params['maxlength']) - $echo = ''.Tools::substr($tr[$key], 0, $params['maxlength']).'...'; - else - $echo = $tr[$key]; - + $echo = $tr[$key]; if (isset($params['callback'])) { $callback_obj = (isset($params['callback_object'])) ? $params['callback_object'] : $this->context->controller; diff --git a/controllers/admin/AdminCustomerThreadsController.php b/controllers/admin/AdminCustomerThreadsController.php index e5221c6d1..55857d934 100644 --- a/controllers/admin/AdminCustomerThreadsController.php +++ b/controllers/admin/AdminCustomerThreadsController.php @@ -111,7 +111,7 @@ class AdminCustomerThreadsControllerCore extends AdminController 'width' => 50, 'filter_key' => 'messages', 'tmpTableFilter' => true, - 'maxlength' => 0 + 'maxlength' => 40 ), 'date_upd' => array( 'title' => $this->l('Last message'),