first commit

This commit is contained in:
2024-11-05 12:22:50 +01:00
commit e5682a3912
19641 changed files with 2948548 additions and 0 deletions

View File

@@ -0,0 +1,119 @@
{**
* 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)
*}
<div id="datepicker" class="row row-padding-top hide">
<div class="col-lg-12">
<div class="daterangepicker-days">
<div class="row">
{if $is_rtl}
<div class="col-sm-6 col-lg-4">
<div class="datepicker2" data-date="{$date_to}" data-date-format="{$date_format}"></div>
</div>
<div class="col-sm-6 col-lg-4">
<div class="datepicker1" data-date="{$date_from}" data-date-format="{$date_format}"></div>
</div>
{else}
<div class="col-sm-6 col-lg-4">
<div class="datepicker1" data-date="{$date_from}" data-date-format="{$date_format}"></div>
</div>
<div class="col-sm-6 col-lg-4">
<div class="datepicker2" data-date="{$date_to}" data-date-format="{$date_format}"></div>
</div>
{/if}
<div class="col-xs-12 col-sm-6 col-lg-4 pull-right">
<div id='datepicker-form' class='form-inline'>
<div id='date-range' class='form-date-group'>
<div class='form-date-heading'>
<span class="title">{l s='Date range'}</span>
{if isset($actions) && $actions|count > 0}
{if $actions|count > 1}
<button class='btn btn-default btn-xs pull-right dropdown-toggle' data-toggle='dropdown' type="button">
{l s='Custom'}
<i class='icon-angle-down'></i>
</button>
<ul class='dropdown-menu'>
{foreach from=$actions item=action}
<li><a{if isset($action.href)} href="{$action.href}"{/if}{if isset($action.class)} class="{$action.class}"{/if}>{if isset($action.icon)}<i class="{$action.icon}"></i> {/if}{$action.label}</a></li>
{/foreach}
</ul>
{else}
<a{if isset($actions[0].href)} href="{$actions[0].href}"{/if} class="btn btn-default btn-xs pull-right{if isset($actions[0].class)} {$actions[0].class}{/if}">{if isset($actions[0].icon)}<i class="{$actions[0].icon}"></i> {/if}{$actions[0].label}</a>
{/if}
{/if}
</div>
<div class='form-date-body'>
<label>{l s='From'}</label>
<input class='date-input form-control' id='date-start' placeholder='Start' type='text' name="date_from" value="{$date_from}" data-date-format="{$date_format}" tabindex="1" />
<label>{l s='to'}</label>
<input class='date-input form-control' id='date-end' placeholder='End' type='text' name="date_to" value="{$date_to}" data-date-format="{$date_format}" tabindex="2" />
</div>
</div>
<div id="date-compare" class='form-date-group'>
<div class='form-date-heading'>
<span class="checkbox-title">
<label >
<input type='checkbox' id="datepicker-compare" name="datepicker_compare"{if isset($compare_date_from) && isset($compare_date_to)} checked="checked"{/if} tabindex="3">
{l s='Compare to'}
</label>
</span>
<select id="compare-options" class="form-control fixed-width-lg pull-right" name="compare_date_option"{if is_null($compare_date_from) || is_null($compare_date_to)} disabled="disabled"{/if}>
<option value="1" {if $compare_option == 1}selected="selected"{/if} label="{l s='Previous period'}">{l s='Previous period'}</option>
<option value="2" {if $compare_option == 2}selected="selected"{/if} label="{l s='Previous Year'}">{l s='Previous year'}</option>
<option value="3" {if $compare_option == 3}selected="selected"{/if} label="{l s='Custom'}">{l s='Custom'}</option>
</select>
</div>
<div class="form-date-body" id="form-date-body-compare"{if is_null($compare_date_from) || is_null($compare_date_to)} style="display: none;"{/if}>
<label>{l s='From'}</label>
<input id="date-start-compare" class="date-input form-control" type="text" placeholder="Start" name="compare_date_from" value="{$compare_date_from}" data-date-format="{$date_format}" tabindex="4" />
<label>{l s='to'}</label>
<input id="date-end-compare" class="date-input form-control" type="text" placeholder="End" name="compare_date_to" value="{$compare_date_to}" data-date-format="{$date_format}"
tabindex="5" />
</div>
</div>
<div class='form-date-actions'>
<button class='btn btn-link' type='button' id="datepicker-cancel" tabindex="7">
<i class='icon-remove'></i>
{l s='Cancel' d='Admin.Actions'}
</button>
<button class='btn btn-default pull-right' type='submit' name="submitDateRange" tabindex="6">
<i class='icon-ok text-success'></i>
{l s='Apply' d='Admin.Actions'}
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
translated_dates = {
days: ['{l s='Sunday' js=1}', '{l s='Monday' js=1}', '{l s='Tuesday' js=1}', '{l s='Wednesday' js=1}', '{l s='Thursday' js=1}', '{l s='Friday' js=1}', '{l s='Saturday' js=1}', '{l s='Sunday' js=1}'],
daysShort: ['{l s='Sun' js=1}', '{l s='Mon' js=1}', '{l s='Tue' js=1}', '{l s='Wed' js=1}', '{l s='Thu' js=1}', '{l s='Fri' js=1}', '{l s='Sat' js=1}', '{l s='Sun' js=1}'],
daysMin: ['{l s='Su' js=1}', '{l s='Mo' js=1}', '{l s='Tu' js=1}', '{l s='We' js=1}', '{l s='Th' js=1}', '{l s='Fr' js=1}', '{l s='Sa' js=1}', '{l s='Su' js=1}'],
months: ['{l s='January' js=1}', '{l s='February' js=1}', '{l s='March' js=1}', '{l s='April' js=1}', '{l s='May' js=1}', '{l s='June' js=1}', '{l s='July' js=1}', '{l s='August' js=1}', '{l s='September' js=1}', '{l s='October' js=1}', '{l s='November' js=1}', '{l s='December' js=1}'],
monthsShort: ['{l s='Jan' js=1}', '{l s='Feb' js=1}', '{l s='Mar' js=1}', '{l s='Apr' js=1}', '{l s='May ' js=1}', '{l s='Jun' js=1}', '{l s='Jul' js=1}', '{l s='Aug' js=1}', '{l s='Sep' js=1}', '{l s='Oct' js=1}', '{l s='Nov' js=1}', '{l s='Dec' js=1}']
};
</script>

View File

@@ -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;

View File

@@ -0,0 +1,198 @@
{**
* 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)
*}
<div id="box-clients" class="col-lg-3 box-stats color1" >
<div class="boxchart-overlay">
<div class="boxchart"></div>
</div>
<span class="title">{l s='Customers'}</span>
<span class="value">4 589</span>
</div>
<div id="box-orders" class="col-lg-3 box-stats color2">
<div class="boxchart-overlay">
<div class="boxchart"></div>
</div>
<span class="title">{l s='Orders'}</span>
<span class="value">789</span>
</div>
<div id="box-income" class="col-lg-3 box-stats color3">
<i class="icon-money"></i>
<span class="title">{l s='Income'}</span>
<span class="value">$999,99</span>
</div>
<div id="box-messages" class="col-lg-3 box-stats color4">
<i class="icon-envelope-alt"></i>
<span class="title">{l s='Message'}</span>
<span class="value">19</span>
</div>
<div class="clearfix"></div>
<div id="box-line" class="col-lg-3 box-stats color1" >
<div class="boxchart-overlay">
<div class="boxchart"></div>
</div>
<span class="title">{l s='Traffic'}</span>
<span class="value">4 589</span>
</div>
<div id="box-spline" class="col-lg-3 box-stats color2" >
<div class="boxchart-overlay">
<div class="boxchart"></div>
</div>
<span class="title">{l s='Conversion'}</span>
<span class="value">4 589</span>
</div>
<div class="clearfix"></div>
<script>
var data = [4, 8, 15, 16, 23, 42, 8, 15, 16, 23, 42, 16, 23, 42, 8, 15, 15, 16, 23];
var chart = d3.select("#box-clients .boxchart").append("svg")
.attr("class", "data_chart")
.attr("width", data.length * 6)
.attr("height", 30);
var y = d3.scale.linear()
.domain([0, d3.max(data)])
.range([0, d3.max(data)]);
chart.selectAll("rect")
.data(data)
.enter().append("rect")
.attr("y", function(d) { return 30 - d; })
.attr("x", function(d, i) { return i * 6; })
.attr("width", 4)
.attr("height", y);
</script>
<script>
var data = [4, 8, 15, 16, 23, 42, 8, 15, 16];
var chart = d3.select("#box-orders .boxchart").append("svg")
.attr("class", "data_chart")
.attr("width", data.length * 6)
.attr("height", 30);
var y = d3.scale.linear()
.domain([0, d3.max(data)])
.range([0, d3.max(data)]);
chart.selectAll("rect")
.data(data)
.enter().append("rect")
.attr("y", function(d) { return 30 - d; })
.attr("x", function(d, i) { return i * 6; })
.attr("width", 4)
.attr("height", y);
</script>
<script>
var myColors = ["#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf"];
d3.scale.myColors = function() {
return d3.scale.ordinal().range(myColors);
};
var data = [53245, 28479, 19697, 24037, 30245];
var width = 140,
height = 140,
radius = Math.min(width, height) / 2;
var color = d3.scale.ordinal().range(myColors);
var pie = d3.layout.pie()
.sort(null);
var arc = d3.svg.arc()
.innerRadius(radius - 140)
.outerRadius(radius - 120);
var svg = d3.select("#box-pie .boxchart").append("svg")
.attr("class", "data_chart")
.attr("width", width)
.attr("height", height)
.append("g")
.attr("transform", "translate(" + width / 2 + "," + height / 2 + ")");
var path = svg.selectAll("path")
.data(pie(data))
.enter().append("path")
.attr("fill", function(d, i) { return color(i); })
.attr("d", arc);
</script>
<script>
var data = [3, 6, 2, 7, 5, 12, 1, 3, 8, 9, 2, 5, 7],
w = 120,
h = 50,
margin = 5,
y = d3.scale.linear().domain([0, d3.max(data)]).range([0 + margin, h - margin]),
x = d3.scale.linear().domain([0, data.length]).range([0 + margin, w - margin]);
var vis = d3.select("#box-line .boxchart").append("svg")
.attr("class", "data_chart")
.attr("width", w)
.attr("height", h);
var g = vis.append("g")
.attr("transform", "translate(0, 50)");
var line = d3.svg.line()
.x(function(d,i) { return x(i); })
.y(function(d) { return -1 * y(d); });
g.append("path").attr("d", line(data));
vis.selectAll("dot")
.data(data)
.enter().append("circle")
.attr("stroke", "#1BA6E5")
.attr("stroke-width", 1)
.attr("r", 3)
.attr("transform", "translate(0, 50)")
.attr("fill", "white")
.attr("cx", function(d, i) { return x(i); })
.attr("cy", function(d, i) { return -1 * y(d); });
var area = d3.svg.area()
.x(function(d, i) { return x(i); })
.y0(h)
.y1(function(d, i) { return -1 * y(d); });
g.append("path")
.datum(data)
.attr("class", "area")
.attr("d", area);
</script>
<script>
var data = [3, 6, 2, 7, 5, 12, 1, 3, 8, 9, 2, 5, 7],
w = 120,
h = 50,
margin = 5,
y = d3.scale.linear().domain([0, d3.max(data)]).range([0 + margin, h - margin]),
x = d3.scale.linear().domain([0, data.length]).range([0 + margin, w - margin]);
var vis = d3.select("#box-spline .boxchart").append("svg")
.attr("class", "data_chart")
.attr("width", w)
.attr("height", h);
var g = vis.append("g")
.attr("transform", "translate(0, 50)");
var line = d3.svg.line()
.interpolate("basis")
.x(function(d,i) { return x(i); })
.y(function(d) { return -1 * y(d); });
g.append("path").attr("d", line(data));
</script>

View File

@@ -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;

View File

@@ -0,0 +1,134 @@
{**
* 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)
*}
<script type="text/javascript">
$().ready(function() {
$(document).on('click', '.input_all_shop', function(e) {
var checked = $(this).prop('checked');
$('.input_shop_group:not(:disabled)').attr('checked', checked);
$('.input_shop:not(:disabled)').attr('checked', checked);
});
// Click on a group shop
$(document).on('click', '.input_shop_group', function(e) {
$('.input_shop[value='+$(this).val()+']').attr('checked', $(this).prop('checked'));
check_all_shop();
});
// Click on a shop
$(document).on('click', '.input_shop', function(e) {
check_shop_group_status($(this).val());
check_all_shop();
});
// Initialize checkbox
$('.input_shop_group').each(function(k, v) {
check_shop_group_status($(v).val());
check_all_shop();
});
});
function check_shop_group_status(id_group) {
var groupChecked = true;
var total = 0;
$('.input_shop[value='+id_group+']').each(function(k, v) {
total++;
if (!$(v).prop('checked'))
groupChecked = false;
});
if (total > 0)
$('.input_shop_group[value='+id_group+']').attr('checked', groupChecked);
}
function check_all_shop() {
var allChecked = true;
$('.input_shop_group:not(:disabled)').each(function(k, v) {
if (!$(v).prop('checked'))
allChecked = false;
});
$('.input_all_shop').attr('checked', allChecked);
}
</script>
<div class="assoShop">
<table class="table">
<tr>
<th>{l s='Shop' d='Admin.Global'}</th>
</tr>
<tr>
<td>
<label>
<input class="input_all_shop" type="checkbox" />{l s='All shops'}
</label>
</td>
</tr>
{foreach $input.values as $groupID => $groupData}
{assign var=groupChecked value=false}
<tr {if $input.type == 'shop'}class="alt_row"{/if}>
<td>
<img style="vertical-align:middle;" alt="" src="../img/admin/lv2_b.gif" />
<label>
<input class="input_shop_group"
type="checkbox"
name="checkBoxShopGroupAsso_{$table}[{$groupID|intval}]"
value="{$groupID|intval}"
{if $groupChecked} checked="checked"{/if} />
{l s='Group:'} {$groupData['name']}
</label>
</td>
</tr>
{if $input.type == 'shop'}
{assign var=j value=0}
{foreach $groupData['shops'] as $shopID => $shopData}
{if (isset($fields_value.shop[$shopID]))}
{assign var=checked value=true}
{else}
{assign var=checked value=false}
{/if}
<tr>
<td {if $groupData['disable_shops']}style="font-style:italic;background-color:#CFC4FF"{/if}>
<img style="vertical-align:middle;" alt="" src="../img/admin/lv3_{if $j < count($groupData['shops']) - 1}b{else}f{/if}.png" />
<label class="child">
<input class="input_shop"
type="checkbox"
value="{$groupID|intval}"
shop_id="{$shopID|intval}"
name="checkBoxShopAsso_{$table}[{$shopID|intval}]"
id="checkedBox_{$shopID|intval}"
{if $checked} checked="checked"{/if}
{if $groupData['disable_shops']} readonly="readonly" onclick="return false"{/if}
/>
{$shopData['name']}
</label>
</td>
</tr>
{assign var=j value=$j+1}
{/foreach}
{/if}
{/foreach}
</table>
</div>

View File

@@ -0,0 +1,987 @@
{**
* 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)
*}
{if isset($fields.title)}<h3>{$fields.title}</h3>{/if}
{if isset($tabs) && $tabs|count}
<script type="text/javascript">
var helper_tabs = {$tabs|json_encode};
var unique_field_id = '';
</script>
{/if}
{block name="defaultForm"}
{if isset($identifier_bk) && $identifier_bk == $identifier}{capture name='identifier_count'}{counter name='identifier_count'}{/capture}{/if}
{assign var='identifier_bk' value=$identifier scope='parent'}
{if isset($table_bk) && $table_bk == $table}{capture name='table_count'}{counter name='table_count'}{/capture}{/if}
{assign var='table_bk' value=$table scope='root'}
<form id="{if isset($fields.form.form.id_form)}{$fields.form.form.id_form|escape:'html':'UTF-8'}{else}{if $table == null}configuration_form{else}{$table}_form{/if}{if isset($smarty.capture.table_count) && $smarty.capture.table_count}_{$smarty.capture.table_count|intval}{/if}{/if}" class="defaultForm form-horizontal{if isset($name_controller) && $name_controller} {$name_controller}{/if}"{if isset($current) && $current} action="{$current|escape:'html':'UTF-8'}{if isset($token) && $token}&amp;token={$token|escape:'html':'UTF-8'}{/if}"{/if} method="post" enctype="multipart/form-data"{if isset($style)} style="{$style}"{/if} novalidate>
{if $form_id}
<input type="hidden" name="{$identifier}" id="{$identifier}{if isset($smarty.capture.identifier_count) && $smarty.capture.identifier_count}_{$smarty.capture.identifier_count|intval}{/if}" value="{$form_id}" />
{/if}
{if !empty($submit_action)}
<input type="hidden" name="{$submit_action}" value="1" />
{/if}
{foreach $fields as $f => $fieldset}
{block name="fieldset"}
{capture name='fieldset_name'}{counter name='fieldset_name'}{/capture}
<div class="panel" id="fieldset_{$f}{if isset($smarty.capture.identifier_count) && $smarty.capture.identifier_count}_{$smarty.capture.identifier_count|intval}{/if}{if $smarty.capture.fieldset_name > 1}_{($smarty.capture.fieldset_name - 1)|intval}{/if}">
{foreach $fieldset.form as $key => $field}
{if $key == 'legend'}
{block name="legend"}
<div class="panel-heading">
{if isset($field.image) && isset($field.title)}<img src="{$field.image}" alt="{$field.title|escape:'html':'UTF-8'}" />{/if}
{if isset($field.icon)}<i class="{$field.icon}"></i>{/if}
{$field.title}
</div>
{/block}
{elseif $key == 'description' && $field}
<div class="alert alert-info">{$field}</div>
{elseif $key == 'warning' && $field}
<div class="alert alert-warning">{$field}</div>
{elseif $key == 'success' && $field}
<div class="alert alert-success">{$field}</div>
{elseif $key == 'error' && $field}
<div class="alert alert-danger">{$field}</div>
{elseif $key == 'input'}
<div class="form-wrapper">
{foreach $field as $input}
{block name="input_row"}
<div class="form-group{if isset($input.form_group_class)} {$input.form_group_class}{/if}{if $input.type == 'hidden'} hide{/if}"{if $input.name == 'id_state'} id="contains_states"{if !$contains_states} style="display:none;"{/if}{/if}{if $input.name == 'dni'} id="dni_required"{if !$dni_required} style="display:none;"{/if}{/if}{if isset($tabs) && isset($input.tab)} data-tab-id="{$input.tab}"{/if}>
{if $input.type == 'hidden'}
<input type="hidden" name="{$input.name}" id="{$input.name}" value="{$fields_value[$input.name]|escape:'html':'UTF-8'}" />
{else}
{block name="label"}
{if isset($input.label)}
<label class="control-label col-lg-4{if isset($input.required) && $input.required && $input.type != 'radio'} required{/if}">
{if isset($input.hint)}
<span class="label-tooltip" data-toggle="tooltip" data-html="true" title="{if is_array($input.hint)}
{foreach $input.hint as $hint}
{if is_array($hint)}
{$hint.text|escape:'html':'UTF-8'}
{else}
{$hint|escape:'html':'UTF-8'}
{/if}
{/foreach}
{else}
{$input.hint|escape:'html':'UTF-8'}
{/if}">
{/if}
{$input.label}
{if isset($input.hint)}
</span>
{/if}
</label>
{/if}
{/block}
{block name="field"}
<div class="col-lg-{if isset($input.col)}{$input.col|intval}{else}8{/if}{if !isset($input.label)} col-lg-offset-3{/if}">
{block name="input"}
{if $input.type == 'text' || $input.type == 'tags'}
{if isset($input.lang) AND $input.lang}
{if $languages|count > 1}
<div class="form-group">
{/if}
{foreach $languages as $language}
{if isset($fields_value[$input.name][$language.id_lang])}
{assign var='value_text' value=$fields_value[$input.name][$language.id_lang]}
{else}
{assign var='value_text' value=''}
{/if}
{if $languages|count > 1}
<div class="translatable-field lang-{$language.id_lang}" {if $language.id_lang != $defaultFormLanguage}style="display:none"{/if}>
<div class="col-lg-9">
{/if}
{if $input.type == 'tags'}
{literal}
<script type="text/javascript">
$().ready(function () {
var input_id = '{/literal}{if isset($input.id)}{$input.id}_{$language.id_lang}{else}{$input.name}_{$language.id_lang}{/if}{literal}';
$('#'+input_id).tagify({delimiters: [13,44], addTagPrompt: '{/literal}{l s='Add tag' js=1}{literal}'});
$({/literal}'#{$table}{literal}_form').submit( function() {
$(this).find('#'+input_id).val($('#'+input_id).tagify('serialize'));
});
});
</script>
{/literal}
{/if}
{if isset($input.maxchar) || isset($input.prefix) || isset($input.suffix)}
<div class="input-group{if isset($input.class)} {$input.class}{/if}">
{/if}
{if isset($input.maxchar) && $input.maxchar}
<span id="{if isset($input.id)}{$input.id}_{$language.id_lang}{else}{$input.name}_{$language.id_lang}{/if}_counter" class="input-group-addon">
<span class="text-count-down">{$input.maxchar|intval}</span>
</span>
{/if}
{if isset($input.prefix)}
<span class="input-group-addon">
{$input.prefix}
</span>
{/if}
<input type="text"
id="{if isset($input.id)}{$input.id}_{$language.id_lang}{else}{$input.name}_{$language.id_lang}{/if}"
name="{$input.name}_{$language.id_lang}"
class="{if isset($input.class)}{$input.class}{/if}{if $input.type == 'tags'} tagify{/if}"
value="{if isset($input.string_format) && $input.string_format}{$value_text|string_format:$input.string_format|escape:'html':'UTF-8'}{else}{$value_text|escape:'html':'UTF-8'}{/if}"
onkeyup="if (isArrowKey(event)) return ;updateFriendlyURL();"
{if isset($input.size)} size="{$input.size}"{/if}
{if isset($input.maxchar) && $input.maxchar} data-maxchar="{$input.maxchar|intval}"{/if}
{if isset($input.maxlength) && $input.maxlength} maxlength="{$input.maxlength|intval}"{/if}
{if isset($input.readonly) && $input.readonly} readonly="readonly"{/if}
{if isset($input.disabled) && $input.disabled} disabled="disabled"{/if}
{if isset($input.autocomplete) && !$input.autocomplete} autocomplete="off"{/if}
{if isset($input.required) && $input.required} required="required" {/if}
{if isset($input.placeholder) && $input.placeholder} placeholder="{$input.placeholder}"{/if} />
{if isset($input.suffix)}
<span class="input-group-addon">
{$input.suffix}
</span>
{/if}
{if isset($input.maxchar) || isset($input.prefix) || isset($input.suffix)}
</div>
{/if}
{if $languages|count > 1}
</div>
<div class="col-lg-2">
<button type="button" class="btn btn-default dropdown-toggle" tabindex="-1" data-toggle="dropdown">
{$language.iso_code}
<i class="icon-caret-down"></i>
</button>
<ul class="dropdown-menu">
{foreach from=$languages item=language}
<li><a href="javascript:hideOtherLanguage({$language.id_lang});" tabindex="-1">{$language.name}</a></li>
{/foreach}
</ul>
</div>
</div>
{/if}
{/foreach}
{if isset($input.maxchar) && $input.maxchar}
<script type="text/javascript">
$(document).ready(function(){
{foreach from=$languages item=language}
countDown($("#{if isset($input.id)}{$input.id}_{$language.id_lang}{else}{$input.name}_{$language.id_lang}{/if}"), $("#{if isset($input.id)}{$input.id}_{$language.id_lang}{else}{$input.name}_{$language.id_lang}{/if}_counter"));
{/foreach}
});
</script>
{/if}
{if $languages|count > 1}
</div>
{/if}
{else}
{if $input.type == 'tags'}
{literal}
<script type="text/javascript">
$().ready(function () {
var input_id = '{/literal}{if isset($input.id)}{$input.id}{else}{$input.name}{/if}{literal}';
$('#'+input_id).tagify({delimiters: [13,44], addTagPrompt: '{/literal}{l s='Add tag'}{literal}'});
$({/literal}'#{$table}{literal}_form').submit( function() {
$(this).find('#'+input_id).val($('#'+input_id).tagify('serialize'));
});
});
</script>
{/literal}
{/if}
{assign var='value_text' value=$fields_value[$input.name]}
{if isset($input.maxchar) || isset($input.prefix) || isset($input.suffix)}
<div class="input-group{if isset($input.class)} {$input.class}{/if}">
{/if}
{if isset($input.maxchar) && $input.maxchar}
<span id="{if isset($input.id)}{$input.id}{else}{$input.name}{/if}_counter" class="input-group-addon"><span class="text-count-down">{$input.maxchar|intval}</span></span>
{/if}
{if isset($input.prefix)}
<span class="input-group-addon">
{$input.prefix}
</span>
{/if}
<input type="text"
name="{$input.name}"
id="{if isset($input.id)}{$input.id}{else}{$input.name}{/if}"
value="{if isset($input.string_format) && $input.string_format}{$value_text|string_format:$input.string_format|escape:'html':'UTF-8'}{else}{$value_text|escape:'html':'UTF-8'}{/if}"
class="{if isset($input.class)}{$input.class}{/if}{if $input.type == 'tags'} tagify{/if}"
{if isset($input.size)} size="{$input.size}"{/if}
{if isset($input.maxchar) && $input.maxchar} data-maxchar="{$input.maxchar|intval}"{/if}
{if isset($input.maxlength) && $input.maxlength} maxlength="{$input.maxlength|intval}"{/if}
{if isset($input.readonly) && $input.readonly} readonly="readonly"{/if}
{if isset($input.disabled) && $input.disabled} disabled="disabled"{/if}
{if isset($input.autocomplete) && !$input.autocomplete} autocomplete="off"{/if}
{if isset($input.required) && $input.required } required="required" {/if}
{if isset($input.placeholder) && $input.placeholder } placeholder="{$input.placeholder}"{/if}
/>
{if isset($input.suffix)}
<span class="input-group-addon">
{$input.suffix}
</span>
{/if}
{if isset($input.maxchar) || isset($input.prefix) || isset($input.suffix)}
</div>
{/if}
{if isset($input.maxchar) && $input.maxchar}
<script type="text/javascript">
$(document).ready(function(){
countDown($("#{if isset($input.id)}{$input.id}{else}{$input.name}{/if}"), $("#{if isset($input.id)}{$input.id}{else}{$input.name}{/if}_counter"));
});
</script>
{/if}
{/if}
{elseif $input.type == 'textbutton'}
{assign var='value_text' value=$fields_value[$input.name]}
<div class="row">
<div class="col-lg-9">
{if isset($input.maxchar)}
<div class="input-group">
<span id="{if isset($input.id)}{$input.id}{else}{$input.name}{/if}_counter" class="input-group-addon">
<span class="text-count-down">{$input.maxchar|intval}</span>
</span>
{/if}
<input type="text"
name="{$input.name}"
id="{if isset($input.id)}{$input.id}{else}{$input.name}{/if}"
value="{if isset($input.string_format) && $input.string_format}{$value_text|string_format:$input.string_format|escape:'html':'UTF-8'}{else}{$value_text|escape:'html':'UTF-8'}{/if}"
class="{if isset($input.class)}{$input.class}{/if}{if $input.type == 'tags'} tagify{/if}"
{if isset($input.size)} size="{$input.size}"{/if}
{if isset($input.maxchar) && $input.maxchar} data-maxchar="{$input.maxchar|intval}"{/if}
{if isset($input.maxlength) && $input.maxlength} maxlength="{$input.maxlength|intval}"{/if}
{if isset($input.readonly) && $input.readonly} readonly="readonly"{/if}
{if isset($input.disabled) && $input.disabled} disabled="disabled"{/if}
{if isset($input.autocomplete) && !$input.autocomplete} autocomplete="off"{/if}
{if isset($input.placeholder) && $input.placeholder } placeholder="{$input.placeholder}"{/if}
/>
{if isset($input.suffix)}{$input.suffix}{/if}
{if isset($input.maxchar) && $input.maxchar}
</div>
{/if}
</div>
<div class="col-lg-2">
<button type="button" class="btn btn-default{if isset($input.button.attributes['class'])} {$input.button.attributes['class']}{/if}{if isset($input.button.class)} {$input.button.class}{/if}"
{foreach from=$input.button.attributes key=name item=value}
{if $name|lower != 'class'}
{$name|escape:'html':'UTF-8'}="{$value|escape:'html':'UTF-8'}"
{/if}
{/foreach} >
{$input.button.label}
</button>
</div>
</div>
{if isset($input.maxchar) && $input.maxchar}
<script type="text/javascript">
$(document).ready(function() {
countDown($("#{if isset($input.id)}{$input.id}{else}{$input.name}{/if}"), $("#{if isset($input.id)}{$input.id}{else}{$input.name}{/if}_counter"));
});
</script>
{/if}
{elseif $input.type == 'swap'}
<div class="form-group swap-container">
<div class="col-lg-9">
<div class="form-control-static row">
<div class="col-xs-6">
<select {if isset($input.size)}size="{$input.size|escape:'html':'utf-8'}"{/if}{if isset($input.onchange)} onchange="{$input.onchange|escape:'html':'utf-8'}"{/if} class="{if isset($input.class)}{$input.class|escape:'html':'utf-8'}{/if} availableSwap" name="{$input.name|escape:'html':'utf-8'}_available[]" multiple="multiple">
{foreach $input.options.query AS $option}
{if is_object($option)}
{if !in_array($option->$input.options.id, $fields_value[$input.name])}
<option value="{$option->$input.options.id}">{$option->$input.options.name}</option>
{/if}
{elseif $option == "-"}
<option value="">-</option>
{else}
{if !in_array($option[$input.options.id], $fields_value[$input.name])}
<option value="{$option[$input.options.id]}">{$option[$input.options.name]}</option>
{/if}
{/if}
{/foreach}
</select>
<a href="#" class="btn btn-default btn-block addSwap">{l s='Add' d='Admin.Actions'} <i class="icon-arrow-right"></i></a>
</div>
<div class="col-xs-6">
<select {if isset($input.size)}size="{$input.size|escape:'html':'utf-8'}"{/if}{if isset($input.onchange)} onchange="{$input.onchange|escape:'html':'utf-8'}"{/if} class="{if isset($input.class)}{$input.class|escape:'html':'utf-8'}{/if} selectedSwap" name="{$input.name|escape:'html':'utf-8'}_selected[]" multiple="multiple">
{foreach $input.options.query AS $option}
{if is_object($option)}
{if in_array($option->$input.options.id, $fields_value[$input.name])}
<option value="{$option->$input.options.id}">{$option->$input.options.name}</option>
{/if}
{elseif $option == "-"}
<option value="">-</option>
{else}
{if in_array($option[$input.options.id], $fields_value[$input.name])}
<option value="{$option[$input.options.id]}">{$option[$input.options.name]}</option>
{/if}
{/if}
{/foreach}
</select>
<a href="#" class="btn btn-default btn-block removeSwap"><i class="icon-arrow-left"></i> {l s='Remove'}</a>
</div>
</div>
</div>
</div>
{elseif $input.type == 'select'}
{if isset($input.options.query) && !$input.options.query && isset($input.empty_message)}
{$input.empty_message}
{$input.required = false}
{$input.desc = null}
{else}
<select name="{$input.name|escape:'html':'utf-8'}"
class="{if isset($input.class)}{$input.class|escape:'html':'utf-8'}{/if} fixed-width-xl"
id="{if isset($input.id)}{$input.id|escape:'html':'utf-8'}{else}{$input.name|escape:'html':'utf-8'}{/if}"
{if isset($input.multiple) && $input.multiple} multiple="multiple"{/if}
{if isset($input.size)} size="{$input.size|escape:'html':'utf-8'}"{/if}
{if isset($input.onchange)} onchange="{$input.onchange|escape:'html':'utf-8'}"{/if}
{if isset($input.disabled) && $input.disabled} disabled="disabled"{/if}>
{if isset($input.options.default)}
<option value="{$input.options.default.value|escape:'html':'utf-8'}">{$input.options.default.label|escape:'html':'utf-8'}</option>
{/if}
{if isset($input.options.optiongroup)}
{foreach $input.options.optiongroup.query AS $optiongroup}
<optgroup label="{$optiongroup[$input.options.optiongroup.label]}">
{foreach $optiongroup[$input.options.options.query] as $option}
<option value="{$option[$input.options.options.id]}"
{if isset($input.multiple)}
{foreach $fields_value[$input.name] as $field_value}
{if $field_value == $option[$input.options.options.id]}selected="selected"{/if}
{/foreach}
{else}
{if $fields_value[$input.name] == $option[$input.options.options.id]}selected="selected"{/if}
{/if}
>{$option[$input.options.options.name]}</option>
{/foreach}
</optgroup>
{/foreach}
{else}
{foreach $input.options.query AS $option}
{if is_object($option)}
<option value="{$option->$input.options.id}"
{if isset($input.multiple)}
{foreach $fields_value[$input.name] as $field_value}
{if $field_value == $option->$input.options.id}
selected="selected"
{/if}
{/foreach}
{else}
{if $fields_value[$input.name] == $option->$input.options.id}
selected="selected"
{/if}
{/if}
>{$option->$input.options.name}</option>
{elseif $option == "-"}
<option value="">-</option>
{else}
<option value="{$option[$input.options.id]}"
{if isset($input.multiple)}
{foreach $fields_value[$input.name] as $field_value}
{if $field_value == $option[$input.options.id]}
selected="selected"
{/if}
{/foreach}
{else}
{if $fields_value[$input.name] == $option[$input.options.id]}
selected="selected"
{/if}
{/if}
>{$option[$input.options.name]}</option>
{/if}
{/foreach}
{/if}
</select>
{/if}
{elseif $input.type == 'radio'}
{foreach $input.values as $value}
<div class="radio {if isset($input.class)}{$input.class}{/if}">
{strip}
<label>
<input type="radio" name="{$input.name}" id="{$value.id}" value="{$value.value|escape:'html':'UTF-8'}"{if $fields_value[$input.name] == $value.value} checked="checked"{/if}{if (isset($input.disabled) && $input.disabled) or (isset($value.disabled) && $value.disabled)} disabled="disabled"{/if}/>
{$value.label}
</label>
{/strip}
</div>
{if isset($value.p) && $value.p}<p class="help-block">{$value.p}</p>{/if}
{/foreach}
{elseif $input.type == 'switch'}
<span class="switch prestashop-switch fixed-width-lg">
{foreach $input.values as $value}
<input type="radio" name="{$input.name}"{if $value.value == 1} id="{$input.name}_on"{else} id="{$input.name}_off"{/if} value="{$value.value}"{if $fields_value[$input.name] == $value.value} checked="checked"{/if}{if (isset($input.disabled) && $input.disabled) or (isset($value.disabled) && $value.disabled)} disabled="disabled"{/if}/>
{strip}
<label {if $value.value == 1} for="{$input.name}_on"{else} for="{$input.name}_off"{/if}>
{$value.label}
</label>
{/strip}
{/foreach}
<a class="slide-button btn"></a>
</span>
{elseif $input.type == 'textarea'}
{assign var=use_textarea_autosize value=true}
{if isset($input.lang) AND $input.lang}
{foreach $languages as $language}
{if $languages|count > 1}
<div class="form-group translatable-field lang-{$language.id_lang}"{if $language.id_lang != $defaultFormLanguage} style="display:none;"{/if}>
<div class="col-lg-9">
{/if}
{if isset($input.maxchar) && $input.maxchar}
<div class="input-group">
<span id="{if isset($input.id)}{$input.id}_{$language.id_lang}{else}{$input.name}_{$language.id_lang}{/if}_counter" class="input-group-addon">
<span class="text-count-down">{$input.maxchar|intval}</span>
</span>
{/if}
<textarea{if isset($input.readonly) && $input.readonly} readonly="readonly"{/if} name="{$input.name}_{$language.id_lang}" id="{if isset($input.id)}{$input.id}{else}{$input.name}{/if}_{$language.id_lang}" class="{if isset($input.autoload_rte) && $input.autoload_rte}rte autoload_rte{else}textarea-autosize{/if}{if isset($input.class)} {$input.class}{/if}"{if isset($input.maxlength) && $input.maxlength} maxlength="{$input.maxlength|intval}"{/if}{if isset($input.maxchar) && $input.maxchar} data-maxchar="{$input.maxchar|intval}"{/if}>{$fields_value[$input.name][$language.id_lang]|escape:'html':'UTF-8'}</textarea>
{if isset($input.maxchar) && $input.maxchar}
</div>
{/if}
{if $languages|count > 1}
</div>
<div class="col-lg-2">
<button type="button" class="btn btn-default dropdown-toggle" tabindex="-1" data-toggle="dropdown">
{$language.iso_code}
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
{foreach from=$languages item=language}
<li>
<a href="javascript:hideOtherLanguage({$language.id_lang});" tabindex="-1">{$language.name}</a>
</li>
{/foreach}
</ul>
</div>
</div>
{/if}
{/foreach}
{if isset($input.maxchar) && $input.maxchar}
<script type="text/javascript">
$(document).ready(function(){
{foreach from=$languages item=language}
countDown($("#{if isset($input.id)}{$input.id}_{$language.id_lang}{else}{$input.name}_{$language.id_lang}{/if}"), $("#{if isset($input.id)}{$input.id}_{$language.id_lang}{else}{$input.name}_{$language.id_lang}{/if}_counter"));
{/foreach}
});
</script>
{/if}
{else}
{if isset($input.maxchar) && $input.maxchar}
<span id="{if isset($input.id)}{$input.id}_{$language.id_lang}{else}{$input.name}_{$language.id_lang}{/if}_counter" class="input-group-addon">
<span class="text-count-down">{$input.maxchar|intval}</span>
</span>
{/if}
<textarea{if isset($input.readonly) && $input.readonly} readonly="readonly"{/if} name="{$input.name}" id="{if isset($input.id)}{$input.id}{else}{$input.name}{/if}" {if isset($input.cols)}cols="{$input.cols}"{/if} {if isset($input.rows)}rows="{$input.rows}"{/if} class="{if isset($input.autoload_rte) && $input.autoload_rte}rte autoload_rte{else}textarea-autosize{/if}{if isset($input.class)} {$input.class}{/if}"{if isset($input.maxlength) && $input.maxlength} maxlength="{$input.maxlength|intval}"{/if}{if isset($input.maxchar) && $input.maxchar} data-maxchar="{$input.maxchar|intval}"{/if}>{$fields_value[$input.name]|escape:'html':'UTF-8'}</textarea>
{if isset($input.maxchar) && $input.maxchar}
<script type="text/javascript">
$(document).ready(function(){
countDown($("#{if isset($input.id)}{$input.id}{else}{$input.name}{/if}"), $("#{if isset($input.id)}{$input.id}{else}{$input.name}{/if}_counter"));
});
</script>
{/if}
{/if}
{elseif $input.type == 'checkbox'}
{if isset($input.expand)}
<a class="btn btn-default show_checkbox{if strtolower($input.expand.default) == 'hide'} hidden{/if}" href="#">
<i class="icon-{$input.expand.show.icon}"></i>
{$input.expand.show.text}
{if isset($input.expand.print_total) && $input.expand.print_total > 0}
<span class="badge">{$input.expand.print_total}</span>
{/if}
</a>
<a class="btn btn-default hide_checkbox{if strtolower($input.expand.default) == 'show'} hidden{/if}" href="#">
<i class="icon-{$input.expand.hide.icon}"></i>
{$input.expand.hide.text}
{if isset($input.expand.print_total) && $input.expand.print_total > 0}
<span class="badge">{$input.expand.print_total}</span>
{/if}
</a>
{/if}
{foreach $input.values.query as $value}
{assign var=id_checkbox value=$input.name|cat:'_'|cat:$value[$input.values.id]}
<div class="checkbox{if isset($input.expand) && strtolower($input.expand.default) == 'show'} hidden{/if}">
{strip}
<label for="{$id_checkbox}">
<input type="checkbox" name="{$id_checkbox}" id="{$id_checkbox}" class="{if isset($input.class)}{$input.class}{/if}"{if isset($value.val)} value="{$value.val|escape:'html':'UTF-8'}"{/if}{if isset($fields_value[$id_checkbox]) && $fields_value[$id_checkbox]} checked="checked"{/if} />
{$value[$input.values.name]}
</label>
{/strip}
</div>
{/foreach}
{elseif $input.type == 'change-password'}
<div class="row">
<div class="col-lg-12">
<button type="button" id="{$input.name}-btn-change" class="btn btn-default">
<i class="icon-lock"></i>
{l s='Change password...'}
</button>
<div id="{$input.name}-change-container" class="form-password-change well hide">
<div class="form-group">
<label for="old_passwd" class="control-label col-lg-2 required">
{l s='Current password'}
</label>
<div class="col-lg-10">
<div class="input-group fixed-width-lg">
<span class="input-group-addon">
<i class="icon-unlock"></i>
</span>
<input type="password" id="old_passwd" name="old_passwd" class="form-control" value="" required="required" autocomplete="off">
</div>
</div>
</div>
<hr />
<div class="form-group">
<label for="{$input.name}" class="required control-label col-lg-2">
<span class="label-tooltip" data-toggle="tooltip" data-html="true" title="" data-original-title="{l s='Password should be at least 8 characters long.'}">
{l s='New password'}
</span>
</label>
<div class="col-lg-9">
<div class="input-group fixed-width-lg">
<span class="input-group-addon">
<i class="icon-key"></i>
</span>
<input type="password" id="{$input.name}" name="{$input.name}" class="{if isset($input.class)}{$input.class}{/if}" value="" required="required" autocomplete="off"/>
</div>
<span id="{$input.name}-output"></span>
</div>
</div>
<div class="form-group">
<label for="{$input.name}2" class="required control-label col-lg-2">
{l s='Confirm password'}
</label>
<div class="col-lg-4">
<div class="input-group fixed-width-lg">
<span class="input-group-addon">
<i class="icon-key"></i>
</span>
<input type="password" id="{$input.name}2" name="{$input.name}2" class="{if isset($input.class)}{$input.class}{/if}" value="" autocomplete="off"/>
</div>
</div>
</div>
<div class="form-group">
<div class="col-lg-10 col-lg-offset-2">
<input type="text" class="form-control fixed-width-md pull-left" id="{$input.name}-generate-field" disabled="disabled">
<button type="button" id="{$input.name}-generate-btn" class="btn btn-default">
<i class="icon-random"></i>
{l s='Generate password'}
</button>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<button type="button" id="{$input.name}-cancel-btn" class="btn btn-default">
<i class="icon-remove"></i>
{l s='Cancel' d='Admin.Actions'}
</button>
</div>
</div>
</div>
</div>
</div>
<script>
$(function(){
var $oldPwd = $('#old_passwd');
var $passwordField = $('#{$input.name}');
var $output = $('#{$input.name}-output');
var $generateBtn = $('#{$input.name}-generate-btn');
var $generateField = $('#{$input.name}-generate-field');
var $cancelBtn = $('#{$input.name}-cancel-btn');
var feedback = [
{ badge: 'text-danger', text: '{l s="Invalid" js=1}' },
{ badge: 'text-warning', text: '{l s="Okay" js=1}' },
{ badge: 'text-success', text: '{l s="Good" js=1}' },
{ badge: 'text-success', text: '{l s="Fabulous" js=1}' }
];
$.passy.requirements.length.min = 8;
$.passy.requirements.characters = 'DIGIT';
$passwordField.passy(function(strength, valid) {
$output.text(feedback[strength].text);
$output.removeClass('text-danger').removeClass('text-warning').removeClass('text-success');
$output.addClass(feedback[strength].badge);
if (valid){
$output.show();
}
else {
$output.hide();
}
});
var $container = $('#{$input.name}-change-container');
var $changeBtn = $('#{$input.name}-btn-change');
var $confirmPwd = $('#{$input.name}2');
$changeBtn.on('click',function(){
$container.removeClass('hide');
$changeBtn.addClass('hide');
});
$generateBtn.click(function() {
$generateField.passy( 'generate', 8 );
var generatedPassword = $generateField.val();
$passwordField.val(generatedPassword);
$confirmPwd.val(generatedPassword);
});
$cancelBtn.on('click',function() {
$container.find("input").val("");
$container.addClass('hide');
$changeBtn.removeClass('hide');
});
$.validator.addMethod('password_same', function(value, element) {
return $passwordField.val() == $confirmPwd.val();
}, '{l s="Invalid password confirmation" js=1}');
$('#employee_form').validate({
rules: {
"email": {
email: true
},
"{$input.name}" : {
minlength: 8
},
"{$input.name}2": {
password_same: true
},
"old_passwd" : {},
},
// override jquery validate plugin defaults for bootstrap 3
highlight: function(element) {
$(element).closest('.form-group').addClass('has-error');
},
unhighlight: function(element) {
$(element).closest('.form-group').removeClass('has-error');
},
errorElement: 'span',
errorClass: 'help-block',
errorPlacement: function(error, element) {
if(element.parent('.input-group').length) {
error.insertAfter(element.parent());
} else {
error.insertAfter(element);
}
}
});
});
</script>
{elseif $input.type == 'password'}
<div class="input-group fixed-width-lg">
<span class="input-group-addon">
<i class="icon-key"></i>
</span>
<input type="password"
id="{if isset($input.id)}{$input.id}{else}{$input.name}{/if}"
name="{$input.name}"
class="{if isset($input.class)}{$input.class}{/if}"
value=""
{if isset($input.autocomplete) && !$input.autocomplete}autocomplete="off"{/if}
{if isset($input.required) && $input.required } required="required" {/if} />
</div>
{elseif $input.type == 'birthday'}
<div class="form-group">
{foreach $input.options as $key => $select}
<div class="col-lg-2">
<select name="{$key}" class="fixed-width-lg{if isset($input.class)} {$input.class}{/if}">
<option value="">-</option>
{if $key == 'months'}
{*
This comment is useful to the translator tools /!\ do not remove them
{l s='January'}
{l s='February'}
{l s='March'}
{l s='April'}
{l s='May'}
{l s='June'}
{l s='July'}
{l s='August'}
{l s='September'}
{l s='October'}
{l s='November'}
{l s='December'}
*}
{foreach $select as $k => $v}
<option value="{$k}" {if $k == $fields_value[$key]}selected="selected"{/if}>{l s=$v}</option>
{/foreach}
{else}
{foreach $select as $v}
<option value="{$v}" {if $v == $fields_value[$key]}selected="selected"{/if}>{$v}</option>
{/foreach}
{/if}
</select>
</div>
{/foreach}
</div>
{elseif $input.type == 'group'}
{assign var=groups value=$input.values}
{include file='helpers/form/form_group.tpl'}
{elseif $input.type == 'shop'}
{$input.html}
{elseif $input.type == 'categories'}
{$categories_tree}
{elseif $input.type == 'file'}
{$input.file}
{elseif $input.type == 'categories_select'}
{$input.category_tree}
{elseif $input.type == 'asso_shop' && isset($asso_shop) && $asso_shop}
{$asso_shop}
{elseif $input.type == 'color'}
<div class="form-group">
<div class="col-lg-2">
<div class="row">
<div class="input-group">
<input type="color"
data-hex="true"
{if isset($input.class)} class="{$input.class}"
{else} class="color mColorPickerInput"{/if}
name="{$input.name}"
value="{$fields_value[$input.name]|escape:'html':'UTF-8'}" />
</div>
</div>
</div>
</div>
{elseif $input.type == 'date'}
<div class="row">
<div class="input-group col-lg-4">
<input
id="{if isset($input.id)}{$input.id}{else}{$input.name}{/if}"
type="text"
data-hex="true"
{if isset($input.class)} class="{$input.class}"
{else}class="datepicker"{/if}
name="{$input.name}"
value="{$fields_value[$input.name]|escape:'html':'UTF-8'}" />
<span class="input-group-addon">
<i class="icon-calendar-empty"></i>
</span>
</div>
</div>
{elseif $input.type == 'datetime'}
<div class="row">
<div class="input-group col-lg-4">
<input
id="{if isset($input.id)}{$input.id}{else}{$input.name}{/if}"
type="text"
data-hex="true"
{if isset($input.class)} class="{$input.class}"
{else} class="datetimepicker"{/if}
name="{$input.name}"
value="{$fields_value[$input.name]|escape:'html':'UTF-8'}" />
<span class="input-group-addon">
<i class="icon-calendar-empty"></i>
</span>
</div>
</div>
{elseif $input.type == 'free'}
{$fields_value[$input.name]}
{elseif $input.type == 'html'}
{if isset($input.html_content)}
{$input.html_content}
{else}
{$input.name}
{/if}
{/if}
{/block}{* end block input *}
{block name="description"}
{if isset($input.desc) && !empty($input.desc)}
<p class="help-block">
{if is_array($input.desc)}
{foreach $input.desc as $p}
{if is_array($p)}
<span id="{$p.id}">{$p.text}</span><br />
{else}
{$p}<br />
{/if}
{/foreach}
{else}
{$input.desc}
{/if}
</p>
{/if}
{/block}
</div>
{/block}{* end block field *}
{/if}
</div>
{/block}
{/foreach}
{hook h='displayAdminForm' fieldset=$f}
{if isset($name_controller)}
{capture name=hookName assign=hookName}display{$name_controller|ucfirst}Form{/capture}
{hook h=$hookName fieldset=$f}
{elseif isset($smarty.get.controller)}
{capture name=hookName assign=hookName}display{$smarty.get.controller|ucfirst|htmlentities}Form{/capture}
{hook h=$hookName fieldset=$f}
{/if}
</div><!-- /.form-wrapper -->
{elseif $key == 'desc'}
<div class="alert alert-info col-lg-offset-3">
{if is_array($field)}
{foreach $field as $k => $p}
{if is_array($p)}
<span{if isset($p.id)} id="{$p.id}"{/if}>{$p.text}</span><br />
{else}
{$p}
{if isset($field[$k+1])}<br />{/if}
{/if}
{/foreach}
{else}
{$field}
{/if}
</div>
{/if}
{block name="other_input"}{/block}
{/foreach}
{block name="footer"}
{capture name='form_submit_btn'}{counter name='form_submit_btn'}{/capture}
{if isset($fieldset['form']['submit']) || isset($fieldset['form']['buttons'])}
<div class="panel-footer">
{if isset($fieldset['form']['submit']) && !empty($fieldset['form']['submit'])}
<button type="submit" value="1" id="{if isset($fieldset['form']['submit']['id'])}{$fieldset['form']['submit']['id']}{else}{$table}_form_submit_btn{/if}{if $smarty.capture.form_submit_btn > 1}_{($smarty.capture.form_submit_btn - 1)|intval}{/if}" name="{if isset($fieldset['form']['submit']['name'])}{$fieldset['form']['submit']['name']}{else}{$submit_action}{/if}{if isset($fieldset['form']['submit']['stay']) && $fieldset['form']['submit']['stay']}AndStay{/if}" class="{if isset($fieldset['form']['submit']['class'])}{$fieldset['form']['submit']['class']}{else}btn btn-default pull-right{/if}">
<i class="{if isset($fieldset['form']['submit']['icon'])}{$fieldset['form']['submit']['icon']}{else}process-icon-save{/if}"></i> {$fieldset['form']['submit']['title']}
</button>
{/if}
{if isset($show_cancel_button) && $show_cancel_button}
<a class="btn btn-default" {if $table}id="{$table}_form_cancel_btn"{/if} onclick="javascript:window.history.back();">
<i class="process-icon-cancel"></i> {l s='Cancel' d='Admin.Actions'}
</a>
{/if}
{if isset($fieldset['form']['reset'])}
<button
type="reset"
id="{if isset($fieldset['form']['reset']['id'])}{$fieldset['form']['reset']['id']}{else}{$table}_form_reset_btn{/if}"
class="{if isset($fieldset['form']['reset']['class'])}{$fieldset['form']['reset']['class']}{else}btn btn-default{/if}"
>
{if isset($fieldset['form']['reset']['icon'])}<i class="{$fieldset['form']['reset']['icon']}"></i> {/if} {$fieldset['form']['reset']['title']}
</button>
{/if}
{if isset($fieldset['form']['buttons'])}
{foreach from=$fieldset['form']['buttons'] item=btn key=k}
{if isset($btn.href) && trim($btn.href) != ''}
<a href="{$btn.href}" {if isset($btn['id'])}id="{$btn['id']}"{/if} class="btn btn-default{if isset($btn['class'])} {$btn['class']}{/if}" {if isset($btn.js) && $btn.js} onclick="{$btn.js}"{/if}>{if isset($btn['icon'])}<i class="{$btn['icon']}" ></i> {/if}{$btn.title}</a>
{else}
<button type="{if isset($btn['type'])}{$btn['type']}{else}button{/if}" {if isset($btn['id'])}id="{$btn['id']}"{/if} class="btn btn-default{if isset($btn['class'])} {$btn['class']}{/if}" name="{if isset($btn['name'])}{$btn['name']}{else}submitOptions{$table}{/if}"{if isset($btn.js) && $btn.js} onclick="{$btn.js}"{/if}>{if isset($btn['icon'])}<i class="{$btn['icon']}" ></i> {/if}{$btn.title}</button>
{/if}
{/foreach}
{/if}
</div>
{/if}
{/block}
</div>
{/block}
{block name="other_fieldsets"}{/block}
{/foreach}
</form>
{/block}
{block name="after"}{/block}
{if isset($tinymce) && $tinymce}
<script type="text/javascript">
var iso = '{$iso|addslashes}';
var pathCSS = '{$smarty.const._THEME_CSS_DIR_|addslashes}';
var ad = '{$ad|addslashes}';
$(document).ready(function(){
{block name="autoload_tinyMCE"}
tinySetup({
editor_selector :"autoload_rte"
});
{/block}
});
</script>
{/if}
{if isset($color) && $color}
<script type="text/javascript">
$.fn.mColorPicker.defaults.imageFolder = baseDir + 'img/admin/';
</script>
{/if}
{if $firstCall}
<script type="text/javascript">
var module_dir = '{$smarty.const._MODULE_DIR_}';
var id_language = {$defaultFormLanguage|intval};
var languages = new Array();
var vat_number = {if $vat_number}1{else}0{/if};
// Multilang field setup must happen before document is ready so that calls to displayFlags() to avoid
// precedence conflicts with other document.ready() blocks
{foreach $languages as $k => $language}
languages[{$k}] = {
id_lang: {$language.id_lang|escape:'javascript'},
iso_code: '{$language.iso_code|escape:'javascript'}',
name: '{$language.name|escape:'javascript'}',
is_default: '{$language.is_default|escape:'javascript'}'
};
{/foreach}
// we need allowEmployeeFormLang var in ajax request
allowEmployeeFormLang = {$allowEmployeeFormLang|intval};
displayFlags(languages, id_language, allowEmployeeFormLang);
$(document).ready(function() {
$(".show_checkbox").click(function () {
$(this).addClass('hidden')
$(this).siblings('.checkbox').removeClass('hidden');
$(this).siblings('.hide_checkbox').removeClass('hidden');
return false;
});
$(".hide_checkbox").click(function () {
$(this).addClass('hidden')
$(this).siblings('.checkbox').addClass('hidden');
$(this).siblings('.show_checkbox').removeClass('hidden');
return false;
});
{if isset($fields_value.id_state)}
if ($('#id_country') && $('#id_state'))
{
ajaxStates({$fields_value.id_state});
$('#id_country').change(function() {
ajaxStates();
});
}
{/if}
dniRequired();
$('#id_country').change(dniRequired);
if ($(".datepicker").length > 0)
$(".datepicker").datepicker({
prevText: '',
nextText: '',
dateFormat: 'yy-mm-dd'
});
if ($(".datetimepicker").length > 0)
$('.datetimepicker').datetimepicker({
prevText: '',
nextText: '',
dateFormat: 'yy-mm-dd',
// Define a custom regional settings in order to use PrestaShop translation tools
currentText: '{l s='Now' js=1}',
closeText: '{l s='Done' js=1}',
ampm: false,
amNames: ['AM', 'A'],
pmNames: ['PM', 'P'],
timeFormat: 'hh:mm:ss tt',
timeSuffix: '',
timeOnlyTitle: '{l s='Choose Time' js=1}',
timeText: '{l s='Time' js=1}',
hourText: '{l s='Hour' js=1}',
minuteText: '{l s='Minute' js=1}',
});
{if isset($use_textarea_autosize)}
$(".textarea-autosize").autosize();
{/if}
});
state_token = '{getAdminToken tab='AdminStates'}';
address_token = '{getAdminToken tab='AdminAddresses'}';
{block name="script"}{/block}
</script>
{/if}

View File

@@ -0,0 +1,93 @@
{**
* 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)
*}
{if count($categories) && isset($categories)}
<script type="text/javascript">
var inputName = '{$categories.input_name|@addcslashes:'\''}';
var use_radio = {if $categories.use_radio}1{else}0{/if};
var selectedCat = {$categories.selected_cat|@implode|intval};
var selectedLabel = '{$categories.trads.selected|@addcslashes:'\''}';
var home = '{$categories.trads.Root.name|@addcslashes:'\''}';
var use_radio = {if $categories.use_radio}1{else}0{/if};
var use_context = {if isset($categories.use_context)}1{else}0{/if};
</script>
<div class="panel">
<div class="category-filter panel-heading">
<a href="#" id="collapse_all" class="btn btn-link"><i class="icon-collapse-alt icon-large"></i> {$categories.trads['Collapse All']}</a>
<a href="#" id="expand_all" class="btn btn-link"><i class="icon-expand-alt icon-large"></i> {$categories.trads['Expand All']}</a>
{if !$categories.use_radio}
<a href="#" id="check_all" class="btn btn-link"><i class="icon-check-sign"></i> {$categories.trads['Check All']}</a>
<a href="#" id="uncheck_all" class="btn btn-link"><i class="icon-check-empty"></i> {$categories.trads['Uncheck All']}</a>
{/if}
{if $categories.use_search}
<span>
{$categories.trads.search}:&nbsp;
<form method="post" id="filternameForm">
<input type="text" name="search_cat" id="search_cat"/>
</form>
</span>
{/if}
</div>
{assign var=home_is_selected value=false}
{foreach $categories.selected_cat AS $cat}
{if is_array($cat)}
{if $cat.id_category != $categories.trads.Root.id_category}
<input {if in_array($cat.id_category, $categories.disabled_categories)}disabled="disabled"{/if} type="hidden" name="{$categories.input_name}" value="{$cat.id_category}"/>
{else}
{assign var=home_is_selected value=true}
{/if}
{else}
{if $cat != $categories.trads.Root.id_category}
<input {if in_array($cat, $categories.disabled_categories)}disabled="disabled"{/if} type="hidden" name="{$categories.input_name}" value="{$cat}"/>
{else}
{assign var=home_is_selected value=true}
{/if}
{/if}
{/foreach}
<ul id="categories-treeview" class="filetree">
<li id="{$categories.trads.Root.id_category}" class="hasChildren">
<span class="folder">
{if $categories.top_category->id != $categories.trads.Root.id_category}
<input type="{if !$categories.use_radio}checkbox{else}radio{/if}"
name="{$categories.input_name}"
value="{$categories.trads.Root.id_category}"
{if $home_is_selected}checked="checked"{/if}
onclick="clickOnCategoryBox($(this));"/>
<span class="category_label">{$categories.trads.Root.name}</span>
{else}
&nbsp;
{/if}
</span>
<ul>
<li><span class="placeholder">&nbsp;</span></li>
</ul>
</li>
</ul>
{if $categories.use_radio}
<script type="text/javascript">
searchCategory();
</script>
{/if}
</div>
{/if}

View File

@@ -0,0 +1,66 @@
{**
* 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)
*}
{if count($groups) && isset($groups)}
<div class="row">
<div class="col-lg-6">
<table class="table table-bordered">
<thead>
<tr>
<th class="fixed-width-xs">
<span class="title_box">
<input type="checkbox" name="checkme" id="checkme" onclick="checkDelBoxes(this.form, 'groupBox[]', this.checked)" />
</span>
</th>
<th class="fixed-width-xs"><span class="title_box">{l s='ID' d='Admin.Global'}</span></th>
<th>
<span class="title_box">
{l s='Group name'}
</span>
</th>
</tr>
</thead>
<tbody>
{foreach $groups as $key => $group}
<tr>
<td>
{assign var=id_checkbox value=groupBox|cat:'_'|cat:$group['id_group']}
<input type="checkbox" name="groupBox[]" class="groupBox" id="{$id_checkbox}" value="{$group['id_group']}" {if $fields_value[$id_checkbox]}checked="checked"{/if} />
</td>
<td>{$group['id_group']}</td>
<td>
<label for="{$id_checkbox}">{$group['name']}</label>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
{else}
<p>
{l s='No group created'}
</p>
{/if}

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -0,0 +1,110 @@
{**
* 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)
*}
<{if isset($href) && $href}a style="display:block" href="{$href|escape:'html':'UTF-8'}"{else}div{/if} id="{$id|escape:'html':'UTF-8'}" data-toggle="tooltip" class="box-stats label-tooltip {$color|escape}" data-original-title="{$tooltip|escape}">
<div class="kpi-content">
{if isset($icon) && $icon}
<i class="{$icon|escape}"></i>
{/if}
{if isset($chart) && $chart}
<div class="boxchart-overlay">
<div class="boxchart">
</div>
</div>
{/if}
<span class="title">{$title|escape}</span>
<span cLass="subtitle">{$subtitle|escape}</span>
<span class="value">{$value|escape|replace:'&amp;':'&'}</span>
</div>
</{if isset($href) && $href}a{else}div{/if}>
<script>
function refresh_{$id|replace:'-':'_'|addslashes}()
{
{if !isset($source) || $source == '' || !isset($refresh) || $refresh == ''}
if (arguments.length < 1 || arguments[0] != true) {
// refresh kpis only if force mode is true (pass true as first argument of this function).
return;
}
{/if}
$.ajax({
url: '{$source|addslashes}' + '&rand=' + new Date().getTime(),
dataType: 'json',
type: 'GET',
cache: false,
headers: { 'cache-control': 'no-cache' },
success: function(jsonData){
if (!jsonData.has_errors)
{
if (jsonData.value != undefined)
{
$('#{$id|addslashes} .value').html(jsonData.value);
$('#{$id|addslashes}').attr('data-original-title', jsonData.tooltip);
}
if (jsonData.data != undefined)
{
$("#{$id|addslashes} .boxchart svg").remove();
set_d3_{$id|replace:'-':'_'|addslashes}(jsonData.data);
}
}
}
});
}
</script>
{if $chart}
<script>
function set_d3_{$id|str_replace:'-':'_'|addslashes}(jsonObject)
{
var data = new Array;
$.each(jsonObject, function (index, value) {
data.push(value);
});
var data_max = d3.max(data);
var chart = d3.select("#{$id|addslashes} .boxchart").append("svg")
.attr("class", "data_chart")
.attr("width", data.length * 6)
.attr("height", 45);
var y = d3.scale.linear()
.domain([0, data_max])
.range([0, data_max * 45]);
chart.selectAll("rect")
.data(data)
.enter().append("rect")
.attr("y", function(d) { return 45 - d * 45 / data_max; })
.attr("x", function(d, i) { return i * 6; })
.attr("width", 4)
.attr("height", y);
}
{if $data}
set_d3_{$id|replace:'-':'_'|addslashes}($.parseJSON("{$data|addslashes}"));
{/if}
</script>
{/if}

View File

@@ -0,0 +1,39 @@
{**
* 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)
*}
<div class="panel kpi-container">
{if $refresh}
<div class="kpi-refresh"><button class="close refresh" type="button" onclick="refresh_kpis(true);"><i class="process-icon-refresh" style="font-size:1em"></i></button></div>
{/if}
<div class="row">
{assign var='col' value=(int)(12 / $kpis|count)}
{foreach from=$kpis item=i name=kpi}
{if $smarty.foreach.kpi.iteration > $col+1}
</div>
<div class="row">
{/if}
<div class="col-sm-6 col-lg-{$col}">{$i}</div>
{/foreach}
</div>
</div>

View File

@@ -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;

View File

@@ -0,0 +1,27 @@
{**
* 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}
{$content}
{$footer}

View File

@@ -0,0 +1,27 @@
{**
* 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 href="{$href|escape:'html':'UTF-8'}" class="edit btn btn-default" title="{$action}">
<i class="icon-circle-arrow-up"></i> {$action}
</a>

View File

@@ -0,0 +1,27 @@
{**
* 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 href="{$href|escape:'html':'UTF-8'}" title="{$action}"{if isset($name)} name="{$name|escape:'html':'UTF-8'}"{/if} class="default">
<i class="icon-asterisk"></i> {$action}
</a>

View File

@@ -0,0 +1,30 @@
{**
* 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 href="#"
title="{$action|escape:'html':'UTF-8'}"
class="delete"
onclick="{if $confirm}confirm_link('', '{$confirm|escape:'html':'UTF-8'}', '{l s='Yes' d='Admin.Global'}', '{l s='No' d='Admin.Global'}', '{$href|escape:'html':'UTF-8'}', '#'){else}event.stopPropagation();event.preventDefault(){/if}">
<i class="icon-trash"></i> {$action|escape:'html':'UTF-8'}
</a>

View File

@@ -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 href="{$href|escape:'html':'UTF-8'}" id="details_{$params.action|escape:'html':'UTF-8'}_{$id|escape:'html':'UTF-8'}" title="{$action|escape:'html':'UTF-8'}" class="">
<i class="icon-eye-open"></i> {$action|escape:'html':'UTF-8'}
</a>

View File

@@ -0,0 +1,27 @@
{**
* 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 href="#" title="{$action|escape:'html':'UTF-8'}" onclick="{if $confirm}confirm_link('', '{$confirm|escape:'html':'UTF-8'}', '{l s='Yes' d='Admin.Global'}', '{l s='No' d='Admin.Global'}', '{$location_ok|escape:'html':'UTF-8'}', '{$location_ko|escape:'html':'UTF-8'}'){else}document.location = '{$location_ko|escape:'html':'UTF-8'}'{/if}">
<i class="icon-copy"></i> {$action}
</a>

View File

@@ -0,0 +1,27 @@
{**
* 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 href="{$href|escape:'html':'UTF-8'}" title="{$action|escape:'html':'UTF-8'}" class="edit">
<i class="icon-pencil"></i> {$action|escape:'html':'UTF-8'}
</a>

View File

@@ -0,0 +1,34 @@
{**
* 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)
*}
{* Workaround to add compatibility for enable/disable actions to be able to use symfony endpoints *}
{if isset($migrated_url_enable)}
{assign var="url_enable" value=$migrated_url_enable}
{/if}
<a class="list-action-enable{if isset($ajax) && $ajax} ajax_table_link{/if}{if $enabled} action-enabled{else} action-disabled{/if}" href="{$url_enable|escape:'html':'UTF-8'}"{if isset($confirm)} onclick="return confirm('{$confirm}');"{/if} title="{if $enabled}{l s='Enabled' d='Admin.Global'}{else}{l s='Disabled' d='Admin.Global'}{/if}">
<i class="icon-check{if !$enabled} hidden{/if}"></i>
<i class="icon-remove{if $enabled} hidden{/if}"></i>
</a>

View File

@@ -0,0 +1,27 @@
{**
* 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 href="{$href}" title="{$action|escape:'html':'UTF-8'}" target="_blank">
<i class="icon-eye"></i> {$action}
</a>

View File

@@ -0,0 +1,27 @@
{**
* 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 href="{$href|escape:'html':'UTF-8'}" title="{$action|escape:'html':'UTF-8'}">
<i class="icon-circle-arrow-down"></i> {$action|escape:'html':'UTF-8'}
</a>

View File

@@ -0,0 +1,27 @@
{**
* 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 href="{$href|escape:'html':'UTF-8'}" class="edit btn btn-default" title="{$action|escape:'html':'UTF-8'}">
<i class="icon-truck"></i> {$action|escape:'html':'UTF-8'}
</a>

View File

@@ -0,0 +1,27 @@
{**
* 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 href="{$href|escape:'html':'UTF-8'}" title="{$action|escape:'html':'UTF-8'}">
<i class="icon-time"></i> {$action|escape:'html':'UTF-8'}
</a>

View File

@@ -0,0 +1,27 @@
{**
* 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 href="{$href|escape:'html':'UTF-8'}" onclick="return confirm('{$confirm}');" title="{$action|escape:'html':'UTF-8'}">
<i class="icon-copy"></i> {$action}
</a>

View File

@@ -0,0 +1,27 @@
{**
* 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 href="{$href|escape:'html':'UTF-8'}" class="edit btn btn-default" title="{$action|escape:'html':'UTF-8'}">
<i class="icon-truck"></i> {$action|escape:'html':'UTF-8'}
</a>

View File

@@ -0,0 +1,27 @@
{**
* 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 href="{$href|escape:'html':'UTF-8'}" title="{$action|escape:'html':'UTF-8'}">
<i class="icon-exchange"></i> {$action|escape:'html':'UTF-8'}
</a>

View File

@@ -0,0 +1,27 @@
{**
* 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 href="{$href|escape:'html':'UTF-8'}" title="{$action|escape:'html':'UTF-8'}" >
<i class="icon-search-plus"></i> {$action|escape:'html':'UTF-8'}
</a>

View File

@@ -0,0 +1,215 @@
{**
* 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)
*}
{capture name='tr_count'}{counter name='tr_count'}{/capture}
<tbody>
{if count($list)}
{foreach $list AS $index => $tr}
<tr{if $position_identifier} id="tr_{$position_group_identifier}_{$tr.$identifier}_{if isset($tr.position['position'])}{$tr.position['position']}{else}0{/if}"{/if} class="{if isset($tr.class)}{$tr.class}{/if} {if $tr@iteration is odd by 1}odd{/if}"{if isset($tr.color) && $color_on_bg} style="background-color: {$tr.color}"{/if} >
{if $bulk_actions && $has_bulk_actions}
<td class="row-selector text-center">
{if isset($list_skip_actions.delete)}
{if !in_array($tr.$identifier, $list_skip_actions.delete)}
<input type="checkbox" name="{$list_id}Box[]" value="{$tr.$identifier}"{if isset($checked_boxes) && is_array($checked_boxes) && in_array({$tr.$identifier}, $checked_boxes)} checked="checked"{/if} class="noborder" />
{/if}
{else}
<input type="checkbox" name="{$list_id}Box[]" value="{$tr.$identifier}"{if isset($checked_boxes) && is_array($checked_boxes) && in_array({$tr.$identifier}, $checked_boxes)} checked="checked"{/if} class="noborder" />
{/if}
</td>
{/if}
{foreach $fields_display AS $key => $params}
{block name="open_td"}
<td
{if isset($params.position)}
id="td_{if !empty($position_group_identifier)}{$position_group_identifier}{else}0{/if}_{$tr.$identifier}{if $smarty.capture.tr_count > 1}_{($smarty.capture.tr_count - 1)|intval}{/if}"
{/if}
class="{strip}{if !$no_link}pointer{/if}
{if isset($key)} column-{$key|lower}{/if}
{if isset($params.position) && $order_by == 'position' && $order_way != 'DESC'} dragHandle{/if}
{if isset($params.class)} {$params.class}{/if}
{if isset($params.align)} {$params.align}{/if}{/strip}"
{if (!isset($params.position) && !$no_link && !isset($params.remove_onclick))}
{if isset($tr.link) }
onclick="document.location = '{$tr.link|addslashes|escape:'html':'UTF-8'}'">
{else}
onclick="document.location = '{$current_index|addslashes|escape:'html':'UTF-8'}&amp;{$identifier|escape:'html':'UTF-8'}={$tr.$identifier|escape:'html':'UTF-8'}{if $view}&amp;view{else}&amp;update{/if}{$table|escape:'html':'UTF-8'}{if $page > 1}&amp;page={$page|intval}{/if}&amp;token={$token|escape:'html':'UTF-8'}'">
{/if}
{else}
>
{/if}
{/block}
{block name="td_content"}
{if isset($params.prefix)}{$params.prefix}{/if}
{if isset($params.badge_success) && $params.badge_success && isset($tr.badge_success) && $tr.badge_success == $params.badge_success}<span class="badge badge-success">{/if}
{if isset($params.badge_warning) && $params.badge_warning && isset($tr.badge_warning) && $tr.badge_warning == $params.badge_warning}<span class="badge badge-warning">{/if}
{if isset($params.badge_danger) && $params.badge_danger && isset($tr.badge_danger) && $tr.badge_danger == $params.badge_danger}<span class="badge badge-danger">{/if}
{if isset($params.color) && isset($tr[$params.color])}
<span class="label color_field" style="background-color:{$tr[$params.color]};color:{if !Tools::isBright($tr[$params.color])}white{else}#383838{/if}">
{/if}
{if isset($tr.$key)}
{if isset($params.active)}
{$tr.$key}
{elseif isset($params.callback)}
{if isset($params.maxlength) && Tools::strlen($tr.$key) > $params.maxlength}
<span title="{$tr.$key}">{$tr.$key|truncate:$params.maxlength:'...'}</span>
{else}
{$tr.$key}
{/if}
{elseif isset($params.activeVisu)}
{if $tr.$key}
<i class="icon-check-ok"></i> {l s='Enabled' d='Admin.Global'}
{else}
<i class="icon-remove"></i> {l s='Disabled' d='Admin.Global'}
{/if}
{elseif isset($params.position)}
{if !$filters_has_value && $order_by == 'position' && $order_way != 'DESC'}
<div class="dragGroup">
<div class="positions">
{$tr.$key.position + 1}
</div>
</div>
{else}
{$tr.$key.position + 1}
{/if}
{elseif isset($params.image)}
{$tr.$key}
{elseif isset($params.icon)}
{if is_array($tr[$key])}
{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.type) && $params.type == 'price'}
{if isset($tr.id_currency)}
{displayPrice price=$tr.$key currency=$tr.id_currency}
{else}
{displayPrice price=$tr.$key}
{/if}
{elseif isset($params.float)}
{$tr.$key}
{elseif isset($params.type) && $params.type == 'date'}
{dateFormat date=$tr.$key full=0}
{elseif isset($params.type) && $params.type == 'datetime'}
{dateFormat date=$tr.$key full=1}
{elseif isset($params.type) && $params.type == 'decimal'}
{$tr.$key|string_format:"%.2f"}
{elseif isset($params.type) && $params.type == 'percent'}
{$tr.$key} {l s='%'}
{elseif isset($params.type) && $params.type == 'bool'}
{if $tr.$key == 1}
{l s='Yes' d='Admin.Global'}
{elseif $tr.$key == 0 && $tr.$key != ''}
{l s='No' d='Admin.Global'}
{/if}
{* 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|escape:'html':'UTF-8'}" class="{$key}" />
{elseif $key == 'color'}
{if !is_array($tr.$key)}
<div style="background-color: {$tr.$key};" class="attributes-color-container"></div>
{else} {*TEXTURE*}
<img src="{$tr.$key.texture}" alt="{$tr.name}" class="attributes-color-container" />
{/if}
{elseif isset($params.maxlength) && Tools::strlen($tr.$key) > $params.maxlength}
<span title="{$tr.$key|escape:'html':'UTF-8'}">{$tr.$key|truncate:$params.maxlength:'...'|escape:'html':'UTF-8'}</span>
{else}
{$tr.$key|escape:'html':'UTF-8'}
{/if}
{else}
{block name="default_field"}--{/block}
{/if}
{if isset($params.suffix)}{$params.suffix}{/if}
{if isset($params.color) && isset($tr.color)}
</span>
{/if}
{if isset($params.badge_danger) && $params.badge_danger && isset($tr.badge_danger) && $tr.badge_danger == $params.badge_danger}</span>{/if}
{if isset($params.badge_warning) && $params.badge_warning && isset($tr.badge_warning) && $tr.badge_warning == $params.badge_warning}</span>{/if}
{if isset($params.badge_success) && $params.badge_success && isset($tr.badge_success) && $tr.badge_success == $params.badge_success}</span>{/if}
{/block}
{block name="close_td"}
</td>
{/block}
{/foreach}
{if $multishop_active && $shop_link_type}
<td title="{$tr.shop_name}">
{if isset($tr.shop_short_name)}
{$tr.shop_short_name}
{else}
{$tr.shop_name}
{/if}
</td>
{/if}
{if $has_actions}
<td class="text-right">
{assign var='compiled_actions' value=array()}
{foreach $actions AS $key => $action}
{if isset($tr.$action)}
{if $key == 0}
{assign var='action' value=$action}
{/if}
{if $action == 'delete' && $actions|@count > 2}
{$compiled_actions[] = 'divider'}
{/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]}
{if $compiled_actions|count > 1}
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="icon-caret-down"></i>
</button>
<ul class="dropdown-menu">
{foreach $compiled_actions AS $key => $action}
{if $key != 0}
<li{if $action == 'divider' && $compiled_actions|count > 3} class="divider"{/if}>
{if $action != 'divider'}{$action}{/if}
</li>
{/if}
{/foreach}
</ul>
{/if}
</div>
{if $compiled_actions|count > 1}</div>{/if}
{/if}
</td>
{/if}
</tr>
{/foreach}
{else}
<tr>
<td class="list-empty" colspan="{count($fields_display)+1}">
<div class="list-empty-msg">
<i class="icon-warning-sign list-empty-icon"></i>
{l s='No records found'}
</div>
</td>
</tr>
{/if}
</tbody>

View File

@@ -0,0 +1,170 @@
{**
* 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-6">
{if $bulk_actions && $has_bulk_actions}
<div class="btn-group bulk-actions dropup">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" {if $table}id="bulk_action_menu_{$table}"{/if}>
{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), '{$list_id}Box[]', true);return false;">
<i class="icon-check-sign"></i>&nbsp;{l s='Select all'}
</a>
</li>
<li>
<a href="#" onclick="javascript:checkDelBoxes($(this).closest('form').get(0), '{$list_id}Box[]', false);return false;">
<i class="icon-check-empty"></i>&nbsp;{l s='Unselect all'}
</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}&nbsp;{$params.text}
</a>
{/if}
</li>
{/foreach}
</ul>
</div>
{/if}
</div>
{if !$simple_header && $list_total > $pagination[0]}
<div class="col-lg-6">
{* Choose number of results per page *}
<div class="pagination">
{l s='Display'}
<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)'}
<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);">&hellip;</a>
</li>
{assign p $page-3}
{elseif $p > $page+2}
<li class="disabled">
<a href="javascript:void(0);">&hellip;</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>
{block name="footer"}
{foreach from=$toolbar_btn item=btn key=k}
{if $k == 'back'}
{assign 'back_button' $btn}
{break}
{/if}
{/foreach}
{if isset($back_button)}
<div class="panel-footer">
<a id="desc-{$table}-{if isset($back_button.imgclass)}{$back_button.imgclass}{else}{$k}{/if}" class="btn btn-default{if isset($back_button.target) && $back_button.target} _blank{/if}"{if isset($back_button.href)} href="{$back_button.href|escape:'html':'UTF-8'}"{/if}{if isset($back_button.js) && $back_button.js} onclick="{$back_button.js}"{/if}>
<i class="process-icon-back {if isset($back_button.class)}{$back_button.class}{/if}" ></i> <span {if isset($back_button.force_desc) && $back_button.force_desc == true } class="locked" {/if}>{$back_button.desc}</span>
</a>
</div>
{/if}
{/block}
{if !$simple_header}
<input type="hidden" name="token" value="{$token|escape:'html':'UTF-8'}" />
</div>
{else}
</div>
{/if}
{hook h='displayAdminListAfter'}
{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="endForm"}
</form>
{/block}
{block name="after"}{/block}

View File

@@ -0,0 +1,418 @@
{**
* 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)
*}
{if $ajax}
<script type="text/javascript">
$(function () {
$(".ajax_table_link").click(function () {
var link = $(this);
$.post($(this).attr('href'), function (data) {
// If response comes from symfony controller
// then data has "status" and "message" properties
// otherwise if response comes from legacy controller
// then data has "success" and "text" properties.
if (data.success == 1 || data.status === true) {
showSuccessMessage(data.text || data.message);
if (link.hasClass('action-disabled')){
link.removeClass('action-disabled').addClass('action-enabled');
} else {
link.removeClass('action-enabled').addClass('action-disabled');
}
link.children().each(function () {
if ($(this).hasClass('hidden')) {
$(this).removeClass('hidden');
} else {
$(this).addClass('hidden');
}
});
} else {
showErrorMessage(data.text || data.message);
}
}, 'json');
return false;
});
});
</script>
{/if}
{* Display column names and arrows for ordering (ASC, DESC) *}
{if $is_order_position}
<script type="text/javascript" src="../js/jquery/plugins/jquery.tablednd.js"></script>
<script type="text/javascript">
var come_from = '{$list_id|addslashes}';
var alternate = {if $order_way == 'DESC'}'1'{else}'0'{/if};
</script>
<script type="text/javascript" src="../js/admin/dnd.js"></script>
{/if}
{if !$simple_header}
<script type="text/javascript">
$(function() {
$('table.{$list_id} .filter').keypress(function(e){
var key = (e.keyCode ? e.keyCode : e.which);
if (key == 13)
{
e.preventDefault();
formSubmit(e, 'submitFilterButton{$list_id}');
}
})
$('#submitFilterButton{$list_id}').click(function() {
$('#submitFilter{$list_id}').val(1);
});
if ($("table .datepicker").length > 0) {
$("table .datepicker").datepicker({
prevText: '',
nextText: '',
altFormat: 'yy-mm-dd'
});
}
});
</script>
{/if}
{if !$simple_header}
<div class="leadin">
{block name="leadin"}{/block}
</div>
{/if}
{block name="override_header"}{/block}
{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}
<div class="alert alert-warning" id="{$list_id}-empty-filters-alert" style="display:none;">{l s='Please fill at least one field to perform a search in this list.'}</div>
{if isset($sql) && $sql}
<form id="sql_form_{$list_id|escape:'html':'UTF-8'}" action="{$link->getAdminLink('AdminRequestSql', true, [], ['addrequest_sql' => 1])|escape}" method="post" class="hide">
<input type="hidden" id="sql_query_{$list_id|escape:'html':'UTF-8'}" name="sql" value="{$sql|escape}"/>
<input type="hidden" id="sql_name_{$list_id|escape:'html':'UTF-8'}" name="name" value=""/>
</form>
{/if}
{block name="startForm"}
<form method="post" action="{$action|escape:'html':'UTF-8'}" class="form-horizontal clearfix" id="form-{$list_id}">
{/block}
{if !$simple_header}
<input type="hidden" id="submitFilter{$list_id}" name="submitFilter{$list_id}" value="0"/>
<input type="hidden" name="page" value="{$page|intval}"/>
<input type="hidden" name="selected_pagination" value="{$selected_pagination|intval}"/>
{block name="override_form_extra"}{/block}
<div class="panel col-lg-12">
<div class="panel-heading">
{if isset($icon)}
<i class="{$icon}"></i>
{/if}
{if is_array($title)}
{$title|end|escape:'html':'UTF-8'}
{else}
{$title|escape:'html':'UTF-8'}
{/if}
{if isset($toolbar_btn) && count($toolbar_btn) >0}
<span class="badge">{$list_total}</span>
<span class="panel-heading-action">
{foreach from=$toolbar_btn item=btn key=k}
{if $k != 'modules-list' && $k != 'back'}
<a id="desc-{$table}-{if isset($btn.imgclass)}{$btn.imgclass}{else}{$k}{/if}" class="list-toolbar-btn{if isset($btn.target) && $btn.target} _blank{/if}"{if isset($btn.href)} href="{$btn.href|escape:'html':'UTF-8'}"{/if}{if isset($btn.js) && $btn.js} onclick="{$btn.js}"{/if}>
<span title="" data-toggle="tooltip" class="label-tooltip" data-original-title="{l s=$btn.desc}" data-html="true" data-placement="top">
<i class="process-icon-{if isset($btn.imgclass)}{$btn.imgclass}{else}{$k}{/if}{if isset($btn.class)} {$btn.class}{/if}"></i>
</span>
</a>
{/if}
{/foreach}
<a class="list-toolbar-btn" href="javascript:location.reload();">
<span title="" data-toggle="tooltip" class="label-tooltip" data-original-title="{l s='Refresh list'}" data-html="true" data-placement="top">
<i class="process-icon-refresh"></i>
</span>
</a>
{if isset($sql) && $sql}
{assign var=sql_manager value=Profile::getProfileAccess(Context::getContext()->employee->id_profile, Tab::getIdFromClassName('AdminRequestSql'))}
{if $sql_manager.view == 1}
<a class="list-toolbar-btn" href="javascript:void(0);" onclick="$('.leadin').first().append('<div class=\'alert alert-info\'>' + $('#sql_query_{$list_id|escape:'html':'UTF-8'}').val() + '</div>'); $(this).attr('onclick', '');">
<span class="label-tooltip" data-toggle="tooltip" data-original-title="{l s='Show SQL query'}" data-html="true" data-placement="top" >
<i class="process-icon-terminal"></i>
</span>
</a>
<a class="list-toolbar-btn" href="javascript:void(0);" onclick="$('#sql_name_{$list_id|escape:'html':'UTF-8'}').val(createSqlQueryName()); $('#sql_query_{$list_id|escape:'html':'UTF-8'}').val($('#sql_query_{$list_id|escape:'html':'UTF-8'}').val().replace(/\s+limit\s+[0-9,\s]+$/ig, '').trim()); $('#sql_form_{$list_id|escape:'html':'UTF-8'}').submit();">
<span class="label-tooltip" data-toggle="tooltip" data-original-title="{l s='Export to SQL Manager'}" data-html="true" data-placement="top" >
<i class="process-icon-database"></i>
</span>
</a>
{/if}
{/if}
</span>
{/if}
</div>
{if $show_toolbar}
<script type="text/javascript">
//<![CDATA[
var submited = false;
$(function() {
//get reference on save link
btn_save = $('i[class~="process-icon-save"]').parent();
//get reference on form submit button
btn_submit = $('#{$table}_form_submit_btn');
if (btn_save.length > 0 && btn_submit.length > 0) {
//get reference on save and stay link
btn_save_and_stay = $('i[class~="process-icon-save-and-stay"]').parent();
//get reference on current save link label
lbl_save = $('#desc-{$table}-save div');
//override save link label with submit button value
if (btn_submit.val().length > 0) {
lbl_save.html(btn_submit.attr("value"));
}
if (btn_save_and_stay.length > 0) {
//get reference on current save link label
lbl_save_and_stay = $('#desc-{$table}-save-and-stay div');
//override save and stay link label with submit button value
if (btn_submit.val().length > 0 && lbl_save_and_stay && !lbl_save_and_stay.hasClass('locked')) {
lbl_save_and_stay.html(btn_submit.val() + " {l s='and stay'} ");
}
}
//hide standard submit button
btn_submit.hide();
//bind enter key press to validate form
$('#{$table}_form').keypress(function (e) {
if (e.which == 13 && e.target.localName != 'textarea') {
$('#desc-{$table}-save').click();
}
});
//submit the form
{block name=formSubmit}
btn_save.click(function() {
// Avoid double click
if (submited) {
return false;
}
submited = true;
//add hidden input to emulate submit button click when posting the form -> field name posted
btn_submit.before('<input type="hidden" name="'+btn_submit.attr("name")+'" value="1" />');
$('#{$table}_form').submit();
return false;
});
if (btn_save_and_stay) {
btn_save_and_stay.click(function() {
//add hidden input to emulate submit button click when posting the form -> field name posted
btn_submit.before('<input type="hidden" name="'+btn_submit.attr("name")+'AndStay" value="1" />');
$('#{$table}_form').submit();
return false;
});
}
{/block}
}
});
//]]>
</script>
{/if}
{elseif $simple_header}
<div class="panel col-lg-12">
{if isset($title)}<h3>{if isset($icon)}<i class="{$icon}"></i> {/if}{if is_array($title)}{$title|end|escape:'html':'UTF-8'}{else}{$title|escape:'html':'UTF-8'}{/if}</h3>{/if}
{/if}
{if $bulk_actions && $has_bulk_actions}
{assign var=y value=2}
{else}
{assign var=y value=1}
{/if}
<style>
@media (max-width: 992px) {
{foreach from=$fields_display item=param name=params}
.table-responsive-row td:nth-of-type({math equation="x+y" x=$smarty.foreach.params.index y=$y}):before {
content: "{$param.title}";
}
{/foreach}
}
</style>
{block name="preTable"}{/block}
<div class="table-responsive-row clearfix{if isset($use_overflow) && $use_overflow} overflow-y{/if}">
<table id="table-{if $table_id}{$table_id}{elseif $table}{$table}{/if}" class="table{if $table_dnd} tableDnD{/if} {$table}" >
<thead>
<tr class="nodrag nodrop">
{if $bulk_actions && $has_bulk_actions}
<th class="center fixed-width-xs"></th>
{/if}
{foreach $fields_display AS $key => $params}
<th class="{if isset($params.class)}{$params.class}{/if}{if isset($params.align)} {$params.align}{/if}">
<span class="title_box{if isset($order_by) && ($key == $order_by)} active{/if}">
{if isset($params.hint)}
<span class="label-tooltip" data-toggle="tooltip"
title="
{if is_array($params.hint)}
{foreach $params.hint as $hint}
{if is_array($hint)}
{$hint.text}
{else}
{$hint}
{/if}
{/foreach}
{else}
{$params.hint}
{/if}
">
{$params.title}
</span>
{else}
{$params.title}
{/if}
{if (!isset($params.orderby) || $params.orderby) && !$simple_header && $show_filters}
<a
class="{strip}desc-sort-column-{$key}-link
{if isset($order_by) && ($key == $order_by) && ($order_way == 'DESC')} active{/if}{/strip}"
href="{$currentIndex|escape:'html':'UTF-8'}&amp;{$list_id}Orderby={$key|urlencode}&amp;{$list_id}Orderway=desc&amp;token={$token|escape:'html':'UTF-8'}{if isset($smarty.get.$identifier)}&amp;{$identifier}={$smarty.get.$identifier|intval}{/if}"
>
<i class="icon-caret-down"></i>
</a>
<a
class="{strip}asc-sort-column-{$key}-link
{if isset($order_by) && ($key == $order_by) && ($order_way == 'ASC')} active{/if}{/strip}"
href="{$currentIndex|escape:'html':'UTF-8'}&amp;{$list_id}Orderby={$key|urlencode}&amp;{$list_id}Orderway=asc&amp;token={$token|escape:'html':'UTF-8'}{if isset($smarty.get.$identifier)}&amp;{$identifier}={$smarty.get.$identifier|intval}{/if}">
<i class="icon-caret-up"></i>
</a>
{/if}
</span>
</th>
{/foreach}
{if $multishop_active && $shop_link_type}
<th>
<span class="title_box">
{if $shop_link_type == 'shop'}
{l s='Shop' d='Admin.Global'}
{else}
{l s='Shop group'}
{/if}
</span>
</th>
{/if}
{if $has_actions || $show_filters}
<th>{if !$simple_header}{/if}</th>
{/if}
</tr>
{if !$simple_header && $show_filters}
<tr class="nodrag nodrop filter {if $row_hover}row_hover{/if}">
{if $has_bulk_actions}
<th class="text-center">
--
</th>
{/if}
{* Filters (input, select, date or bool) *}
{foreach $fields_display AS $key => $params}
<th {if isset($params.align)} class="{$params.align}" {/if}>
{if isset($params.search) && !$params.search}
--
{else}
{if $params.type == 'bool'}
<select class="filter fixed-width-sm center"
onchange="$('#submitFilterButton{$list_id}').focus();$('#submitFilterButton{$list_id}').click();"
name="{$list_id}Filter_{if isset($params.filter_key)}{$params.filter_key}{else}{$key}{/if}">
<option value="">-</option>
<option value="1" {if $params.value == 1} selected="selected" {/if}>{l s='Yes' d='Admin.Global'}</option>
<option value="0" {if $params.value == 0 && $params.value != ''} selected="selected" {/if}>{l s='No' d='Admin.Global'}</option>
</select>
{elseif $params.type == 'date' || $params.type == 'datetime'}
<div class="date_range row">
<div class="input-group fixed-width-md center">
<input type="text" class="filter datepicker date-input form-control" id="local_{$params.id_date}_0" name="local_{$params.name_date}[0]" placeholder="{l s='From'}" />
<input type="hidden" id="{$params.id_date}_0" name="{$params.name_date}[0]" value="{if isset($params.value.0)}{$params.value.0}{/if}">
<span class="input-group-addon">
<i class="icon-calendar"></i>
</span>
</div>
<div class="input-group fixed-width-md center">
<input type="text" class="filter datepicker date-input form-control" id="local_{$params.id_date}_1" name="local_{$params.name_date}[1]" placeholder="{l s='To'}" />
<input type="hidden" id="{$params.id_date}_1" name="{$params.name_date}[1]" value="{if isset($params.value.1)}{$params.value.1}{/if}">
<span class="input-group-addon">
<i class="icon-calendar"></i>
</span>
</div>
<script>
$(function() {
var dateStart = parseDate($("#{$params.id_date}_0").val());
var dateEnd = parseDate($("#{$params.id_date}_1").val());
$("#local_{$params.id_date}_0").datepicker("option", "altField", "#{$params.id_date}_0");
$("#local_{$params.id_date}_1").datepicker("option", "altField", "#{$params.id_date}_1");
if (dateStart !== null){
$("#local_{$params.id_date}_0").datepicker("setDate", dateStart);
}
if (dateEnd !== null){
$("#local_{$params.id_date}_1").datepicker("setDate", dateEnd);
}
});
</script>
</div>
{elseif $params.type == 'select'}
{if isset($params.filter_key)}
<select class="filter{if isset($params.align) && $params.align == 'center'}center{/if}" onchange="$('#submitFilterButton{$list_id}').focus();$('#submitFilterButton{$list_id}').click();" name="{$list_id}Filter_{$params.filter_key}" {if isset($params.width)} style="width:{$params.width}px"{/if}>
<option value="" {if $params.value == ''} selected="selected" {/if}>-</option>
{if isset($params.list) && is_array($params.list)}
{foreach $params.list AS $option_value => $option_display}
<option value="{$option_value}" {if (string)$option_display === (string)$params.value || (string)$option_value === (string)$params.value} selected="selected"{/if}>{$option_display}</option>
{/foreach}
{/if}
</select>
{/if}
{else}
<input type="text" class="filter" name="{$list_id}Filter_{if isset($params.filter_key)}{$params.filter_key}{else}{$key}{/if}" value="{$params.value|escape:'html':'UTF-8'}" {if isset($params.width) && $params.width != 'auto'} style="width:{$params.width}px"{/if} />
{/if}
{/if}
</th>
{/foreach}
{if $multishop_active && $shop_link_type}
<th>--</th>
{/if}
{if $has_actions || $show_filters}
<th class="actions">
{if $show_filters}
<span class="pull-right">
{*Search must be before reset for default form submit*}
<button type="submit" id="submitFilterButton{$list_id}" name="submitFilter" class="btn btn-default" data-list-id="{$list_id}">
<i class="icon-search"></i> {l s='Search' d='Admin.Actions'}
</button>
{if $filters_has_value}
<button type="submit" name="submitReset{$list_id}" class="btn btn-warning">
<i class="icon-eraser"></i> {l s='Reset'}
</button>
{/if}
</span>
{/if}
</th>
{/if}
</tr>
{/if}
</thead>

View File

@@ -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;

View File

@@ -0,0 +1,84 @@
{**
* 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)
*}
<div class="panel" {if isset($panel_id)}id="{$panel_id}"{/if}>
<h3>
<i class="icon-list-ul"></i>
{if isset($panel_title)}{$panel_title|escape:'html':'UTF-8'}{else}{l s='Modules list'}{/if}
</h3>
<div class="modules_list_container_tab row">
<div class="col-lg-12">
{if count($modules_list)}
<table class="table">
{counter start=1 assign="count"}
{foreach from=$modules_list item=module}
{include file='controllers/modules/tab_module_line.tpl' class_row={cycle values=",row alt"}}
{counter}
{/foreach}
</table>
{if $controller_name == 'AdminPayment' && isset($view_all)}
<div class="panel-footer">
<div class="col-lg-4 col-lg-offset-4">
<a class="btn btn-default btn-block" href="{$link->getAdminLink('AdminModulesSf', true, ['filterCategoryTab' => 'payments_gateways'])|escape:'html':'UTF-8'}">
<i class="process-icon-payment"></i>
{l s='View all available payments solutions'}
</a>
</div>
</div>
{/if}
{else}
<table class="table">
<tr>
<td>
<div class="alert alert-warning">
{if $controller_name == 'AdminPayment'}
{l s='It seems there are no recommended payment solutions for your country.'}<br />
<a target="_blank" rel="noopener noreferrer nofollow" href="https://www.prestashop.com/en/contact-us">{l s='Do you think there should be one? Let us know!'}</a>
{else}{l s='No modules available in this section.'}{/if}</div>
</td>
</tr>
</table>
{/if}
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
$('.fancybox-quick-view').each(function() {
$(this).fancybox({
type: 'ajax',
autoDimensions: false,
autoSize: false,
width: 600,
height: 'auto',
helpers: {
overlay: {
locked: false
}
},
href: $(this).attr('href')+'&admin_list_from_source='+getControllerActionMap('read-more')
});
});
});
</script>

View File

@@ -0,0 +1,54 @@
{**
* 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)
*}
<div class="modal fade" id="modules_list_container">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3 class="modal-title">{l s='Recommended Modules and Services'}</h3>
</div>
<div class="modal-body">
<div id="modules_list_container_tab_modal" style="display:none;"></div>
<div id="modules_list_loader"><i class="icon-refresh icon-spin"></i></div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
$('.fancybox-quick-view').fancybox({
type: 'ajax',
autoDimensions: false,
autoSize: false,
width: 600,
height: 'auto',
helpers: {
overlay: {
locked: false
}
}
});
});
</script>

View File

@@ -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;

View File

@@ -0,0 +1,394 @@
{**
* 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)
*}
<div class="leadin">{block name="leadin"}{/block}</div>
<script type="text/javascript">
id_language = Number({$current_id_lang});
{if isset($tabs) && $tabs|count}
var helper_tabs= {$tabs|json_encode};
var unique_field_id = '{$table}_';
{/if}
</script>
{block name="defaultOptions"}
{if isset($table_bk) && $table_bk == $table}{capture name='table_count'}{counter name='table_count'}{/capture}{/if}
{assign var='table_bk' value=$table scope='root'}
<form action="{$current|escape:'html':'UTF-8'}&amp;token={$token|escape:'html':'UTF-8'}" id="{if $table == null}configuration_form{else}{$table}_form{/if}{if isset($smarty.capture.table_count) && $smarty.capture.table_count}_{$smarty.capture.table_count|intval}{/if}" method="post" enctype="multipart/form-data" class="form-horizontal">
{foreach $option_list AS $category => $categoryData}
{if isset($categoryData['top'])}{$categoryData['top']}{/if}
<div class="panel {if isset($categoryData['class'])}{$categoryData['class']}{/if}" id="{$table}_fieldset_{$category}">
{* Options category title *}
<div class="panel-heading">
<i class="{if isset($categoryData['icon'])}{$categoryData['icon']}{else}icon-cogs{/if}"></i>
{if isset($categoryData['title'])}{$categoryData['title']}{else}{l s='Options' d='Admin.Global'}{/if}
</div>
{* Category description *}
{if (isset($categoryData['description']) && $categoryData['description'])}
<div class="alert alert-info">{$categoryData['description']}</div>
{/if}
{* Category info *}
{if (isset($categoryData['info']) && $categoryData['info'])}
<div>{$categoryData['info']}</div>
{/if}
{if !$categoryData['hide_multishop_checkbox'] && $use_multishop}
<div class="well clearfix">
<label class="control-label col-lg-3">
<i class="icon-sitemap"></i> {l s='Multistore'}
</label>
<div class="col-lg-9">
<span class="switch prestashop-switch fixed-width-lg">
{strip}
<input type="radio" name="{$table}_multishop_{$category}" id="{$table}_multishop_{$category}_on" value="1" onclick="toggleAllMultishopDefaultValue($('#{$table}_fieldset_{$category}'), true)"/>
<label for="{$table}_multishop_{$category}_on">
{l s='Yes' d='Admin.Global'}
</label>
<input type="radio" name="{$table}_multishop_{$category}" id="{$table}_multishop_{$category}_off" value="0" checked="checked" onclick="toggleAllMultishopDefaultValue($('#{$table}_fieldset_{$category}'), false)"/>
<label for="{$table}_multishop_{$category}_off">
{l s='No' d='Admin.Global'}
</label>
{/strip}
<a class="slide-button btn"></a>
</span>
<div class="row">
<div class="col-lg-12">
<p class="help-block">
<strong>{l s='Check / Uncheck all'}</strong><br />
{l s='You are editing this page for a specific shop or group. Click "%yes_label%" to check all fields, "%no_label%" to uncheck all.' d='Admin.Design.Help' sprintf=['%yes_label%' => {l s='Yes' d='Admin.Global'}, '%no_label%' => {l s='No' d='Admin.Global'}]}<br />
{l s='If you check a field, change its value, and save, the multistore behavior will not apply to this shop (or group), for this particular parameter.'}
</p>
</div>
</div>
</div>
</div>
{/if}
<div class="form-wrapper">
{foreach $categoryData['fields'] AS $key => $field}
{if $field['type'] == 'hidden'}
<input type="hidden" name="{$key}" value="{$field['value']}" />
{else}
<div class="form-group{if isset($field.form_group_class)} {$field.form_group_class}{/if}"{if isset($tabs) && isset($field.tab)} data-tab-id="{$field.tab}"{/if}>
<div id="conf_id_{$key}"{if $field['is_invisible']} class="isInvisible"{/if}>
{block name="label"}
{if isset($field['title']) && isset($field['hint'])}
<label class="control-label col-lg-3{if isset($field['required']) && $field['required'] && $field['type'] != 'radio'} required{/if}">
{if !$categoryData['hide_multishop_checkbox'] && $field['multishop_default'] && empty($field['no_multishop_checkbox'])}
<input type="checkbox" name="multishopOverrideOption[{$key}]" value="1"{if !$field['is_disabled']} checked="checked"{/if} onclick="toggleMultishopDefaultValue(this, '{$key}')"/>
{/if}
<span title="" data-toggle="tooltip" class="label-tooltip" data-original-title="
{if is_array($field['hint'])}
{foreach $field['hint'] as $hint}
{if is_array($hint)}
{$hint.text|escape:'html':'UTF-8'}
{else}
{$hint|escape:'html':'UTF-8'}
{/if}
{/foreach}
{else}
{$field['hint']}
{/if}
" data-html="true">
{$field['title']}
</span>
</label>
{elseif isset($field['title'])}
<label class="control-label col-lg-3">
{if !$categoryData['hide_multishop_checkbox'] && $field['multishop_default'] && empty($field['no_multishop_checkbox'])}
<input type="checkbox" name="multishopOverrideOption[{$key}]" value="1"{if !$field['is_disabled']} checked="checked"{/if} onclick="checkMultishopDefaultValue(this, '{$key}')" />
{/if}
{$field['title']}
</label>
{/if}
{/block}
{block name="field"}
{block name="input"}
{if $field['type'] == 'select'}
<div class="col-lg-9">
{if $field['list']}
<select class="form-control fixed-width-xxl {if isset($field['class'])}{$field['class']}{/if}" name="{$key}"{if isset($field['js'])} onchange="{$field['js']}"{/if} id="{$key}" {if isset($field['size'])} size="{$field['size']}"{/if}>
{foreach $field['list'] AS $k => $option}
<option value="{$option[$field['identifier']]}"{if $field['value'] == $option[$field['identifier']]} selected="selected"{/if}>{$option['name']}</option>
{/foreach}
</select>
{elseif isset($input.empty_message)}
{$input.empty_message}
{/if}
</div>
{elseif $field['type'] == 'bool'}
<div class="col-lg-9">
<span class="switch prestashop-switch fixed-width-lg">
{strip}
<input type="radio" name="{$key}" id="{$key}_on" value="1" {if $field['value']} checked="checked"{/if}{if isset($field['js']['on'])} {$field['js']['on']}{/if}{if isset($field['disabled']) && (bool)$field['disabled']} disabled="disabled"{/if}/>
<label for="{$key}_on" class="radioCheck">
{l s='Yes' d='Admin.Global'}
</label>
<input type="radio" name="{$key}" id="{$key}_off" value="0" {if !$field['value']} checked="checked"{/if}{if isset($field['js']['off'])} {$field['js']['off']}{/if}{if isset($field['disabled']) && (bool)$field['disabled']} disabled="disabled"{/if}/>
<label for="{$key}_off" class="radioCheck">
{l s='No' d='Admin.Global'}
</label>
{/strip}
<a class="slide-button btn"></a>
</span>
</div>
{elseif $field['type'] == 'radio'}
<div class="col-lg-9">
{foreach $field['choices'] AS $k => $v}
<p class="radio">
{strip}
<label for="{$key}_{$k}">
<input type="radio" name="{$key}" id="{$key}_{$k}" value="{$k}"{if $k == $field['value']} checked="checked"{/if}{if isset($field['js'][$k])} {$field['js'][$k]}{/if}/>
{$v}
</label>
{/strip}
</p>
{/foreach}
</div>
{elseif $field['type'] == 'checkbox'}
<div class="col-lg-9">
{foreach $field['choices'] AS $k => $v}
<p class="checkbox">
{strip}
<label class="col-lg-3" for="{$key}{$k}_on">
<input type="checkbox" name="{$key}" id="{$key}{$k}_on" value="{$k|intval}"{if $k == $field['value']} checked="checked"{/if}{if isset($field['js'][$k])} {$field['js'][$k]}{/if}/>
{$v}
</label>
{/strip}
</p>
{/foreach}
</div>
{elseif $field['type'] == 'text'}
<div class="col-lg-9">{if isset($field['suffix'])}<div class="input-group{if isset($field.class)} {$field.class}{/if}">{/if}
<input class="form-control {if isset($field['class'])}{$field['class']}{/if}" type="{$field['type']}"{if isset($field['id'])} id="{$field['id']}"{/if} size="{if isset($field['size'])}{$field['size']|intval}{else}5{/if}" name="{$key}" value="{if isset($field['no_escape']) && $field['no_escape']}{$field['value']}{else}{$field['value']|escape:'html':'UTF-8'}{/if}" {if isset($field['autocomplete']) && !$field['autocomplete']}autocomplete="off"{/if}/>
{if isset($field['suffix'])}
<span class="input-group-addon">
{$field['suffix']|strval}
</span>
{/if}
{if isset($field['suffix'])}</div>{/if}
</div>
{elseif $field['type'] == 'password'}
<div class="col-lg-9">{if isset($field['suffix'])}<div class="input-group{if isset($field.class)} {$field.class}{/if}">{/if}
<input type="{$field['type']}"{if isset($field['id'])} id="{$field['id']}"{/if} size="{if isset($field['size'])}{$field['size']|intval}{else}5{/if}" name="{$key}" value=""{if isset($field['autocomplete']) && !$field['autocomplete']} autocomplete="off"{/if} />
{if isset($field['suffix'])}
<span class="input-group-addon">
{$field['suffix']|strval}
</span>
{/if}
{if isset($field['suffix'])}</div>{/if}
</div>
{elseif $field['type'] == 'textarea'}
<div class="col-lg-9">
<textarea class="{if isset($field['autoload_rte']) && $field['autoload_rte']}rte autoload_rte{else}textarea-autosize{/if}" name={$key}{if isset({$field['cols']})} cols="{$field['cols']}"{/if}{if isset({$field['rows']})} rows="{$field['rows']}"{/if}">{$field['value']|escape:'html':'UTF-8'}</textarea>
</div>
{elseif $field['type'] == 'file'}
<div class="col-lg-9">{$field['file']}</div>
{elseif $field['type'] == 'color'}
<div class="col-lg-2">
<div class="input-group">
<input type="color" size="{$field['size']}" data-hex="true" {if isset($input.class)}class="{$field['class']}" {else}class="color mColorPickerInput"{/if} name="{$field['name']}" class="{if isset($field['class'])}{$field['class']}{/if}" value="{$field['value']|escape:'html':'UTF-8'}" />
</div>
</div>
{elseif $field['type'] == 'price'}
<div class="col-lg-9">
<div class="input-group fixed-width-lg">
<span class="input-group-addon">{$currency_left_sign} {l s='(tax excl.)'}</span>
<input type="text" size="{if isset($field['size'])}{$field['size']|intval}{else}5{/if}" name="{$key}" value="{$field['value']|escape:'html':'UTF-8'}" />
</div>
</div>
{elseif $field['type'] == 'textLang' || $field['type'] == 'textareaLang' || $field['type'] == 'selectLang'}
{if $field['type'] == 'textLang'}
<div class="col-lg-9">
<div class="row">
{foreach $field['languages'] AS $id_lang => $value}
{if $field['languages']|count > 1}
<div class="translatable-field lang-{$id_lang}" {if $id_lang != $current_id_lang}style="display:none;"{/if}>
<div class="col-lg-9">
{else}
<div class="col-lg-12">
{/if}
<input type="text"
name="{$key}_{$id_lang}"
value="{$value|escape:'html':'UTF-8'}"
{if isset($input.class)}class="{$input.class}"{/if}
/>
{if $field['languages']|count > 1}
</div>
<div class="col-lg-2">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
{foreach $languages as $language}
{if $language.id_lang == $id_lang}{$language.iso_code}{/if}
{/foreach}
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
{foreach $languages as $language}
<li>
<a href="javascript:hideOtherLanguage({$language.id_lang});">{$language.name}</a>
</li>
{/foreach}
</ul>
</div>
</div>
{else}
</div>
{/if}
{/foreach}
</div>
</div>
{elseif $field['type'] == 'textareaLang'}
<div class="col-lg-9">
{foreach $field['languages'] AS $id_lang => $value}
<div class="row translatable-field lang-{$id_lang}" {if $id_lang != $current_id_lang}style="display:none;"{/if}>
<div id="{$key}_{$id_lang}" class="col-lg-9" >
<textarea class="{if isset($field['autoload_rte']) && $field['autoload_rte']}rte autoload_rte{else}textarea-autosize{/if}" name="{$key}_{$id_lang}">{$value|replace:'\r\n':"\n"}</textarea>
</div>
<div class="col-lg-2">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
{foreach $languages as $language}
{if $language.id_lang == $id_lang}{$language.iso_code}{/if}
{/foreach}
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
{foreach $languages as $language}
<li>
<a href="javascript:hideOtherLanguage({$language.id_lang});">{$language.name}</a>
</li>
{/foreach}
</ul>
</div>
</div>
{/foreach}
<script type="text/javascript">
$(document).ready(function() {
$(".textarea-autosize").autosize();
});
</script>
</div>
{elseif $field['type'] == 'selectLang'}
{foreach $languages as $language}
<div id="{$key}_{$language.id_lang}" style="display: {if $language.id_lang == $current_id_lang}block{else}none{/if};" class="col-lg-9">
<select name="{$key}_{$language.iso_code|upper}">
{foreach $field['list'] AS $k => $v}
<option value="{if isset($v.cast)}{$v.cast[$v[$field.identifier]]}{else}{$v[$field.identifier]}{/if}"
{if $field['value'][$language.id_lang] == $v['name']} selected="selected"{/if}>
{$v['name']}
</option>
{/foreach}
</select>
</div>
{/foreach}
{/if}
{/if}
{if isset($field['desc']) && !empty($field['desc'])}
<div class="col-lg-9 col-lg-offset-3">
<div class="help-block">
{if is_array($field['desc'])}
{foreach $field['desc'] as $p}
{if is_array($p)}
<span id="{$p.id}">{$p.text}</span><br />
{else}
{$p}<br />
{/if}
{/foreach}
{else}
{$field['desc']}
{/if}
</div>
</div>
{/if}
{/block}{* end block input *}
{if $field['is_invisible']}
<div class="col-lg-9 col-lg-offset-3">
<p class="alert alert-warning row-margin-top">
{l s='You can\'t change the value of this configuration field in the context of this shop.'}
</p>
</div>
{/if}
{/block}{* end block field *}
</div>
</div>
{/if}
{/foreach}
</div><!-- /.form-wrapper -->
{if isset($categoryData['bottom'])}{$categoryData['bottom']}{/if}
{block name="footer"}
{if isset($categoryData['submit']) || isset($categoryData['buttons'])}
<div class="panel-footer">
{if isset($categoryData['submit']) && !empty($categoryData['submit'])}
<button type="{if isset($categoryData['submit']['type'])}{$categoryData['submit']['type']}{else}submit{/if}" {if isset($categoryData['submit']['id'])}id="{$categoryData['submit']['id']}"{/if} class="btn btn-default pull-right" name="{if isset($categoryData['submit']['name'])}{$categoryData['submit']['name']}{else}submitOptions{$table}{/if}"><i class="process-icon-{if isset($categoryData['submit']['imgclass'])}{$categoryData['submit']['imgclass']}{else}save{/if}"></i> {$categoryData['submit']['title']}</button>
{/if}
{if isset($categoryData['buttons'])}
{foreach from=$categoryData['buttons'] item=btn key=k}
{if isset($btn.href) && trim($btn.href) != ''}
<a href="{$btn.href|escape:'html':'UTF-8'}" {if isset($btn['id'])}id="{$btn['id']}"{/if} class="btn btn-default{if isset($btn['class'])} {$btn['class']}{/if}" {if isset($btn.js) && $btn.js} onclick="{$btn.js}"{/if}>{if isset($btn['icon'])}<i class="{$btn['icon']}" ></i> {/if}{$btn.title}</a>
{else}
<button type="{if isset($btn['type'])}{$btn['type']}{else}button{/if}" {if isset($btn['id'])}id="{$btn['id']}"{/if} class="{if isset($btn['class'])}{$btn['class']}{else}btn btn-default{/if}" name="{if isset($btn['name'])}{$btn['name']}{else}submitOptions{$table}{/if}"{if isset($btn.js) && $btn.js} onclick="{$btn.js}"{/if}>{if isset($btn['icon'])}<i class="{$btn['icon']}" ></i> {/if}{$btn.title}</button>
{/if}
{/foreach}
{/if}
</div>
{/if}
{/block}
</div>
{/foreach}
{hook h='displayAdminOptions'}
{if isset($name_controller)}
{capture name=hookName assign=hookName}display{$name_controller|ucfirst}Options{/capture}
{hook h=$hookName}
{elseif isset($smarty.get.controller)}
{capture name=hookName assign=hookName}display{$smarty.get.controller|ucfirst|htmlentities}Options{/capture}
{hook h=$hookName}
{/if}
</form>
{/block}
{block name="after"}
{if isset($tinymce) && $tinymce}
<script type="text/javascript">
var iso = '{$iso|addslashes}';
var pathCSS = '{$smarty.const._THEME_CSS_DIR_|addslashes}';
var ad = '{$ad|addslashes}';
$(document).ready(function(){
{block name="autoload_tinyMCE"}
tinySetup({
editor_selector :"autoload_rte"
});
{/block}
});
</script>
{/if}
{/block}
{if $has_color_field}
<script type="text/javascript">
$.fn.mColorPicker.defaults.imageFolder = baseDir + 'img/admin/';
</script>
{/if}

View File

@@ -0,0 +1,67 @@
{**
* 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 class="btn btn-default" href="#" onclick="if ($('.requiredFieldsParameters:visible').length == 0) $('.requiredFieldsParameters').slideDown('slow'); else $('.requiredFieldsParameters').slideUp('slow'); return false;">
<i class="icon-plus-sign"></i> {l s='Set required fields for this section'}
</a>
<div class="clearfix">&nbsp;</div>
<div style="display:none" class="panel requiredFieldsParameters">
<h3><i class="icon-asterisk"></i> {l s='Required Fields'}</h3>
<form name="updateFields" action="{$current|escape:'html':'UTF-8'}&amp;submitFields=1&amp;token={$token|escape:'html':'UTF-8'}" method="post">
<div class="alert alert-info">
{l s='Select the fields you would like to be required for this section.'}
</div>
<div class="row">
<table class="table">
<thead>
<tr>
<th class="fixed-width-xs">
<input type="checkbox" onclick="checkDelBoxes(this.form, 'fieldsBox[]', this.checked)" class="noborder" name="checkme">
</th>
<th><span class="title_box">{l s='Field Name'}</span></th>
</tr>
</thead>
<tbody>
{foreach $table_fields as $field}
{if !in_array($field, $required_class_fields)}
<tr>
<td class="noborder">
<input type="checkbox" name="fieldsBox[]" value="{$field}" {if in_array($field, $required_fields)} checked="checked"{/if} />
</td>
<td>
{$field}
</td>
</tr>
{/if}
{/foreach}
</tbody>
</table>
</div>
<div class="panel-footer">
<button name="submitFields" type="submit" class="btn btn-default pull-right">
<i class="process-icon-save "></i> <span>{l s='Save' d='Admin.Actions'}</span>
</button>
</div>
</form>
</div>

View File

@@ -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;

View File

@@ -0,0 +1,74 @@
{**
* 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)
*}
{strip}
<a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown">
{$current_shop_name} <i class="icon-caret-down"></i>
</a>
<div class="dropdown-menu dropdown-menu-right">
<ul class="list-dropdown-menu">
<li{if !isset($current_shop_value) || $current_shop_value == ''} class="active"{/if}>
<a href="{$url|escape:'html':'UTF-8'}">{l s='All shops'}</a>
</li>
{foreach key=group_id item=group_data from=$tree}
{if !isset($multishop_context) || $is_group_context}
<li class="group{if $current_shop_value == 'g-'|cat:$group_id} active{/if}{if $multishop_context_group == false} disabled{/if}">
<a href="{if $multishop_context_group == false}#{else}{$url|escape:'html':'UTF-8'}g-{$group_id}{/if}">
{l s='%s group' sprintf=[$group_data['name']|escape:'html':'UTF-8']}
</a>
</li>
{elseif !$is_all_context}
<ul class="group {if $multishop_context_group == false} disabled{/if}">{l s='%s group' sprintf=[$group_data['name']|escape:'html':'UTF-8']}
{/if}
{if !isset($multishop_context) || $is_shop_context}
{foreach key=shop_id item=shop_data from=$group_data['shops']}
{if ($shop_data['active'])}
<li class="shop{if $current_shop_value == 's-'|cat:$shop_id} active{/if}{if $shop_data['uri'] == NULL} disabled{/if}">
<a href="{if $shop_data['uri'] == NULL}#{else}{$url|escape:'html':'UTF-8'}s-{$shop_id}{/if}">
{$shop_data['name']}
</a>
{if $shop_data['uri'] == NULL}
<a class="link-shop" href="{$link->getAdminLink('AdminShop', true)|escape:'html':'UTF-8'}" target="_blank">
<i class="material-icons">&#xE869;</i>
</a>
{else}
<a class="link-shop" href="{$link->getBaseLink($shop_data['id_shop'])}" target="_blank">
<i class="material-icons">&#xE8F4;</i>
</a>
{/if}
</li>
{/if}
{/foreach}
{/if}
{if !(!isset($multishop_context) || $is_group_context)}
</ul>
{/if}
{/foreach}
</ul>
</div>
{/strip}

View File

@@ -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;

View File

@@ -0,0 +1,55 @@
{**
* 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)
*}
{if isset($nodes)}
{$nodes}
{/if}
<script type="text/javascript">
{if isset($selected_categories) && !empty($selected_categories)}
{assign var=imploded_selected_categories value='","'|implode:$selected_categories}
var selected_categories = new Array("{$imploded_selected_categories}");
$('#{$id_tree}').tree('collapseAll');
$('#{$id_tree}').find(":input").each(
function()
{
if ($.inArray($(this).val(), selected_categories) != -1)
{
$(this).prop("checked", true);
$(this).parent().addClass("tree-selected");
$(this).parents("ul.tree").each(
function()
{
$(this).children().children().children(".icon-folder-close")
.removeClass("icon-folder-close")
.addClass("icon-folder-open");
$(this).show();
}
);
}
}
);
{/if}
</script>

View File

@@ -0,0 +1,32 @@
{**
* 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)
*}
<div class="panel">
{if isset($header)}{$header}{/if}
{if isset($nodes)}
<ul id="{$id|escape:'html':'UTF-8'}" class="tree">
{$nodes}
</ul>
{/if}
</div>

View File

@@ -0,0 +1,155 @@
{**
* 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)
*}
<div class="panel">
{if isset($header)}{$header}{/if}
{if isset($nodes)}
<ul id="{$id|escape:'html':'UTF-8'}" class="cattree tree">
{$nodes}
</ul>
{/if}
</div>
<script type="text/javascript">
var currentToken="{$token|@addslashes}";
var treeClickFunc = function() {
var newURL = window.location.protocol + "//" + window.location.host + window.location.pathname;
var queryString = window.location.search.replace(/&id_category=[0-9]*/, "") + "&id_category=" + $(this).val();
location.href = newURL+queryString; // hash part is dropped: window.location.hash
};
function addDefaultCategory(elem)
{
$('select#id_category_default').append('<option value="' + elem.val()+'">' + (elem.val() !=1 ? elem.parent().find('label').html() : home) + '</option>');
if ($('select#id_category_default option').length > 0)
{
$('select#id_category_default').closest('.form-group').show();
$('#no_default_category').hide();
}
}
{if isset($use_checkbox) && $use_checkbox == true}
function checkAllAssociatedCategories($tree)
{
$tree.find(':input[type=checkbox]').each(function(){
$(this).prop('checked', true);
addDefaultCategory($(this));
$(this).parent().addClass('tree-selected');
});
}
function uncheckAllAssociatedCategories($tree)
{
$tree.find(':input[type=checkbox]').each(function(){
$(this).prop('checked', false);
$('select#id_category_default option[value='+$(this).val()+']').remove();
if ($('select#id_category_default option').length == 0)
{
$('select#id_category_default').closest('.form-group').hide();
$('#no_default_category').show();
}
$(this).parent().removeClass('tree-selected');
});
}
{/if}
{if isset($use_search) && $use_search == true}
$('#{$id|escape:'html':'UTF-8'}-categories-search').bind('typeahead:selected', function(obj, datum){
var match = $('#{$id|escape:'html':'UTF-8'}').find(':input[value="'+datum.id_category+'"]').first();
if (match.length)
{
match.each(function(){
$(this).prop("checked", true);
$(this).parent().addClass("tree-selected");
$(this).parents('ul.tree').each(function(){
$(this).show();
$(this).prev().find('.icon-folder-close').removeClass('icon-folder-close').addClass('icon-folder-open');
});
addDefaultCategory($(this));
}
);
}
else
{
var selected = [];
that = this;
$('#{$id|escape:'html':'UTF-8'}').find('.tree-selected input').each(
function()
{
selected.push($(this).val());
}
);
{literal}
$.get(
'ajax-tab.php',
{controller:'AdminProducts',token:currentToken,action:'getCategoryTree', fullTree:1, selected:selected},
function(content) {
{/literal}
$('#{$id|escape:'html':'UTF-8'}').html(content);
$('#{$id|escape:'html':'UTF-8'}').tree('init');
$('#{$id|escape:'html':'UTF-8'}').find(':input[value="'+datum.id_category+'"]').each(function(){
$(this).prop("checked", true);
$(this).parent().addClass("tree-selected");
$(this).parents('ul.tree').each(function(){
$(this).show();
$(this).prev().find('.icon-folder-close').removeClass('icon-folder-close').addClass('icon-folder-open');
});
full_loaded = true;
}
);
}
);
}
});
{/if}
$(document).ready(function(){
$('#{$id|escape:'html':'UTF-8'}').tree('collapseAll');
$('#{$id|escape:'html':'UTF-8'}').find(':input[type=radio]').click(treeClickFunc);
{if isset($selected_categories)}
$('#no_default_category').hide();
{assign var=imploded_selected_categories value='","'|implode:$selected_categories}
var selected_categories = new Array("{$imploded_selected_categories}");
if (selected_categories.length > 1)
$('#expand-all-{$id|escape:'html':'UTF-8'}').hide();
else
$('#collapse-all-{$id|escape:'html':'UTF-8'}').hide();
$('#{$id|escape:'html':'UTF-8'}').find(':input').each(function(){
if ($.inArray($(this).val(), selected_categories) != -1)
{
$(this).prop("checked", true);
$(this).parent().addClass("tree-selected");
$(this).parents('ul.tree').each(function(){
$(this).show();
$(this).prev().find('.icon-folder-close').removeClass('icon-folder-close').addClass('icon-folder-open');
});
}
});
{else}
$('#collapse-all-{$id|escape:'html':'UTF-8'}').hide();
{/if}
});
</script>

View File

@@ -0,0 +1,25 @@
{**
* 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)
*}
<div class="tree-panel-heading-controls clearfix">{if isset($toolbar)}{$toolbar}{/if}</div>

View File

@@ -0,0 +1,102 @@
{**
* 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)
*}
<div class="panel">
{if isset($header)}{$header}{/if}
{if isset($nodes)}
<ul id="{$id|escape:'html':'UTF-8'}" class="cattree tree">
{$nodes}
</ul>
{/if}
</div>
<script type="text/javascript">
var currentToken="{$token|@addslashes}";
{if isset($use_checkbox) && $use_checkbox == true}
function checkAllAssociatedCategories($tree)
{
$tree.find(":input[type=checkbox]").each(
function()
{
$(this).prop("checked", true);
$(this).parent().addClass("tree-selected");
}
);
}
function uncheckAllAssociatedCategories($tree)
{
$tree.find(":input[type=checkbox]").each(
function()
{
$(this).prop("checked", false);
$(this).parent().removeClass("tree-selected");
}
);
}
{/if}
{if isset($use_search) && $use_search == true}
$("#{$id|escape:'html':'UTF-8'}-categories-search").bind("typeahead:selected", function(obj, datum) {
$("#{$id|escape:'html':'UTF-8'}").find(":input").each(
function()
{
if ($(this).val() == datum.id_category)
{
{if (!(isset($use_checkbox) && $use_checkbox == true))}
$("#{$id|escape:'html':'UTF-8'} label").removeClass("tree-selected");
{/if}
$(this).prop("checked", true);
$(this).parent().addClass("tree-selected");
$(this).parents('ul.tree').each(function(){
$(this).show();
$(this).prev().find('.icon-folder-close').removeClass('icon-folder-close').addClass('icon-folder-open');
});
}
}
);
});
{/if}
$(document).ready(function () {
$("#{$id|escape:'html':'UTF-8'}").tree("collapseAll");
{if isset($selected_categories)}
{assign var=imploded_selected_categories value='","'|implode:$selected_categories}
var selected_categories = new Array("{$imploded_selected_categories}");
$("#{$id|escape:'html':'UTF-8'}").find(":input").each(
function()
{
if ($.inArray($(this).val(), selected_categories) != -1)
{
$(this).prop("checked", true);
$(this).parent().addClass("tree-selected");
$(this).parents('ul.tree').each(function(){
$(this).show();
$(this).prev().find('.icon-folder-close').removeClass('icon-folder-close').addClass('icon-folder-open');
});
}
}
);
{/if}
});
</script>

View File

@@ -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)
*}
<div class="tree-panel-heading-controls clearfix">
{if isset($title)}<i class="icon-tag"></i>&nbsp;{l s=$title}{/if}
{if isset($toolbar)}{$toolbar}{/if}
</div>

View File

@@ -0,0 +1,33 @@
{**
* 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)
*}
<li class="tree-folder">
<span class="tree-folder-name">
<i class="icon-folder-close"></i>
<label class="tree-toggler">{$node['name']|escape:'html':'UTF-8'}</label>
</span>
<ul class="tree">
{$children}
</ul>
</li>

View File

@@ -0,0 +1,36 @@
{**
* 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)
*}
<li class="tree-folder">
<span class="tree-folder-name{if isset($node['disabled']) && $node['disabled'] == true} tree-folder-name-disable{/if}">
{if isset($node['id_category']) && $node['id_category'] != $root_category}
<input type="checkbox" name="{$input_name}[]" value="{$node['id_category']}"{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
{/if}
<i class="icon-folder-close"></i>
<label class="tree-toggler">{if isset($node['name'])}{$node['name']|escape:'html':'UTF-8'}{/if}{if isset($node['selected_childs']) && (int)$node['selected_childs'] > 0} {l s='(%s selected)' sprintf=[$node['selected_childs']]}{/if}</label>
</span>
<ul class="tree">
{$children}
</ul>
</li>

View File

@@ -0,0 +1,34 @@
{**
* 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)
*}
<li class="tree-folder">
<span class="tree-folder-name{if isset($node['disabled']) && $node['disabled'] == true} tree-folder-name-disable{/if}">
<input type="checkbox" name="checkBoxShopGroupAsso_{$table}[{$node['id']}]" value="{$node['id']}"{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
<i class="icon-folder-close"></i>
<label class="tree-toggler">{l s='Group: %s' sprintf=[$node['name']|escape:'html':'UTF-8']}</label>
</span>
<ul class="tree">
{$children}
</ul>
</li>

View File

@@ -0,0 +1,36 @@
{**
* 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)
*}
<li class="tree-folder">
<span class="tree-folder-name{if isset($node['disabled']) && $node['disabled'] == true} tree-folder-name-disable{/if}">
{if $node['id_category'] != $root_category}
<input type="radio" name="{$input_name}" value="{$node['id_category']}"{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
{/if}
<i class="icon-folder-close"></i>
<label class="tree-toggler">{$node['name']|escape:'html':'UTF-8'}</label>
</span>
<ul class="tree">
{$children}
</ul>
</li>

View File

@@ -0,0 +1,31 @@
{**
* 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)
*}
<li class="tree-item">
<span class="tree-item-name">
<i class="tree-dot"></i>
<label class="tree-toggler">{$node['name']}</label>
</span>
</li>

View File

@@ -0,0 +1,31 @@
{**
* 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)
*}
<li class="tree-item{if isset($node['disabled']) && $node['disabled'] == true} tree-item-disable{/if}">
<span class="tree-item-name{if isset($node['disabled']) && $node['disabled'] == true} tree-item-name-disable{/if}">
<input type="checkbox" name="{$input_name}[]" value="{$node['id_category']}"{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
<i class="tree-dot"></i>
<label class="tree-toggler">{$node['name']}</label>
</span>
</li>

View File

@@ -0,0 +1,31 @@
{**
* 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)
*}
<li class="tree-item{if isset($node['disabled']) && $node['disabled'] == true} tree-item-disable{/if}">
<span class="tree-item-name">
<input type="checkbox" name="checkBoxShopAsso_{$table}[{$node['id_shop']}]" value="{$node['id_shop']}"{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
<i class="tree-dot"></i>
<label class="tree-toggler">{$node['name']}</label>
</span>
</li>

View File

@@ -0,0 +1,31 @@
{**
* 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)
*}
<li class="tree-item{if isset($node['disabled']) && $node['disabled'] == true} tree-item-disable{/if}">
<span class="tree-item-name">
<input type="radio" name="{$input_name}" value="{$node['id_category']}"{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
<i class="tree-dot"></i>
<label class="tree-toggler">{$node['name']}</label>
</span>
</li>

View File

@@ -0,0 +1,111 @@
{**
* 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)
*}
<div class="panel">
{if isset($header)}{$header}{/if}
{if isset($nodes)}
<ul id="{$id|escape:'html':'UTF-8'}" class="tree">
{$nodes}
</ul>
{/if}
</div>
<script type="text/javascript">
function checkAllAssociatedShops($tree)
{
$tree.find(":input[type=checkbox]").each(
function()
{
$(this).prop("checked", true);
$(this).parent().addClass("tree-selected");
}
);
}
function uncheckAllAssociatedShops($tree)
{
$tree.find(":input[type=checkbox]").each(
function()
{
$(this).prop("checked", false);
$(this).parent().removeClass("tree-selected");
}
);
}
$(document).ready(function () {
$("#{$id|escape:'html':'UTF-8'}").tree("expandAll");
$("#{$id|escape:'html':'UTF-8'}").find(":input[type=checkbox]").click(
function()
{
if($(this).is(':checked'))
{
$(this).parent().addClass("tree-selected");
$(this).parent().parent().find("ul").find(":input[type=checkbox]").each(
function()
{
$(this).prop("checked", true);
$(this).parent().addClass("tree-selected");
}
);
}
else
{
$(this).parent().removeClass("tree-selected");
$(this).parent().parent().find("ul").find(":input[type=checkbox]").each(
function()
{
$(this).prop("checked", false);
$(this).parent().removeClass("tree-selected");
}
);
}
}
);
{if isset($selected_shops)}
{assign var=imploded_selected_shops value='","'|implode:$selected_shops}
var selected_shops = new Array("{$imploded_selected_shops}");
$("#{$id|escape:'html':'UTF-8'}").find(".tree-item :input").each(
function()
{
if ($.inArray($(this).val(), selected_shops) != -1)
{
$(this).prop("checked", true);
$(this).parent().addClass("tree-selected");
$(this).parents("ul.tree").each(
function()
{
$(this).children().children().children(".icon-folder-close")
.removeClass("icon-folder-close")
.addClass("icon-folder-open");
$(this).show();
}
);
}
}
);
{/if}
});
</script>

View File

@@ -0,0 +1,31 @@
{**
* 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)
*}
<div class="tree-actions pull-right">
{if isset($actions)}
{foreach from=$actions item=action}
{$action->render()}
{/foreach}
{/if}
</div>

View File

@@ -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 href="{$link}"{if isset($action)} onclick="{$action}"{/if}{if isset($id)} id="{$id|escape:'html':'UTF-8'}"{/if} class="btn btn-default">
{if isset($icon_class)}<i class="{$icon_class}"></i>{/if}
{l s=$label}
</a>

View File

@@ -0,0 +1,56 @@
{**
* 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)
*}
<!-- <label for="node-search">{l s=$label}</label> -->
<div class="pull-right">
<input type="text"
{if isset($id)}id="{$id|escape:'html':'UTF-8'}"{/if}
{if isset($name)}name="{$name|escape:'html':'UTF-8'}"{/if}
class="search-field{if isset($class)} {$class|escape:'html':'UTF-8'}{/if}"
placeholder="{l s='search...'}" />
</div>
{if isset($typeahead_source) && isset($id)}
<script type="text/javascript">
$(document).ready(
function()
{
$("#{$id|escape:'html':'UTF-8'}").typeahead(
{
name: "{$name|escape:'html':'UTF-8'}",
valueKey: 'name',
local: [{$typeahead_source}]
});
$("#{$id|escape:'html':'UTF-8'}").keypress(function( event ) {
if ( event.which == 13 ) {
event.stopPropagation();
}
});
}
);
</script>
{/if}

View File

@@ -0,0 +1,216 @@
{**
* 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)
*}
<div class="form-group" style="display: none;">
<div class="col-lg-12" id="{$id|escape:'html':'UTF-8'}-images-thumbnails">
{if isset($files) && $files|count > 0}
{foreach $files as $file}
{if isset($file.image) && $file.type == 'image'}
<div>
{$file.image}
{if isset($file.size)}<p>{l s='File size'} {$file.size}kb</p>{/if}
{if isset($file.delete_url)}
<p>
<a class="btn btn-default" href="{$file.delete_url}">
<i class="icon-trash"></i> {l s='Delete' d='Admin.Actions'}
</a>
</p>
{/if}
</div>
{/if}
{/foreach}
{/if}
</div>
</div>
{if isset($max_files) && $files|count >= $max_files}
<div class="row">
<div class="alert alert-warning">{l s='You have reached the limit (%s) of files to upload, please remove files to continue uploading' sprintf=[$max_files]}</div>
</div>
<script type="text/javascript">
$( document ).ready(function() {
{if isset($files) && $files}
$('#{$id|escape:'html':'UTF-8'}-images-thumbnails').parent().show();
{/if}
});
</script>
{else}
<div class="form-group">
<div class="col-lg-12">
<input id="{$id|escape:'html':'UTF-8'}" type="file" name="{$name|escape:'html':'UTF-8'}[]"{if isset($url)} data-url="{$url|escape:'html':'UTF-8'}"{/if}{if isset($multiple) && $multiple} multiple="multiple"{/if} style="width:0px;height:0px;" />
<button class="btn btn-default" data-style="expand-right" data-size="s" type="button" id="{$id|escape:'html':'UTF-8'}-add-button">
<i class="icon-folder-open"></i> {if isset($multiple) && $multiple}{l s='Add files...'}{else}{l s='Add file...'}{/if}
</button>
</div>
</div>
<div class="well" style="display:none">
<div id="{$id|escape:'html':'UTF-8'}-files-list"></div>
<button class="ladda-button btn btn-primary" data-style="expand-right" type="button" id="{$id|escape:'html':'UTF-8'}-upload-button" style="display:none;">
<span class="ladda-label"><i class="icon-check"></i> {if isset($multiple) && $multiple}{l s='Upload files'}{else}{l s='Upload file'}{/if}</span>
</button>
</div>
<div class="row" style="display:none">
<div class="alert alert-success" id="{$id|escape:'html':'UTF-8'}-success"></div>
</div>
<div class="row" style="display:none">
<div class="alert alert-danger" id="{$id|escape:'html':'UTF-8'}-errors"></div>
</div>
<script type="text/javascript">
function humanizeSize(bytes)
{
if (typeof bytes !== 'number') {
return '';
}
if (bytes >= 1000000000) {
return (bytes / 1000000000).toFixed(2) + ' GB';
}
if (bytes >= 1000000) {
return (bytes / 1000000).toFixed(2) + ' MB';
}
return (bytes / 1000).toFixed(2) + ' KB';
}
$( document ).ready(function() {
{if isset($multiple) && isset($max_files)}
var {$id|escape:'html':'UTF-8'}_max_files = {$max_files - ($files|count)};
{/if}
{if isset($files) && $files}
$('#{$id|escape:'html':'UTF-8'}-images-thumbnails').parent().show();
{/if}
var {$id|escape:'html':'UTF-8'}_upload_button = Ladda.create( document.querySelector('#{$id|escape:'html':'UTF-8'}-upload-button' ));
var {$id|escape:'html':'UTF-8'}_total_files = 0;
$('#{$id|escape:'html':'UTF-8'}').fileupload({
dataType: 'json',
async: false,
autoUpload: false,
singleFileUploads: true,
{if isset($post_max_size)}maxFileSize: {$post_max_size},{/if}
{if isset($drop_zone)}dropZone: {$drop_zone},{/if}
start: function (e) {
{$id|escape:'html':'UTF-8'}_upload_button.start();
$('#{$id|escape:'html':'UTF-8'}-upload-button').unbind('click'); //Important as we bind it for every elements in add function
},
fail: function (e, data) {
$('#{$id|escape:'html':'UTF-8'}-errors').html(data.errorThrown.message).parent().show();
},
done: function (e, data) {
if (data.result) {
if (typeof data.result.{$name|escape:'html':'UTF-8'} !== 'undefined') {
for (var i=0; i<data.result.{$name|escape:'html':'UTF-8'}.length; i++) {
if (data.result.{$name|escape:'html':'UTF-8'}[i] !== null) {
if (typeof data.result.{$name|escape:'html':'UTF-8'}[i].error !== 'undefined' && data.result.{$name|escape:'html':'UTF-8'}[i].error != '') {
$('#{$id|escape:'html':'UTF-8'}-errors').html('<strong>'+data.result.{$name|escape:'html':'UTF-8'}[i].name+'</strong> : '+data.result.{$name|escape:'html':'UTF-8'}[i].error).parent().show();
}
else
{
$(data.context).appendTo($('#{$id|escape:'html':'UTF-8'}-success'));
$('#{$id|escape:'html':'UTF-8'}-success').parent().show();
if (typeof data.result.{$name|escape:'html':'UTF-8'}[i].image !== 'undefined')
{
var template = '<div>';
template += data.result.{$name|escape:'html':'UTF-8'}[i].image;
if (typeof data.result.{$name|escape:'html':'UTF-8'}[i].delete_url !== 'undefined')
template += '<p><a class="btn btn-default" href="'+data.result.{$name|escape:'html':'UTF-8'}[i].delete_url+'"><i class="icon-trash"></i> {l s='Delete' d='Admin.Actions'}</a></p>';
template += '</div>';
$('#{$id|escape:'html':'UTF-8'}-images-thumbnails').html($('#{$id|escape:'html':'UTF-8'}-images-thumbnails').html()+template);
$('#{$id|escape:'html':'UTF-8'}-images-thumbnails').parent().show();
}
}
}
}
}
$(data.context).find('button').remove();
}
},
}).on('fileuploadalways', function (e, data) {
{$id|escape:'html':'UTF-8'}_total_files--;
{$id|escape:'html':'UTF-8'}_max_files--;
if ({$id|escape:'html':'UTF-8'}_total_files == 0)
{
{$id|escape:'html':'UTF-8'}_upload_button.stop();
$('#{$id|escape:'html':'UTF-8'}-upload-button').unbind('click');
$('#{$id|escape:'html':'UTF-8'}-files-list').parent().hide();
}
}).on('fileuploadadd', function(e, data) {
if (typeof {$id|escape:'html':'UTF-8'}_max_files !== 'undefined') {
if ({$id|escape:'html':'UTF-8'}_total_files >= {$id|escape:'html':'UTF-8'}_max_files) {
e.preventDefault();
alert('{l s='You cannot have more than %s images in total. Please remove some of the current images before adding new ones.' sprintf=[$max_files]}');
return;
}
}
data.context = $('<div/>').addClass('form-group').appendTo($('#{$id|escape:'html':'UTF-8'}-files-list'));
var file_name = $('<span/>').append('<strong>'+data.files[0].name+'</strong> ('+humanizeSize(data.files[0].size)+')').appendTo(data.context);
var button = $('<button/>').addClass('btn btn-default pull-right').prop('type', 'button').html('<i class="icon-trash"></i> {l s='Remove file'}').appendTo(data.context).on('click', function() {
{$id|escape:'html':'UTF-8'}_total_files--;
data.files = null;
var total_elements = $(this).parent().siblings('div.form-group').length;
$(this).parent().remove();
if (total_elements == 0) {
$('#{$id|escape:'html':'UTF-8'}-files-list').html('').parent().hide();
}
});
$('#{$id|escape:'html':'UTF-8'}-files-list').parent().show();
$('#{$id|escape:'html':'UTF-8'}-upload-button').show().bind('click', function () {
if (data.files != null)
data.submit();
});
{$id|escape:'html':'UTF-8'}_total_files++;
}).on('fileuploadprocessalways', function (e, data) {
var index = data.index, file = data.files[index];
if (file.error) {
$('#{$id|escape:'html':'UTF-8'}-errors').append('<div class="form-group"><strong>'+file.name+'</strong> ('+humanizeSize(file.size)+') : '+file.error+'</div>').parent().show();
$(data.context).find('button').trigger('click');
}
});
$('#{$id|escape:'html':'UTF-8'}-files-list').parent().hide();
{$id|escape:'html':'UTF-8'}_total_files = 0;
$('#{$id|escape:'html':'UTF-8'}-add-button').on('click', function() {
$('#{$id|escape:'html':'UTF-8'}-success').html('').parent().hide();
$('#{$id|escape:'html':'UTF-8'}-errors').html('').parent().hide();
$('#{$id|escape:'html':'UTF-8'}').trigger('click');
});
});
</script>
{/if}

View File

@@ -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;

View File

@@ -0,0 +1,140 @@
{**
* 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)
*}
{if isset($files) && $files|count > 0}
{assign var='show_thumbnail' value=false}
{foreach $files as $file}
{if isset($file.image) && $file.type == 'image'}
{assign var='show_thumbnail' value=true}
{/if}
{/foreach}
{if $show_thumbnail}
<div class="form-group">
<div class="col-lg-12" id="{$id|escape:'html':'UTF-8'}-images-thumbnails">
{foreach $files as $file}
{if isset($file.image) && $file.type == 'image'}
<div>
{$file.image}
{if isset($file.size)}<p>{l s='File size'} {$file.size}kb</p>{/if}
{if isset($file.delete_url)}
<p>
<a class="btn btn-default" href="{$file.delete_url}">
<i class="icon-trash"></i> {l s='Delete' d='Admin.Actions'}
</a>
</p>
{/if}
</div>
{/if}
{/foreach}
</div>
</div>
{/if}
{/if}
{if isset($max_files) && $files|count >= $max_files}
<div class="row">
<div class="alert alert-warning">{l s='You have reached the limit (%s) of files to upload, please remove files to continue uploading' sprintf=[$max_files]}</div>
</div>
{else}
<div class="form-group">
<div class="col-sm-6">
<input id="{$id|escape:'html':'UTF-8'}" type="file" name="{$name|escape:'html':'UTF-8'}{if isset ($multiple) && $multiple}[]{/if}"{if isset($multiple) && $multiple} multiple="multiple"{/if} class="hide" />
<div class="dummyfile input-group">
<span class="input-group-addon"><i class="icon-file"></i></span>
<input id="{$id|escape:'html':'UTF-8'}-name" type="text" name="{$name|escape:'html':'UTF-8'}" readonly />
<span class="input-group-btn">
<button id="{$id|escape:'html':'UTF-8'}-selectbutton" type="button" name="submitAddAttachments" class="btn btn-default">
<i class="icon-folder-open"></i> {if isset($multiple) && $multiple}{l s='Add files'}{else}{l s='Add file'}{/if}
</button>
{if (!isset($multiple) || !$multiple) && isset($files) && $files|count == 1 && isset($files[0].download_url)}
<a href="{$files[0].download_url|escape:'html':'UTF-8'}" class="btn btn-default">
<i class="icon-cloud-download"></i>
{if isset($size)}{l s='Download current file (%skb)' sprintf=[$size]}{else}{l s='Download current file'}{/if}
</a>
{/if}
</span>
</div>
</div>
</div>
<script type="text/javascript">
{if isset($multiple) && isset($max_files)}
var {$id|escape:'html':'UTF-8'}_max_files = {$max_files - ($files|count)};
{/if}
$(document).ready(function(){
$('#{$id|escape:'html':'UTF-8'}-selectbutton').click(function(e) {
$('#{$id|escape:'html':'UTF-8'}').trigger('click');
});
$('#{$id|escape:'html':'UTF-8'}-name').click(function(e) {
$('#{$id|escape:'html':'UTF-8'}').trigger('click');
});
$('#{$id|escape:'html':'UTF-8'}-name').on('dragenter', function(e) {
e.stopPropagation();
e.preventDefault();
});
$('#{$id|escape:'html':'UTF-8'}-name').on('dragover', function(e) {
e.stopPropagation();
e.preventDefault();
});
$('#{$id|escape:'html':'UTF-8'}-name').on('drop', function(e) {
e.preventDefault();
var files = e.originalEvent.dataTransfer.files;
$('#{$id|escape:'html':'UTF-8'}')[0].files = files;
$(this).val(files[0].name);
});
$('#{$id|escape:'html':'UTF-8'}').change(function(e) {
if ($(this)[0].files !== undefined)
{
var files = $(this)[0].files;
var name = '';
$.each(files, function(index, value) {
name += value.name+', ';
});
$('#{$id|escape:'html':'UTF-8'}-name').val(name.slice(0, -2));
}
else // Internet Explorer 9 Compatibility
{
var name = $(this).val().split(/[\\/]/);
$('#{$id|escape:'html':'UTF-8'}-name').val(name[name.length-1]);
}
});
if (typeof {$id|escape:'html':'UTF-8'}_max_files !== 'undefined')
{
$('#{$id|escape:'html':'UTF-8'}').closest('form').on('submit', function(e) {
if ($('#{$id|escape:'html':'UTF-8'}')[0].files.length > {$id|escape:'html':'UTF-8'}_max_files) {
e.preventDefault();
alert('{l s='You can upload a maximum of %s files' sprintf=[$max_files]}');
}
});
}
});
</script>
{/if}

View File

@@ -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;

View File

@@ -0,0 +1,37 @@
{**
* 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)
*}
<div class="leadin">{block name="leadin"}{/block}</div>
{block name="override_tpl"}{/block}
{hook h='displayAdminView'}
{if isset($name_controller)}
{capture name=hookName assign=hookName}display{$name_controller|ucfirst}View{/capture}
{hook h=$hookName}
{elseif isset($smarty.get.controller)}
{capture name=hookName assign=hookName}display{$smarty.get.controller|ucfirst|htmlentities}View{/capture}
{hook h=$hookName}
{/if}