// list icon backward compat
This commit is contained in:
@@ -59,7 +59,7 @@
|
||||
{block name="td_content"}
|
||||
{if isset($params.prefix)}{$params.prefix}{/if}
|
||||
{if isset($params.color) && isset($tr[$params.color])}
|
||||
<span class="label color_field" style="font-size:100%;background-color:{$tr[$params.color]};color:{if Tools::getBrightness($tr[$params.color]) < 128}white{else}#383838{/if}">
|
||||
<span class="label color_field" style="background-color:{$tr[$params.color]};color:{if Tools::getBrightness($tr[$params.color]) < 128}white{else}#383838{/if}">
|
||||
{/if}
|
||||
{if isset($tr.$key)}
|
||||
{if isset($params.active)}
|
||||
@@ -87,7 +87,11 @@
|
||||
{$tr.$key}
|
||||
{elseif isset($params.icon)}
|
||||
{if is_array($tr[$key])}
|
||||
<img src="../img/admin/{$tr[$key]['src']}" alt="{$tr[$key]['alt']}" title="{$tr[$key]['alt']}" />
|
||||
{if isset($tr[$key]['class'])}
|
||||
<i class="{$tr[$key]['class']}"></i>
|
||||
{else}
|
||||
<img src="../img/admin/{$tr[$key]['src']}" alt="{$tr[$key]['alt']}" title="{$tr[$key]['alt']}" />
|
||||
{/if}
|
||||
{/if}
|
||||
{elseif isset($params.price)}
|
||||
{$tr.$key}
|
||||
@@ -107,7 +111,7 @@
|
||||
{elseif isset($params.callback)}
|
||||
{$tr.$key}
|
||||
{elseif $key == 'color'}
|
||||
<div style="float: left; width: 18px; height: 12px; border: 1px solid #996633; background-color: {$tr.$key}; margin-right: 4px;"></div>
|
||||
<div style="background-color: {$tr.$key}"></div>
|
||||
{elseif isset($params.maxlength) && Tools::strlen($tr.$key) > $params.maxlength}
|
||||
<span title="{$tr.$key|escape:'htmlall':'UTF-8'}">{$tr.$key|truncate:$params.maxlength:'...'|escape:'htmlall':'UTF-8'}</span>
|
||||
{else}
|
||||
@@ -132,7 +136,8 @@
|
||||
{$tr.shop_short_name}
|
||||
{else}
|
||||
{$tr.shop_name}
|
||||
{/if}</td>
|
||||
{/if}
|
||||
</td>
|
||||
{/if}
|
||||
{if $has_actions}
|
||||
<td class="text-right">
|
||||
|
||||
@@ -1846,6 +1846,7 @@ class AdminControllerCore extends Controller
|
||||
$helper->position_identifier = $this->position_identifier;
|
||||
$helper->controller_name = $this->controller_name;
|
||||
$helper->list_id = isset($this->list_id) ? $this->list_id : $this->table;
|
||||
$helper->bootstrap = $this->bootstrap;
|
||||
|
||||
// For each action, try to add the corresponding skip elements list
|
||||
$helper->list_skip_actions = $this->list_skip_actions;
|
||||
|
||||
@@ -36,6 +36,7 @@ class HelperCore
|
||||
public $show_toolbar = true;
|
||||
public $context;
|
||||
public $toolbar_scroll = false;
|
||||
public $bootstrap = false;
|
||||
|
||||
/**
|
||||
* @var Module
|
||||
|
||||
@@ -266,16 +266,24 @@ class HelperListCore extends Helper
|
||||
}
|
||||
elseif (isset($params['icon']) && isset($tr[$key]) && (isset($params['icon'][$tr[$key]]) || isset($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'],
|
||||
);
|
||||
if (!$this->bootstrap)
|
||||
{
|
||||
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
|
||||
$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'],
|
||||
);
|
||||
if (isset($params['icon'][$tr[$key]]))
|
||||
$this->_list[$index][$key] = array(
|
||||
'class' => $params['icon'][$tr[$key]],
|
||||
);
|
||||
}
|
||||
elseif (isset($params['type']) && $params['type'] == 'float')
|
||||
$this->_list[$index][$key] = rtrim(rtrim($tr[$key], '0'), '.');
|
||||
|
||||
Reference in New Issue
Block a user