// Move controller templates to subfolder controllers/

This commit is contained in:
tDidierjean
2012-01-09 17:23:42 +00:00
parent 14c9eec92a
commit e2dbac517f
168 changed files with 190 additions and 132 deletions
@@ -0,0 +1,55 @@
{*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision: 8971 $
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<div id="referrersContainer">
<div id="calendar">
<form action="{$current}&token={$token}{if $action && $table}&{$action}{$table}{/if}{if $identifier && $id}&{$identifier}={$id}{/if}" method="post" id="calendar_form" name="calendar_form">
<input type="submit" name="submitDateDay" class="button submitDateDay" value="{$translations.Day}">
<input type="submit" name="submitDateMonth" class="button submitDateMonth" value="{$translations.Month}">
<input type="submit" name="submitDateYear" class="button submitDateYear" value="{$translations.Year}">
<input type="submit" name="submitDateDayPrev" class="button submitDateDayPrev" value="{$translations.Day}-1">
<input type="submit" name="submitDateMonthPrev" class="button submitDateMonthPrev" value="{$translations.Month}-1">
<input type="submit" name="submitDateYearPrev" class="button submitDateYearPrev" value="{$translations.Year}-1">
<p><span>{if isset($translations.From)}{$translations.From}{else}{l s='From:'}{/if}</span>
<input type="text" name="datepickerFrom" id="datepickerFrom" value="{$datepickerFrom}" class="datepicker">
</p>
<p><span>{if isset($translations.To)}{$translations.To}{else}<span>{l s='From:'}</span>{/if}</span>
<input type="text" name="datepickerTo" id="datepickerTo" value="{$datepickerTo}" class="datepicker">
</p>
<input type="submit" name="submitDatePicker" id="submitDatePicker" class="button" value="{if isset($translations.Save)}{$translations.Save}{else}{l s=' Save '}{/if}" />
</form>
<script type="text/javascript">
$(document).ready(function() {
if ($("form#calendar_form .datepicker").length > 0)
$("form#calendar_form .datepicker").datepicker({
prevText: '',
nextText: '',
dateFormat: 'yy-mm-dd'
});
});
</script>
</div>
@@ -0,0 +1,122 @@
{*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision: 9795 $
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{extends file="helper/form/form.tpl"}
{block name="other_fieldsets"}
{if $f == 1}
<br class="clear" />
<fieldset>
<legend onclick="$('#tracking_help').slideToggle();" style="cursor:pointer;">
<img src="../img/admin/help.png" /> {l s='Help'}
</legend>
<div id="tracking_help" style="display: none;">
<p>{l s='Definitions:'}</p>
<ul style="list-style: disc; margin-left: 20px;">
<li>
{l s='The field `http_referer` is the website from which your customers arrive.'}<br />
{l s='For example, visitors coming from Google will have a `http_referer` like this one: "http://www.google.com/search?q=prestashop".'}<br />
{l s='If the visitor arrives directly (by typing the URL of your shop or by using their bookmarks, for example), `http_referer` will be empty.'}<br />
{l s='So if you want all the visitors coming from google, you can type "%google%" in this field, or "%google.fr%" if you want the visitors coming from Google France only.'}<br />
</li>
<br />
<li>
{l s='The field `request_uri` is the URL from which the customers come to your website.'}<br />
{l s='For example, if the visitor accesses a product page, the URL will be'} "{$uri}music-ipods/1-ipod-nano.html".<br />
{l s='This is interesting because you can add some tags or tokens in the links pointing to your website. For example, you can post a link'} "{$uri}index.php?prestashop" {l s='in the forum and get statistics by entering "%prestashop" in the field `request_uri`. You will get all the visitors coming from the forum.'}
{l s='This method is more reliable than the `http_referer` one, but there is a danger: if a search engine read a page with your link, then it will be displayed in its results and you will have not only the forum visitors, but also the ones from the search engine.'}
</li>
<br />
<li>
{l s='The fields `include` indicate what has to be included in the URL.'}
</li>
<br />
<li>
{l s='The fields `exclude` indicate what has to be excluded from the URL.'}
</li>
<br />
<li>
{l s='When using the simple mode, you can use some generic characters which can replace any characters:'}
<ul>
<li>{l s='"_" will replace one character. If you want to use the real "_", you should type'} "\\_".</li>
<li>{l s='"%" will replace any number of characters. If you want to use the real "%", you should type'} "\\%".</li>
</ul>
</li>
<br />
<li>
{l s='The simple mode uses the MySQL "LIKE", but for a higher potency you can use MySQL regular expressions.'}
<a href="http://dev.mysql.com/doc/refman/5.0/en/regexp.html" target="_blank" style="font-style: italic;">{l s='Take a look at the document for more details...'}</a>
</li>
</ul>
</div>
</fieldset>
{/if}
{/block}
{block name="other_input"}
{if $key == 'help'}
<a style="cursor:pointer;font-style:italic;" onclick="$('#tracking_help').slideToggle();">
<img src="../img/admin/help.png" /> {l s='Get help!'}
</a>
{/if}
{/block}
{block name="label"}
{if $input.name == 'http_referer_regexp'}
<div id="tracking_expert" style="display: none;">
{/if}
{if isset($input.h3)}
<h3>{$input.h3}</h3>
{/if}
{if isset($input.label)}
<label>{$input.label} </label>
{/if}
{/block}
{block name="end_field_block"}
</div>
{if $input.name == 'request_uri_regexp_not'}
</div>
{/if}
{/block}
{block name="script"}
$(document).ready(function() {
$('fieldset#fieldset_3 legend').css('cursor', 'pointer');
$('fieldset#fieldset_3 legend').click(function(){
$('#tracking_expert').slideToggle();
});
});
{/block}
@@ -0,0 +1,64 @@
{*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision: 8971 $
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
</div>
<div>
<fieldset>
<legend>
<img src="../img/admin/tab-preferences.gif" /> {l s='Settings'}
</legend>
<form action="{$current}&token={$token}" method="post" id="settings_form" name="settings_form">
<label>{l s='Save direct traffic'}</label>
<div class="margin-left">
<label class="t" for="tracking_dt_on"><img src="../img/admin/enabled.gif" alt="{l s='Yes'}" title="{l s='Yes'}" /></label>
<input type="radio" name="tracking_dt" id="tracking_dt_on" value="1" {if $tracking_dt}checked="checked"{/if} />
<label class="t" for="tracking_dt_on"> {l s='Yes'}</label>
<label class="t" for="tracking_dt_off"><img src="../img/admin/disabled.gif" alt="{l s='No'}" title="{l s='No'}" style="margin-left: 10px;" /></label>
<input type="radio" name="tracking_dt" id="tracking_dt_off" value="0" {if !$tracking_dt}checked="checked"{/if}/>
<label class="t" for="tracking_dt_off"> {l s='No'}</label>
</div>
<p>{l s='Direct traffic can be quite consuming. You should consider enabling it only if you have a strong database server and a strong need for it.'}</p>
<input type="submit" class="button" value="{l s=' Save '}" name="submitSettings" id="submitSettings" />
</form>
<div class="separation"></div>
<form action="{$current}&token={$token}" method="post" id="refresh_index_form" name="refresh_index_form">
<h3>{l s='Indexation'}</h3>
<p>{l s='There is a huge quantity of data, so each connection corresponding to a referrer is indexed. You can refresh this index by clicking on the button above. Be aware that it may take a long time and it is only needed if you modified or added a referrer and if you want your changes to be retroactive.'}</p>
<input type="submit" class="button" value="{l s='Refresh index'}" name="submitRefreshIndex" id="submitRefreshIndex" />
</form>
<div class="separation"></div>
<form action="{$current}&token={$token}" method="post" id="refresh_cache_form" name="refresh_cache_form">
<h3>{l s='Cache'}</h3>
<p>{l s='For you to sort and filter your data, it is cached. You can refresh the cache by clicking on the button above.'}</p>
<input type="submit" class="button" value="{l s='Refresh cache'}" name="submitRefreshCache" id="submitRefreshCache" />
</form>
</fieldset>
</div>
<div class="clear">&nbsp;</div>
@@ -0,0 +1,89 @@
{*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision: 9639 $
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{extends file="helper/list/list_header.tpl"}
{block name="override_header"}
<script language="javascript">
$(function() {
var btn_save_calendar = $('span[class~="process-icon-save-calendar"]').parent();
var btn_submit_calendar = $('#submitDatePicker');
if (btn_save_calendar.length > 0 && btn_submit_calendar.length > 0)
{
btn_submit_calendar.hide();
btn_save_calendar.click(function() {
btn_submit_calendar.before('<input type="hidden" name="'+btn_submit_calendar.attr("name")+'" value="1" />');
$('#calendar_form').submit();
});
}
var btn_save_settings = $('span[class~="process-icon-save-settings"]').parent();
var btn_submit_settings = $('#submitSettings');
if (btn_save_settings.length > 0 && btn_submit_settings.length > 0)
{
btn_submit_settings.hide();
btn_save_settings.click(function() {
btn_submit_settings.before('<input type="hidden" name="'+btn_submit_settings.attr("name")+'" value="1" />');
$('#settings_form').submit();
});
}
var btn_save_refresh_index = $('span[class~="process-icon-refresh-index"]').parent();
var btn_submit_refresh_index = $('#submitRefreshIndex');
if (btn_save_refresh_index.length > 0 && btn_submit_refresh_index.length > 0)
{
btn_submit_refresh_index.hide();
btn_save_refresh_index.click(function() {
btn_submit_refresh_index.before('<input type="hidden" name="'+btn_submit_refresh_index.attr("name")+'" value="1" />');
$('#refresh_index_form').submit();
});
}
var btn_save_refresh_cache = $('span[class~="process-icon-refresh-cache"]').parent();
var btn_submit_refresh_cache = $('#submitRefreshCache');
if (btn_save_refresh_cache.length > 0 && btn_submit_refresh_cache.length > 0)
{
btn_submit_refresh_cache.hide();
btn_save_refresh_cache.click(function() {
btn_submit_refresh_cache.before('<input type="hidden" name="'+btn_submit_refresh_cache.attr("name")+'" value="1" />');
$('#refresh_cache_form').submit();
});
}
});
</script>
{if $enable_calendar}
{$calendar_form}
{$settings_form}
{/if}
{/block}
@@ -0,0 +1,131 @@
{*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision: 8897 $
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{extends file="helper/view/view.tpl"}
{block name="override_tpl"}
<script language="javascript">
$(function() {
var btn_save_calendar = $('span[class~="process-icon-save-calendar"]').parent();
var btn_submit_calendar = $('#submitDatePicker');
if (btn_save_calendar.length > 0 && btn_submit_calendar.length > 0)
{
btn_submit_calendar.hide();
btn_save_calendar.click(function() {
btn_submit_calendar.before('<input type="hidden" name="'+btn_submit_calendar.attr("name")+'" value="1" />');
$('#calendar_form').submit();
});
}
});
</script>
{if $enable_calendar}
{$calendar_form}
{/if}
</div>
<script type="text/javascript">
function updateConversionRate(id_product)
{
$.getJSON('ajax.php',
{
ajaxReferrers:1,
ajaxProductFilter:1,
id_employee:{$id_employee},
token:'{$token}',
id_referrer:{$referrer->id},
id_product:id_product
},
function(j) {
{foreach $display_tab as $key => $value}
$("#{$key}").html(j[0].{$key});
{/foreach}
}
)
}
function fillProducts(filter)
{
var form = document.layers ? document.forms.product_referrers : document.product_referrers;
var filter = form.filterProduct.value;
$.getJSON('ajax.php',
{
ajaxReferrers:1,
ajaxFillProducts:1,
id_employee:{$id_employee},
token:'{$token}',
id_lang:{$id_lang},
filter:filter
},
function(j) {
form.selectProduct.length = j.length + 1;
for (var i = 0; i < j.length; i++)
{
form.selectProduct.options[i+1].value = j[i].id_product;
form.selectProduct.options[i+1].text = j[i].name;
}
}
);
}
</script>
<fieldset style="margin-left: 280px;">
<legend>
<img src="../img/admin/tab-stats.gif" /> {l s='Statistics'}
</legend>
<h2>{$referrer->name}</h2>
<table>
{foreach $display_tab as $data => $label}
<tr>
<td>{$label}</td>
<td style="color:green;font-weight:bold;padding-left:20px;" id="{$data}"></td>
</tr>
{/foreach}
</table>
<br class="clear" />
<form id="product_referrers" name="product_referrers">
<label>{l s='Filter by product:'}</label>
<div class="margin-left">
<select id="selectProduct" name="selectProduct" style="width: 200px;" onfocus="fillProducts();" onchange="updateConversionRate(this.value);">
<option value="0" selected="selected">-- {l s='All'} --</option>
</select>
</div>
<br class="clear" />
<label>{l s='Search:'}</label>
<div class="margin-left">
<input type="text" size="34" id="filterProduct" name="filterProduct" onkeyup="fillProducts();" />
</div>
</form>
</fieldset>
<script type="text/javascript">
updateConversionRate(0);
</script>
{/block}