// Added HelperList, AdminAddressController, and fixed subtab display

This commit is contained in:
tDidierjean
2011-09-28 16:32:42 +00:00
parent 8d274c9cbf
commit ddc120205f
10 changed files with 1846 additions and 32 deletions
+27
View File
@@ -0,0 +1,27 @@
{*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision$
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{$list}
+26
View File
@@ -1 +1,27 @@
{*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision$
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{$content}
+110
View File
@@ -0,0 +1,110 @@
{*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision$
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{foreach $list AS $index => $tr}
<tr
{if $is_dnd_identifier}id="tr_{$id_category}_{$tr.$identifier}_{$tr.position}"{/if}
{if $index is odd}class="alt_row"{/if}
{if isset($tr.color) && $color_on_bg}style="background-color: {$tr.color}"{/if}
>
<td class="center">
{if $bulk_action}
<input type="checkbox" name="{$table}Box[]" value="$tr.$identifier" class="noborder" />
{/if}
</td>
{foreach $fields_display AS $key => $params}
<td
{if isset($params.position)}
id="td_{if $id_category}$id_category{else}0{/if}_{$tr.$identifier}"
{/if}
class="{if !$no_link}pointer{/if}
{if isset($params.position) && $order_by == 'position'} dragHandle{/if}
{if isset($params.align)} {$params.align}{/if}"
{if (!isset($params.position) && !$no_link)}
onclick="document.location = '{$current_index}&{$identifier}={$tr.$identifier}{if $view}&view{else}&update{/if}{$table}&token={$token}'">{if isset($params.prefix)}$params.prefix{/if}
{else}
>
{/if}
{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 $orderBy == 'position' && $orderWay != 'DESC'}
<a {if !($tr.$key.position != $positions[sizeof($positions) - 1])}style="display: none;"{/if} href="{$tr.$key.position_url_down}">
<img src="../img/admin/{if $orderWay == 'ASC'}down{else}up{/if}.gif"
alt="{l s='Down'}" title="{l s='Down'}" /></a>
<a {if !($tr.$key.position != $positions.0)}style="display: none;"{/if} href="{$tr.$key.position_url_up}">
<img src="../img/admin/{if $orderWay == 'ASC'}up{else}down{/if}.gif"
alt="{l s='Up'}" title="{l s='Up'}" /></a>';
{else}
{$tr.$key.position} + 1
{/if}
{elseif isset($params.image)}
{$tr.$key}
{*{elseif (isset($params.icon) && (isset($params['icon'][$tr[$key]]) || isset($params['icon']['default'])))}
<img src="../img/admin/{$tr.$key.icon_path}" alt="$tr.$key" title="$tr.$key" />*}
{elseif isset($params.price)}
{$tr.$key}
{elseif isset($params.float)}
{$tr.$key}
{elseif isset($params.type) && $params.type == 'date'}
{$tr.$key}
{elseif isset($params.type) && $params.type == 'datetime'}
{$tr.$key}
{elseif isset($tr.$key)}
{$tr.$key}
{else}
--
{/if}
{if isset($params.suffix)}$params.suffix{/if}
</td>
{/foreach}
{if $shop_link_type}
<td class="center" {if $name != $tr.shop_name}title="$tr.shop_name"{/if}>$tr.shop_short_name</td>
{/if}
{if $has_actions}
<td class="center" style="white-space: nowrap;">
{if isset($tr.view)}
{$tr.view}
{/if}
{if isset($tr.edit)}
{$tr.edit}
{/if}
{if isset($tr.delete)}
{$tr.delete}
{/if}
{if isset($tr.duplicate)}
{$tr.duplicate}
{/if}
</td>
{/if}
</tr>
{/foreach}
+41
View File
@@ -0,0 +1,41 @@
{*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision$
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
</table>
{*
if ($this->delete)
<p><input type="submit" class="button" name="submitDel'.$this->table.'" value="'.$this->l('Delete selection').'" onclick="return confirm(\''.$this->l('Delete selected items?', __CLASS__, TRUE, FALSE).'\');" /></p>
{/if}
*}
</td>
</tr>
</table>
<input type="hidden" name="token" value="{$token}" />
</form>
{*
if (isset($this->_includeTab) AND sizeof($this->_includeTab))
echo '<br /><br />';
*}
+170
View File
@@ -0,0 +1,170 @@
{*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision$
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<link href="../css/admin.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
$(document).ready(function() {
$('.filter').keypress(function(event){
//alert('submitFilterButton_{$table}');
//formSubmit(event, 'submitFilterButton{$table}')
})
});
</script>
{* Display column names and arrows for ordering (ASC, DESC) *}
{if $is_order_position}
<script type="text/javascript" src="../js/jquery/jquery.tablednd_0_5.js"></script>
<script type="text/javascript">
var token = '{$token}';
var come_from = '{$table}';
var alternate = {if $order_way == 'DESC'}'1'{else}'0'{/if};
</script>
<script type="text/javascript" src="../js/admin-dnd.js"></script>
{/if}
<a name="{$table}">&nbsp;</a>
<form method="post" action="{$action}" class="form">
<input type="hidden" id="submitFilter{$table}" name="submitFilter{$table}" value="0"/>
<table>
<tr>
<td style="vertical-align: bottom;">
<span style="float: left;">
{if $page > 1}
<input type="image" src="../img/admin/list-prev2.gif" onclick="getE(\'submitFilter{$table}\').value=1"/>&nbsp;
<input type="image" src="../img/admin/list-prev.gif" onclick="getE(\'submitFilter{$table}\').value={$page - 1}"/>
{/if}
{l s='Page '}<b>{$page}</b> / {$total_pages}
{if $page < $total_pages}
<input type="image" src="../img/admin/list-next.gif" onclick="getE(\'submitFilter{$table}\').value={$page + 1}"/>&nbsp;
<input type="image" src="../img/admin/list-next2.gif" onclick="getE(\'submitFilter{$table}'\').value={$total_pages}"/>
{/if}
| {l s='Display'}
<select name="pagination">
{* Choose number of results per page *}
{foreach $pagination AS $value}
<option value="{$value|intval}"{if $selected_pagination == $value} selected="selected" {elseif $selected_pagination == NULL && $value == $pagination[1]} selected="selected2"{/if}>{$value|intval}</option>
{/foreach}
</select>
/ {$list_total} {l s='result(s)'}
</span>
<span style="float: right;">
<input type="submit" name="submitReset{$table}" value="{l s='Reset'}" class="button" />
<input type="submit" id="submitFilterButton{$table}" name="submitFilter" value="{l s='Filter'}" class="button" />
</span>
<span class="clear"></span>
</td>
</tr>
<tr>
<td>
<table
{*(array_key_exists($this->identifier,$this->identifiersDnd) ? ' id="'.(((int)(Tools::getValue($this->identifiersDnd[$this->identifier], 1))) ? substr($this->identifier,3,strlen($this->identifier)) : '').'"' : '' )*}
class="table"
{*(array_key_exists($this->identifier,$this->identifiersDnd) AND ($this->_orderBy != 'position 'AND $this->_orderWay != 'DESC')) ? ' tableDnD' : '' ).'"*}
cellpadding="0" cellspacing="0">
<thead>
<tr class="nodrag nodrop">
<th>
{if $delete}
<input type="checkbox" name="checkme" class="noborder" onclick="checkDelBoxes(this.form, '{$table}Box[]', this.checked)" />
{/if}
</th>
{foreach $fields_display AS $key => $params}
<th {if isset($params.widthColumn)} style="width: {$params.widthColumn}px"{/if}>{$params.title}
{if !isset($params.orderby) || $params.orderby}
<br />
<a href="{$currentIndex}&{$identifier}={$id_cat}&{$table}Orderby={$key|urlencode}&{$table}Orderway=desc&token={$token}">
<img border="0" src="../img/admin/down{if isset($order_by) && ($key == $order_by) && ($order_way == 'DESC')}'_d'{/if}.gif" />
</a>
<a href="{$currentIndex}&{$identifier}={$id_cat}&{$table}Orderby={$key|urlencode}&{$table}Orderway=asc&token={$token}">
<img border="0" src="../img/admin/up{if isset($order_by) && ($key == $order_by) && ($order_way == 'ASC')}'_d'{/if}.gif" />
</a>
{/if}
</th>
{/foreach}
{if $shop_link_type}
<th style="width: 80px">
{if $shop_link_type == 'shop'}
{l s='shop'}
{else}
{l s='Group shop'}
{/if}
</th>
{/if}
{if $has_actions}
<th style="width: 52px">{l s='Actions'}</th>
{/if}
</tr>
<tr class="nodrag nodrop" style="height: 35px;">
<td class="center">
{if $delete}
--
{/if}
</td>
{* Filters (input, select, date or bool) *}
{foreach $fields_display AS $key => $params}
<td {if isset($params.align)} class="{$params.align}" {/if}>
{if isset($params.search) && !$params.search}
--
{else}
{if $params.type == 'bool'}
<select name="{$table}Filter_{$key}">
<option value="">--</option>
<option value="1" {if $params.value == 1} selected="selected" {/if}>{l s='Yes'}</option>
<option value="0" {if $params.value == 0 && $params.value != ''} selected="selected" {/if}>{l s='No'}</option>
</select>
{elseif $params.type == 'date' || $params.type == 'datetime'}
{*
{l s='From'} <input type="text" id="'.$nameId.'_0" name="'.$name.'[0]" value="'.(isset($value[0]) ? $value[0] : '').'"'.$width.' '.$keyPress.' /><br />
{l s='To'} <input type="text" id="'.$nameId.'_1" name="'.$name.'[1]" value="'.(isset($value[1]) ? $value[1] : '').'"'.$width.' '.$keyPress.' />
*}
{elseif $params.type == 'select'}
{if isset($params.filter_key)}
<select onchange="$('#submitFilter{$table}').focus();$('#submitFilter{$table}').click();" name="{$table}Filter_{$params.filter_key}" {if isset($params.width)} style="width:{$params.width}px"{/if}>
<option value="" {if $params.value == 0 && $params.value != ''} selected="selected" {/if}>--</option>
{if isset($params.select) && is_array($params.select)}
{foreach $params.select AS $option_value => $option_display}
<option value="{$option_value}" {if $option_display.selected == 'selected'} selected="selected"{/if}>{$option_display}</option>
{/foreach}
{/if}
</select>
{/if}
{else}
<input type="text" class="filter" name="{$table}Filter_{if isset($params.filter_key)}$params.filter_key{else}{$key}{/if}" value="{$params.value|escape:'htmlall':'UTF-8'}" {if isset($params.width)} style="width:{$params.width}px"{/if} />
{/if}
{/if}
</td>
{/foreach}
{if $shop_link_type}
<td>--</td>
{/if}
{if $has_actions}
<td class="center">--</td>
{/if}
</tr>
</thead>