// Add td_content block in list_content.tpl helper list

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13968 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie committed 2012-03-08 13:54:26 +00:00
1 parent aab9e2dedf
commit a6af3fd826
1 file changed
+66 -64
@@ -44,79 +44,81 @@
</td> </td>
{foreach $fields_display AS $key => $params} {foreach $fields_display AS $key => $params}
{block name="open_td"} {block name="open_td"}
<td <td
{if isset($params.position)} {if isset($params.position)}
id="td_{if $id_category}{$id_category}{else}0{/if}_{$tr.$identifier}" id="td_{if $id_category}{$id_category}{else}0{/if}_{$tr.$identifier}"
{/if} {/if}
class="{if !$no_link}pointer{/if} class="{if !$no_link}pointer{/if}
{if isset($params.position) && $order_by == 'position'} dragHandle{/if} {if isset($params.position) && $order_by == 'position'} dragHandle{/if}
{if isset($params.align)} {$params.align}{/if}" {if isset($params.align)} {$params.align}{/if}"
{if (!isset($params.position) && !$no_link && !isset($params.remove_onclick))} {if (!isset($params.position) && !$no_link && !isset($params.remove_onclick))}
onclick="document.location = '{$current_index}&{$identifier}={$tr.$identifier}{if $view}&view{else}&update{/if}{$table}&token={$token}'"> onclick="document.location = '{$current_index}&{$identifier}={$tr.$identifier}{if $view}&view{else}&update{/if}{$table}&token={$token}'">
{else} {else}
> >
{/if} {/if}
{/block} {/block}
{if isset($params.prefix)}{$params.prefix}{/if} {block name="td_content"}
{if isset($params.color) && isset($tr[$params.color])} {if isset($params.prefix)}{$params.prefix}{/if}
<span class="color_field" style="background-color: {$tr.color}"> {if isset($params.color) && isset($tr[$params.color])}
{/if} <span class="color_field" style="background-color: {$tr.color}">
{if isset($params.active)}
{$tr.$key}
{elseif isset($params.activeVisu)}
<img src="../img/admin/{if $tr.$key}enabled.gif{else}disabled.gif{/if}"
alt="{if $tr.$key}{l s='Enabled'}{else}{l s='Disabled'}{/if}" title="{if $tr.$key}{l s='Enabled'}{else}{l s='Disabled'}{/if}" />
{elseif isset($params.position)}
{if $order_by == 'position' && $order_way != 'DESC'}
<a href="{$tr.$key.position_url_down}" {if !($tr.$key.position != $positions[count($positions) - 1])}style="display: none;"{/if}>
<img src="../img/admin/{if $order_way == 'ASC'}down{else}up{/if}.gif" alt="{l s='Down'}" title="{l s='Down'}" />
</a>
<a href="{$tr.$key.position_url_up}" {if !($tr.$key.position != $positions.0)}style="display: none;"{/if}>
<img src="../img/admin/{if $order_way == 'ASC'}up{else}down{/if}.gif" alt="{l s='Up'}" title="{l s='Up'}" />
</a>
{else}
{$tr.$key.position + 1}
{/if} {/if}
{elseif isset($params.image)}
{$tr.$key} {if isset($params.active)}
{elseif isset($params.icon)} {$tr.$key}
<img src="../img/admin/{$tr[$key]}" alt="{$tr[$key]}" title="{$tr[$key]}" /> {elseif isset($params.activeVisu)}
{elseif isset($params.price)} <img src="../img/admin/{if $tr.$key}enabled.gif{else}disabled.gif{/if}"
{$tr.$key} alt="{if $tr.$key}{l s='Enabled'}{else}{l s='Disabled'}{/if}" title="{if $tr.$key}{l s='Enabled'}{else}{l s='Disabled'}{/if}" />
{elseif isset($params.float)} {elseif isset($params.position)}
{$tr.$key} {if $order_by == 'position' && $order_way != 'DESC'}
{elseif isset($params.type) && $params.type == 'date'} <a href="{$tr.$key.position_url_down}" {if !($tr.$key.position != $positions[count($positions) - 1])}style="display: none;"{/if}>
{$tr.$key} <img src="../img/admin/{if $order_way == 'ASC'}down{else}up{/if}.gif" alt="{l s='Down'}" title="{l s='Down'}" />
{elseif isset($params.type) && $params.type == 'datetime'} </a>
{$tr.$key}
{elseif isset($params.type) && $params.type == 'decimal'} <a href="{$tr.$key.position_url_up}" {if !($tr.$key.position != $positions.0)}style="display: none;"{/if}>
{$tr.$key|string_format:"%.2f"} <img src="../img/admin/{if $order_way == 'ASC'}up{else}down{/if}.gif" alt="{l s='Up'}" title="{l s='Up'}" />
{elseif isset($params.type) && $params.type == 'percent'} </a>
{$tr.$key} {l s='%'} {else}
{* If type is 'editable', an input is created *} {$tr.$key.position + 1}
{elseif isset($params.type) && $params.type == 'editable' && isset($tr.id)} {/if}
<input type="text" name="{$key}_{$tr.id}" value="{$tr.$key|htmlentities}" class="{$key}" /> {elseif isset($params.image)}
{elseif isset($params.callback)} {$tr.$key}
{$tr.$key} {elseif isset($params.icon)}
{elseif isset($tr.$key) && $key == 'color'} <img src="../img/admin/{$tr[$key]}" alt="{$tr[$key]}" title="{$tr[$key]}" />
<div style="float: left; width: 18px; height: 12px; border: 1px solid #996633; background-color: {$tr.$key}; margin-right: 4px;"></div> {elseif isset($params.price)}
{elseif isset($tr.$key)} {$tr.$key}
{if isset($params.maxlength) && Tools::strlen($tr.$key) > $params.maxlength} {elseif isset($params.float)}
<span title="{$tr.$key|escape:'htmlall':'UTF-8'}">{$tr.$key|truncate:$params.maxlength:'...'|escape:'htmlall':'UTF-8'}</span> {$tr.$key}
{elseif isset($params.type) && $params.type == 'date'}
{$tr.$key}
{elseif isset($params.type) && $params.type == 'datetime'}
{$tr.$key}
{elseif isset($params.type) && $params.type == 'decimal'}
{$tr.$key|string_format:"%.2f"}
{elseif isset($params.type) && $params.type == 'percent'}
{$tr.$key} {l s='%'}
{* If type is 'editable', an input is created *}
{elseif isset($params.type) && $params.type == 'editable' && isset($tr.id)}
<input type="text" name="{$key}_{$tr.id}" value="{$tr.$key|htmlentities}" class="{$key}" />
{elseif isset($params.callback)}
{$tr.$key}
{elseif isset($tr.$key) && $key == 'color'}
<div style="float: left; width: 18px; height: 12px; border: 1px solid #996633; background-color: {$tr.$key}; margin-right: 4px;"></div>
{elseif isset($tr.$key)}
{if 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}
{$tr.$key|escape:'htmlall':'UTF-8'}
{/if}
{else} {else}
{$tr.$key|escape:'htmlall':'UTF-8'} {block name="default_field_block"}--{/block}
{/if} {/if}
{else} {if isset($params.suffix)}{$params.suffix}{/if}
{block name="default_field_block"}--{/block} {if isset($params.color) && isset($tr.color)}
{/if} </span>
{if isset($params.suffix)}{$params.suffix}{/if} {/if}
{if isset($params.color) && isset($tr.color)} </td>
</span> {/block}
{/if}
</td>
{/foreach} {/foreach}
{if $shop_link_type} {if $shop_link_type}