first commit
This commit is contained in:
@@ -0,0 +1,143 @@
|
||||
{**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/OSL-3.0
|
||||
* 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 https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
||||
*}
|
||||
{extends file="helpers/form/form.tpl"}
|
||||
|
||||
{block name="label"}
|
||||
{if $input.name == 'zipcode' && isset($input.label)}
|
||||
<label id="zipcode-label" class="control-label col-lg-4">{$input.label}</label>
|
||||
{elseif $input.name == 'states[]'}
|
||||
<label id="states-label" class="control-label col-lg-4">{$input.label}</label>
|
||||
{else}
|
||||
{$smarty.block.parent}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
{block name="script"}
|
||||
$(document).ready(function() {
|
||||
$('#country').change(function() {
|
||||
populateStates($(this).val(), '');
|
||||
});
|
||||
|
||||
$('#id_tax_rules_group').clone().attr('id', '').insertAfter('#id_tax_rule');
|
||||
|
||||
|
||||
if ($('#id_tax_rules_group').val() != '' && $('table.tax_rule tbody tr').length == 0)
|
||||
{
|
||||
initForm();
|
||||
$('#tax_rule_form').show();
|
||||
$('#country').focus();
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#tax_rule_form').hide();
|
||||
$('#page-header-desc-tax_rule-new').click(function() {
|
||||
initForm();
|
||||
$('#tax_rule_form').slideToggle();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function populateStates(id_country, id_state)
|
||||
{
|
||||
if ($("#country option:selected").size() > 1)
|
||||
{
|
||||
$("#zipcode-label").hide();
|
||||
$("#zipcode").hide();
|
||||
|
||||
$("#states").parent().hide();
|
||||
$("#states-label").hide();
|
||||
} else {
|
||||
$.ajax({
|
||||
url: "index.php",
|
||||
cache: false,
|
||||
data: "ajax=1&tab=AdminStates&token={getAdminToken tab='AdminStates'}&action=states&id_country="+id_country+"&id_state="+id_state+"&empty_value={l s='All' d='Admin.Global'}",
|
||||
success: function(html){
|
||||
if (html == "false")
|
||||
{
|
||||
$("#states").parent().hide();
|
||||
$("#states-label").hide();
|
||||
$("#states").html('');
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#states").parent().show();
|
||||
$("#states-label").show();
|
||||
$("#states").html(html);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$("#zipcode-label").show();
|
||||
$("#zipcode").show();
|
||||
}
|
||||
}
|
||||
|
||||
function loadTaxRule(id_tax_rule)
|
||||
{
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: 'index.php',
|
||||
async: true,
|
||||
dataType: 'json',
|
||||
data: 'ajax=1&tab=AdminTaxRulesGroup&token={getAdminToken tab='AdminTaxRulesGroup'}&ajaxStates=1&action=updateTaxRule&id_tax_rule='+id_tax_rule,
|
||||
success: function(data){
|
||||
$('#tax_rule_form').show();
|
||||
$('#id_tax_rule').val(data.id);
|
||||
$('#country').val(data.id_country);
|
||||
$('#state').val(data.id_state);
|
||||
|
||||
zipcode = 0;
|
||||
if (data.zipcode_from != 0)
|
||||
{
|
||||
zipcode = data.zipcode_from;
|
||||
|
||||
if (data.zipcode_to != 0)
|
||||
zipcode = zipcode +"-"+data.zipcode_to
|
||||
}
|
||||
|
||||
$('#zipcode').val(zipcode);
|
||||
$('#behavior').val(data.behavior);
|
||||
$('#id_tax').val(data.id_tax);
|
||||
$('#description').val(data.description);
|
||||
|
||||
populateStates(data.id_country, data.id_state);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function initForm()
|
||||
{
|
||||
$('#id_tax_rule').val('');
|
||||
$('#country').val(0);
|
||||
$('#state').val(0);
|
||||
$('#zipcode').val(0);
|
||||
$('#behavior').val(0);
|
||||
$('#tax').val(0);
|
||||
$('#description').val('');
|
||||
|
||||
populateStates(0,0);
|
||||
}
|
||||
{/block}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/OSL-3.0
|
||||
* 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 https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
||||
*/
|
||||
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../../../../../../../../');
|
||||
exit;
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/OSL-3.0
|
||||
* 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 https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
||||
*/
|
||||
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../../../../../../../');
|
||||
exit;
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/OSL-3.0
|
||||
* 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 https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
||||
*/
|
||||
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../../../../../../../../');
|
||||
exit;
|
||||
@@ -0,0 +1,28 @@
|
||||
{**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/OSL-3.0
|
||||
* 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 https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
||||
*}
|
||||
<a onclick="loadTaxRule('{$id|escape:'html':'UTF-8'}'); return false;" href="#" class="btn btn-default">
|
||||
<i class="icon-pencil"></i>
|
||||
{$action}
|
||||
</a>
|
||||
@@ -0,0 +1,154 @@
|
||||
{**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/OSL-3.0
|
||||
* 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 https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
||||
*}
|
||||
<tbody>
|
||||
{foreach $list AS $index => $tr}
|
||||
<tr
|
||||
{if $position_identifier}id="tr_{$id_category}_{$tr.$identifier}_{$tr.position['position']}"{/if}
|
||||
{if isset($tr.color) && $color_on_bg}style="background-color: {$tr.color}"{/if} >
|
||||
{if $bulk_actions && $has_bulk_actions}
|
||||
<td class="text-center">
|
||||
{assign var=bulkActionPossible value=true}
|
||||
{foreach $list_skip_actions as $key => $value}
|
||||
{if in_array($tr.$identifier, $value) == true}
|
||||
{assign var=bulkActionPossible value=false}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{if $bulkActionPossible == true}
|
||||
<input type="checkbox" name="{$table}Box[]" value="{$tr.$identifier}" class="noborder" />
|
||||
{/if}
|
||||
</td>
|
||||
{/if}
|
||||
{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="{strip}{if !$no_link}pointer{/if}
|
||||
{if isset($params.position) && $order_by == 'position'} dragHandle{/if}
|
||||
{if isset($params.align)} {$params.align}{/if}{/strip}"
|
||||
|
||||
{if (!isset($params.position) && !$no_link)}
|
||||
onclick="document.location = '{$current_index|addslashes|escape:'html':'UTF-8'}&{$identifier|escape:'html':'UTF-8'}={$tr.$identifier|escape:'html':'UTF-8'}{if $view}&view{else}&update{/if}{$table}&token={$token|escape:'html':'UTF-8'}'">{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' d='Admin.Global'}{else}{l s='Disabled' d='Admin.Global'}{/if}" title="{if $tr.$key}{l s='Enabled' d='Admin.Global'}{else}{l s='Disabled' d='Admin.Global'}{/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' d='Admin.International.Feature'}" title="{l s='Down' d='Admin.International.Feature'}" />
|
||||
</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' d='Admin.International.Feature'}" title="{l s='Up' d='Admin.International.Feature'}" />
|
||||
</a>
|
||||
{else}
|
||||
{$tr.$key.position + 1}
|
||||
{/if}
|
||||
{elseif isset($params.image)}
|
||||
{$tr.$key}
|
||||
{elseif (isset($params.icon))}
|
||||
<img src="../img/admin/{$tr[$key]}" 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($params.callback)}
|
||||
{$tr.$key}
|
||||
{elseif isset($tr.$key)}
|
||||
{if $key == 'behavior'}
|
||||
{if $tr.$key == 0}
|
||||
{l s='This tax only' d='Admin.International.Feature'}
|
||||
{elseif $tr.$key == 1}
|
||||
{l s='Combine' d='Admin.International.Feature'}
|
||||
{elseif $tr.$key == 2}
|
||||
{l s='One after another' d='Admin.International.Feature'}
|
||||
{/if}
|
||||
{elseif $key == 'rate'}
|
||||
{$tr.$key|string_format:"%.3f"}%
|
||||
{elseif $key == 'zipcode'}
|
||||
{if $tr.$key == '0 - 0'}
|
||||
--
|
||||
{else}
|
||||
{$tr.$key|escape:'html':'UTF-8'}
|
||||
{/if}
|
||||
{else}
|
||||
{$tr.$key|escape:'html':'UTF-8'}
|
||||
{/if}
|
||||
{else}
|
||||
--
|
||||
{/if}
|
||||
{if isset($params.suffix)}{$params.suffix}{/if}
|
||||
</td>
|
||||
{/foreach}
|
||||
|
||||
{if $shop_link_type}
|
||||
<td {if $name != $tr.shop_name}title="{$tr.shop_name}"{/if}>{if isset($tr.shop_short_name)}{$tr.shop_short_name}{else}{$tr.shop_name}{/if}</td>
|
||||
{/if}
|
||||
{if $has_actions}
|
||||
<td class="text-right fixed-width-lg">
|
||||
{assign var='compiled_actions' value=array()}
|
||||
{foreach $actions AS $key => $action}
|
||||
{if isset($tr.$action)}
|
||||
{if $key == 0}
|
||||
{assign var='action' value=$action}
|
||||
{/if}
|
||||
{$compiled_actions[] = $tr.$action}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{if $compiled_actions|count > 0}
|
||||
{if $compiled_actions|count > 1}<div class="btn-group-action">{/if}
|
||||
<div class="btn-group pull-right">
|
||||
{$compiled_actions[0]|regex_replace:'/class\s*=\s*"(\w*)"/':'class="$1 btn btn-default"'}
|
||||
{if $compiled_actions|count > 1}
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{foreach $compiled_actions AS $key => $action}
|
||||
{if $key != 0}
|
||||
<li>
|
||||
{$action}
|
||||
</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
</div>
|
||||
{if $compiled_actions|count > 1}</div>{/if}
|
||||
{/if}
|
||||
</td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
@@ -0,0 +1,150 @@
|
||||
{**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/OSL-3.0
|
||||
* 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 https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
||||
*}
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
{if $bulk_actions}
|
||||
<div class="btn-group bulk-actions">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
{l s='Bulk actions' d='Admin.Global'} <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a href="#" onclick="javascript:checkDelBoxes($(this).closest('form').get(0), '{$table}Box[]', true);return false;">
|
||||
<i class="icon-check-sign"></i> {l s='Select all' d='Admin.Actions'}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" onclick="javascript:checkDelBoxes($(this).closest('form').get(0), '{$table}Box[]', false);return false;">
|
||||
<i class="icon-check-empty"></i> {l s='Unselect all' d='Admin.Actions'}
|
||||
</a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
{foreach $bulk_actions as $key => $params}
|
||||
<li{if $params.text == 'divider'} class="divider"{/if}>
|
||||
{if $params.text != 'divider'}
|
||||
<a href="#" onclick="{if isset($params.confirm)}if (confirm('{$params.confirm}')){/if}sendBulkAction($(this).closest('form').get(0), 'submitBulk{$key}{$table}');">
|
||||
{if isset($params.icon)}<i class="{$params.icon}"></i>{/if} {$params.text}
|
||||
</a>
|
||||
{/if}
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{if !$simple_header && $list_total > $pagination[0]}
|
||||
<div class="col-lg-4">
|
||||
{* Choose number of results per page *}
|
||||
<div class="pagination">
|
||||
{l s='Display' d='Admin.Actions'}
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
{$selected_pagination}
|
||||
<i class="icon-caret-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{foreach $pagination AS $value}
|
||||
<li>
|
||||
<a href="javascript:void(0);" class="pagination-items-page" data-items="{$value|intval}" data-list-id="{$list_id}">{$value}</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
/ {$list_total} {l s='result(s)' d='Admin.Global'}
|
||||
<input type="hidden" id="{$list_id}-pagination-items-page" name="{$list_id}_pagination" value="{$selected_pagination|intval}" />
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$('.pagination-items-page').on('click',function(e){
|
||||
e.preventDefault();
|
||||
$('#'+$(this).data("list-id")+'-pagination-items-page').val($(this).data("items")).closest("form").submit();
|
||||
});
|
||||
</script>
|
||||
<ul class="pagination pull-right">
|
||||
<li {if $page <= 1}class="disabled"{/if}>
|
||||
<a href="javascript:void(0);" class="pagination-link" data-page="1" data-list-id="{$list_id}">
|
||||
<i class="icon-double-angle-left"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li {if $page <= 1}class="disabled"{/if}>
|
||||
<a href="javascript:void(0);" class="pagination-link" data-page="{$page - 1}" data-list-id="{$list_id}">
|
||||
<i class="icon-angle-left"></i>
|
||||
</a>
|
||||
</li>
|
||||
{assign p 0}
|
||||
{while $p++ < $total_pages}
|
||||
{if $p < $page-2}
|
||||
<li class="disabled">
|
||||
<a href="javascript:void(0);">…</a>
|
||||
</li>
|
||||
{assign p $page-3}
|
||||
{elseif $p > $page+2}
|
||||
<li class="disabled">
|
||||
<a href="javascript:void(0);">…</a>
|
||||
</li>
|
||||
{assign p $total_pages}
|
||||
{else}
|
||||
<li {if $p == $page}class="active"{/if}>
|
||||
<a href="javascript:void(0);" class="pagination-link" data-page="{$p}" data-list-id="{$list_id}">{$p}</a>
|
||||
</li>
|
||||
{/if}
|
||||
{/while}
|
||||
<li {if $page >= $total_pages}class="disabled"{/if}>
|
||||
<a href="javascript:void(0);" class="pagination-link" data-page="{$page + 1}" data-list-id="{$list_id}">
|
||||
<i class="icon-angle-right"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li {if $page >= $total_pages}class="disabled"{/if}>
|
||||
<a href="javascript:void(0);" class="pagination-link" data-page="{$total_pages}" data-list-id="{$list_id}">
|
||||
<i class="icon-double-angle-right"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<script type="text/javascript">
|
||||
$('.pagination-link').on('click',function(e){
|
||||
e.preventDefault();
|
||||
|
||||
if (!$(this).parent().hasClass('disabled'))
|
||||
$('#submitFilter'+$(this).data("list-id")).val($(this).data("page")).closest("form").submit();
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{if !$simple_header}
|
||||
<input type="hidden" name="token" value="{$token|escape:'html':'UTF-8'}" />
|
||||
</div>
|
||||
{hook h='displayAdminListAfter'}
|
||||
</form>
|
||||
{/if}
|
||||
{if isset($name_controller)}
|
||||
{capture name=hookName assign=hookName}display{$name_controller|ucfirst}ListAfter{/capture}
|
||||
{hook h=$hookName}
|
||||
{elseif isset($smarty.get.controller)}
|
||||
{capture name=hookName assign=hookName}display{$smarty.get.controller|ucfirst|htmlentities}ListAfter{/capture}
|
||||
{hook h=$hookName}
|
||||
{/if}
|
||||
|
||||
|
||||
{block name="after"}{/block}
|
||||
@@ -0,0 +1,83 @@
|
||||
{**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/OSL-3.0
|
||||
* 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 https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
||||
*}
|
||||
|
||||
{hook h='displayAdminListBefore'}
|
||||
{if isset($name_controller)}
|
||||
{capture name=hookName assign=hookName}display{$name_controller|ucfirst}ListBefore{/capture}
|
||||
{hook h=$hookName}
|
||||
{elseif isset($smarty.get.controller)}
|
||||
{capture name=hookName assign=hookName}display{$smarty.get.controller|ucfirst|htmlentities}ListBefore{/capture}
|
||||
{hook h=$hookName}
|
||||
{/if}
|
||||
|
||||
<form method="post" action="{$currentIndex|escape:'html':'UTF-8'}&{$identifier}&token={$token|escape:'html':'UTF-8'}&id_tax_rules_group={$id_tax_rules_group}&updatetax_rules_group#{$table}" class="form">
|
||||
<div class="panel">
|
||||
<input type="hidden" id="submitFilter{$list_id}" name="submitFilter{$list_id}" value="0"/>
|
||||
<div class="table-responsive clearfix">
|
||||
<table{if $table_id} id="table-{$table_id}"{/if} class="table{if $table_dnd} tableDnD{/if} {$list_id}">
|
||||
{if $bulk_actions && $has_bulk_actions}
|
||||
<col style="width: 10px;" />
|
||||
{/if}
|
||||
{foreach $fields_display AS $key => $params}
|
||||
<col{if isset($params.width) && $params.width != 'auto'} width="{$params.width}px"{/if}/>
|
||||
{/foreach}
|
||||
{if $shop_link_type}
|
||||
<col style="width: 80px;"/>
|
||||
{/if}
|
||||
{if $has_actions}
|
||||
<col style="width: 52px;" />
|
||||
{/if}
|
||||
<thead>
|
||||
<tr class="nodrag nodrop">
|
||||
{if $bulk_actions && $has_bulk_actions}
|
||||
<th class="center"></th>
|
||||
{/if}
|
||||
{foreach $fields_display AS $key => $params}
|
||||
<th{if isset($params.align)} align="{$params.align}"{/if}{if isset($params.class)} class="{$params.class}"{/if}>
|
||||
{if isset($params.hint)}<span class="hint" name="help_box">{$params.hint}<span class="hint-pointer"> </span></span>{/if}
|
||||
<span class="title_box">
|
||||
{$params.title}
|
||||
</span>
|
||||
</th>
|
||||
{/foreach}
|
||||
{if $shop_link_type}
|
||||
<th>
|
||||
{if $shop_link_type == 'shop'}
|
||||
{l s='Shop' d='Admin.Global'}
|
||||
{else}
|
||||
{l s='Shop group' d='Admin.Global'}
|
||||
{/if}
|
||||
</th>
|
||||
{/if}
|
||||
{if $has_actions && $filters_has_value}
|
||||
<th class="actions text-right"><button type="submit" name="submitReset{$list_id}" class="btn btn-warning">
|
||||
<i class="icon-eraser"></i> {l s='Reset' d='Admin.Actions'}
|
||||
</button>
|
||||
</th>
|
||||
{else}
|
||||
<th class="actions text-right"></th>
|
||||
{/if}
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright since 2007 PrestaShop SA and Contributors
|
||||
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.md.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/licenses/OSL-3.0
|
||||
* 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 https://devdocs.prestashop.com/ for more information.
|
||||
*
|
||||
* @author PrestaShop SA and Contributors <contact@prestashop.com>
|
||||
* @copyright Since 2007 PrestaShop SA and Contributors
|
||||
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
|
||||
*/
|
||||
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../../../../../../');
|
||||
exit;
|
||||
Reference in New Issue
Block a user