// Toolbar modifs
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
<div id="ajax_confirmation" class="alert alert-success" style="display:none"></div>
|
||||
{* ajaxBox allows*} <div id="ajaxBox" style="display:none"></div>
|
||||
{if isset($content)}
|
||||
{if isset($show_page_header_toolbar) && $show_page_header_toolbar}
|
||||
{if isset($show_page_header_toolbar) && $show_page_header_toolbar &&(!isset($lite_display) || !$lite_display)}
|
||||
<div class="leadin">
|
||||
{foreach from=$page_header_toolbar_btn item=btn key=k}
|
||||
{if $k == 'modules-list'}
|
||||
|
||||
@@ -22,6 +22,33 @@
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{if isset($content)}
|
||||
{if isset($show_page_header_toolbar) && $show_page_header_toolbar &&(!isset($lite_display) || !$lite_display)}
|
||||
<div class="leadin">
|
||||
{foreach from=$page_header_toolbar_btn item=btn key=k}
|
||||
{if $k == 'modules-list'}
|
||||
<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">×</button>
|
||||
<h3 class="modal-title">{l s='Modules'}</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="modules_list_container_tab" style="display:none;"></div>
|
||||
<div id="modules_list_loader"><img src="../img/loader.gif" alt=""/></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
{include file="page_header_toolbar.tpl" toolbar_btn=$page_header_toolbar_btn title=$page_header_toolbar_title}
|
||||
{/if}
|
||||
{$content}
|
||||
{/if}
|
||||
|
||||
<iframe frameborder="no" style="margin:0px;padding:0px;width:100%;height:920px" src="http://addons.prestashop.com/iframe/search.php?parentUrl={$parentDomain}"></iframe>
|
||||
<div class="clear"> </div>
|
||||
|
||||
|
||||
@@ -1,45 +1,37 @@
|
||||
<div class="row">
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="productTabs">
|
||||
<ul class="tab nav nav-tabs">
|
||||
<li class="tab-row">
|
||||
<a class="tab-page" id="cart_rule_link_informations" href="javascript:displayCartRuleTab('informations');"><i class="icon-info"></i> {l s='Information'}</a>
|
||||
</li>
|
||||
<li class="tab-row">
|
||||
<a class="tab-page" id="cart_rule_link_conditions" href="javascript:displayCartRuleTab('conditions');"><i class="icon-random"></i> {l s='Conditions'}</a>
|
||||
</li>
|
||||
<li class="tab-row">
|
||||
<a class="tab-page" id="cart_rule_link_actions" href="javascript:displayCartRuleTab('actions');"><i class="icon-wrench"></i> {l s='Actions'}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<form action="{$currentIndex|escape}&token={$currentToken|escape}&addcart_rule" id="cart_rule_form" class="form-horizontal" method="post">
|
||||
{if $currentObject->id}<input type="hidden" name="id_cart_rule" value="{$currentObject->id|intval}" />{/if}
|
||||
<input type="hidden" id="currentFormTab" name="currentFormTab" value="informations" />
|
||||
<fieldset id="cart_rule_informations" class="cart_rule_tab">
|
||||
<h3><i class="icon-info"></i> {l s='Cart rule information'}</h3>
|
||||
{include file='controllers/cart_rules/informations.tpl'}
|
||||
</fieldset>
|
||||
<fieldset id="cart_rule_conditions" class="cart_rule_tab">
|
||||
<h3><i class="icon-random"></i> {l s='Cart rule conditions'}</h3>
|
||||
{include file='controllers/cart_rules/conditions.tpl'}
|
||||
</fieldset>
|
||||
<fieldset id="cart_rule_actions" class="cart_rule_tab">
|
||||
<h3><i class="icon-wrench"></i> {l s='Cart rule actions'}</h3>
|
||||
{include file='controllers/cart_rules/actions.tpl'}
|
||||
</fieldset>
|
||||
<button type="submit" class="btn btn-primary btn-large pull-right" name="submitAddcart_rule" id="{$table|escape}_form_submit_btn"><i class="icon-save"></i> {l s='Save'}</button>
|
||||
<!--<input type="submit" value="{l s='Save and stay'}" class="button" name="submitAddcart_ruleAndStay" id="" />-->
|
||||
</form>
|
||||
<div class="productTabs">
|
||||
<ul class="tab nav nav-tabs">
|
||||
<li class="tab-row">
|
||||
<a class="tab-page" id="cart_rule_link_informations" href="javascript:displayCartRuleTab('informations');"><i class="icon-info"></i> {l s='Information'}</a>
|
||||
</li>
|
||||
<li class="tab-row">
|
||||
<a class="tab-page" id="cart_rule_link_conditions" href="javascript:displayCartRuleTab('conditions');"><i class="icon-random"></i> {l s='Conditions'}</a>
|
||||
</li>
|
||||
<li class="tab-row">
|
||||
<a class="tab-page" id="cart_rule_link_actions" href="javascript:displayCartRuleTab('actions');"><i class="icon-wrench"></i> {l s='Actions'}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<form action="{$currentIndex|escape}&token={$currentToken|escape}&addcart_rule" id="cart_rule_form" class="form-horizontal" method="post">
|
||||
{if $currentObject->id}<input type="hidden" name="id_cart_rule" value="{$currentObject->id|intval}" />{/if}
|
||||
<input type="hidden" id="currentFormTab" name="currentFormTab" value="informations" />
|
||||
<fieldset id="cart_rule_informations" class="cart_rule_tab">
|
||||
<h3><i class="icon-info"></i> {l s='Cart rule information'}</h3>
|
||||
{include file='controllers/cart_rules/informations.tpl'}
|
||||
{include file="footer_toolbar.tpl"}
|
||||
</fieldset>
|
||||
<fieldset id="cart_rule_conditions" class="cart_rule_tab">
|
||||
<h3><i class="icon-random"></i> {l s='Cart rule conditions'}</h3>
|
||||
{include file='controllers/cart_rules/conditions.tpl'}
|
||||
{include file="footer_toolbar.tpl"}
|
||||
</fieldset>
|
||||
<fieldset id="cart_rule_actions" class="cart_rule_tab">
|
||||
<h3><i class="icon-wrench"></i> {l s='Cart rule actions'}</h3>
|
||||
{include file='controllers/cart_rules/actions.tpl'}
|
||||
{include file="footer_toolbar.tpl"}
|
||||
</fieldset>
|
||||
<button type="submit" class="btn btn-primary btn-large pull-right" name="submitAddcart_rule" id="{$table|escape}_form_submit_btn"><i class="icon-save"></i> {l s='Save'}</button>
|
||||
<!--<input type="submit" value="{l s='Save and stay'}" class="button" name="submitAddcart_ruleAndStay" id="" />-->
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
var product_rule_groups_counter = {if isset($product_rule_groups_counter)}{$product_rule_groups_counter|intval}{else}0{/if};
|
||||
|
||||
@@ -37,6 +37,30 @@
|
||||
</script>
|
||||
<script type="text/javascript" src="../js/sendMailTest.js"></script>
|
||||
|
||||
{$content}
|
||||
|
||||
{if isset($content)}
|
||||
{if isset($show_page_header_toolbar) && $show_page_header_toolbar &&(!isset($lite_display) || !$lite_display)}
|
||||
<div class="leadin">
|
||||
{foreach from=$page_header_toolbar_btn item=btn key=k}
|
||||
{if $k == 'modules-list'}
|
||||
<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">×</button>
|
||||
<h3 class="modal-title">{l s='Modules'}</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="modules_list_container_tab" style="display:none;"></div>
|
||||
<div id="modules_list_loader"><img src="../img/loader.gif" alt=""/></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
{include file="page_header_toolbar.tpl" toolbar_btn=$page_header_toolbar_btn title=$page_header_toolbar_title}
|
||||
{/if}
|
||||
{$content}
|
||||
{/if}
|
||||
|
||||
|
||||
+2
-3
@@ -26,7 +26,8 @@
|
||||
{extends file="helpers/options/options.tpl"}
|
||||
{block name="field"}
|
||||
{if $field['type'] == 'checkbox_table'}
|
||||
<div class="margin-form" style="float: left; padding-left: 0; width: 317px; margin-top: 6px; height: 300px; overflow-y: auto;">
|
||||
{*TODO : overflow*}
|
||||
<div class="well margin-form" style="height: 300px; overflow-y: auto;">
|
||||
<table class="table" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -44,8 +45,6 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<br />
|
||||
{else}
|
||||
{$smarty.block.parent}
|
||||
{/if}
|
||||
|
||||
@@ -22,8 +22,32 @@
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{$content}
|
||||
{if isset($content)}
|
||||
{if isset($show_page_header_toolbar) && $show_page_header_toolbar &&(!isset($lite_display) || !$lite_display)}
|
||||
<div class="leadin">
|
||||
{foreach from=$page_header_toolbar_btn item=btn key=k}
|
||||
{if $k == 'modules-list'}
|
||||
<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">×</button>
|
||||
<h3 class="modal-title">{l s='Modules'}</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="modules_list_container_tab" style="display:none;"></div>
|
||||
<div id="modules_list_loader"><img src="../img/loader.gif" alt=""/></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
{include file="page_header_toolbar.tpl" toolbar_btn=$page_header_toolbar_btn title=$page_header_toolbar_title}
|
||||
{/if}
|
||||
{$content}
|
||||
{/if}
|
||||
|
||||
{if isset($display_regenerate)}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
||||
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
{if $module_confirmation}
|
||||
<div class="module_confirmation conf confirm">
|
||||
|
||||
@@ -1,5 +1 @@
|
||||
{if $show_toolbar}
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
||||
{/if}
|
||||
|
||||
{$modules_list}
|
||||
@@ -23,7 +23,6 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
|
||||
<form action="{$url_submit}" id="{$table}_form" method="post" class="form-horizontal">
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
var come_from = 'AdminModulesPositions';
|
||||
</script>
|
||||
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
||||
<div>{block name="leadin"}{/block}</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
@@ -976,7 +976,6 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
|
||||
<form action="" method="" class="form-horizontal">
|
||||
|
||||
@@ -23,7 +23,35 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{$content}
|
||||
<div id="ajax_confirmation" class="alert alert-success" style="display:none"></div>
|
||||
{* ajaxBox allows*} <div id="ajaxBox" style="display:none"></div>
|
||||
{if isset($content)}
|
||||
{if isset($show_page_header_toolbar) && $show_page_header_toolbar &&(!isset($lite_display) || !$lite_display)}
|
||||
<div class="leadin">
|
||||
{foreach from=$page_header_toolbar_btn item=btn key=k}
|
||||
{if $k == 'modules-list'}
|
||||
<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">×</button>
|
||||
<h3 class="modal-title">{l s='Modules'}</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="modules_list_container_tab" style="display:none;"></div>
|
||||
<div id="modules_list_loader"><img src="../img/loader.gif" alt=""/></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
{include file="page_header_toolbar.tpl" toolbar_btn=$page_header_toolbar_btn title=$page_header_toolbar_title}
|
||||
{/if}
|
||||
{$content}
|
||||
{/if}
|
||||
|
||||
|
||||
<form action="{$action_fees}" id="fees" name="fees" method="post" class="form-horizontal">
|
||||
<fieldset>
|
||||
|
||||
@@ -23,8 +23,28 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{if $toolbar_btn}
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
||||
{if isset($show_page_header_toolbar) && $show_page_header_toolbar &&(!isset($lite_display) || !$lite_display)}
|
||||
<div class="leadin">
|
||||
{foreach from=$page_header_toolbar_btn item=btn key=k}
|
||||
{if $k == 'modules-list'}
|
||||
<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">×</button>
|
||||
<h3 class="modal-title">{l s='Modules'}</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="modules_list_container_tab" style="display:none;"></div>
|
||||
<div id="modules_list_loader"><img src="../img/loader.gif" alt=""/></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
{include file="page_header_toolbar.tpl" toolbar_btn=$page_header_toolbar_btn title=$page_header_toolbar_title}
|
||||
{/if}
|
||||
|
||||
<div class="row">
|
||||
|
||||
@@ -52,16 +52,23 @@
|
||||
{block name="after"}
|
||||
<fieldset id="prestastore-content"></fieldset>
|
||||
<script type="text/javascript">
|
||||
$.post(
|
||||
"ajax-tab.php",
|
||||
{
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
headers: { "cache-control": "no-cache" },
|
||||
url: 'ajax-tab.php?rand=' + new Date().getTime(),
|
||||
async: true,
|
||||
cache: false,
|
||||
dataType : "html",
|
||||
data: {
|
||||
tab: 'AdminThemes',
|
||||
token: '{$token}',
|
||||
ajax: '1',
|
||||
action:'getAddonsThemes',
|
||||
page:'themes'
|
||||
}, function(a){
|
||||
$("#prestastore-content").html("<h3><i class='icon-puzzle-piece'></i> {l s='Live from PrestaShop Addons!'}</h3>"+a);
|
||||
});
|
||||
},
|
||||
success: function(htmlData) {
|
||||
$("#prestastore-content").html("<h3><i class='icon-puzzle-piece'></i> {l s='Live from PrestaShop Addons!'}</h3>"+htmlData);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
{*
|
||||
* 2007-2013 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-2013 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{if $show_toolbar}
|
||||
<div class="panel-footer">
|
||||
{foreach from=$toolbar_btn item=btn key=k}
|
||||
{if $k != 'modules-list'}
|
||||
<a id="desc-{$table}-{if isset($btn.imgclass)}{$btn.imgclass}{else}{$k}{/if}" class="btn btn-default" {if isset($btn.href)}href="{$btn.href}"{/if} {if isset($btn.target) && $btn.target}target="_blank"{/if}{if isset($btn.js) && $btn.js}onclick="{$btn.js}"{/if}>
|
||||
<i class="process-icon-{if isset($btn.imgclass)}{$btn.imgclass}{else}{$k}{/if} {if isset($btn.class)}{$btn.class}{/if}" ></i> {l s=$btn.desc}
|
||||
</a>
|
||||
{/if}
|
||||
{/foreach}
|
||||
<script language="javascript" 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>
|
||||
</div>
|
||||
{/if}
|
||||
@@ -22,12 +22,6 @@
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{if $show_toolbar}
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
{/if}
|
||||
|
||||
{if isset($fields.title)}<h3>{$fields.title}</h3>{/if}
|
||||
|
||||
{block name="defaultForm"}
|
||||
@@ -82,7 +76,7 @@
|
||||
{/block}
|
||||
|
||||
{block name="field"}
|
||||
<div class="col-lg-9">
|
||||
<div class="col-lg-9{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}
|
||||
@@ -639,6 +633,9 @@
|
||||
<!-- {*if $required_fields}
|
||||
<div class="small"><sup>*</sup> {l s='Required field'}</div>
|
||||
{/if*} -->
|
||||
{block name="footer"}
|
||||
{include file="footer_toolbar.tpl"}
|
||||
{/block}
|
||||
</fieldset>
|
||||
{/block}
|
||||
{block name="other_fieldsets"}{/block}
|
||||
|
||||
@@ -57,25 +57,6 @@
|
||||
{if !$simple_header}
|
||||
<div class="leadin">
|
||||
{block name="leadin"}{/block}
|
||||
{foreach from=$toolbar_btn item=btn key=k}
|
||||
{if $k == 'modules-list'}
|
||||
<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">×</button>
|
||||
<h3 class="modal-title">{l s='Modules'}</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="modules_list_container_tab" style="display:none;"></div>
|
||||
<div id="modules_list_loader"><img src="../img/loader.gif" alt=""/></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{break}
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
@@ -100,28 +81,14 @@
|
||||
{if isset($toolbar_btn) && count($toolbar_btn) >0}
|
||||
<span class="panel-heading-action">
|
||||
{foreach from=$toolbar_btn item=btn key=k}
|
||||
<a id="desc-{$table}-{if isset($btn.imgclass)}{$btn.imgclass}{else}{$k}{/if}" class="list-tooolbar-btn" {if isset($btn.href)}href="{$btn.href}"{/if} {if isset($btn.target) && $btn.target}target="_blank"{/if}{if isset($btn.js) && $btn.js}onclick="{$btn.js}"{/if}>
|
||||
<label>
|
||||
<span title="" data-toggle="tooltip" class="label-tooltip" data-original-title="{l s=$btn.desc}" data-html="true">
|
||||
<i class="process-icon-{if isset($btn.imgclass)}{$btn.imgclass}{else}{$k}{/if} {if isset($btn.class)}{$btn.class}{/if}" ></i>
|
||||
</span>
|
||||
</label>
|
||||
</a>
|
||||
{if $k == 'modules-list'}
|
||||
<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">×</button>
|
||||
<h3 class="modal-title">{l s='Modules'}</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="modules_list_container_tab" style="display:none;"></div>
|
||||
<div id="modules_list_loader"><img src="../img/loader.gif" alt=""/></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{if $k != 'modules-list'}
|
||||
<a id="desc-{$table}-{if isset($btn.imgclass)}{$btn.imgclass}{else}{$k}{/if}" class="list-tooolbar-btn" {if isset($btn.href)}href="{$btn.href}"{/if} {if isset($btn.target) && $btn.target}target="_blank"{/if}{if isset($btn.js) && $btn.js}onclick="{$btn.js}"{/if}>
|
||||
<label>
|
||||
<span title="" data-toggle="tooltip" class="label-tooltip" data-original-title="{l s=$btn.desc}" data-html="true">
|
||||
<i class="process-icon-{if isset($btn.imgclass)}{$btn.imgclass}{else}{$k}{/if} {if isset($btn.class)}{$btn.class}{/if}" ></i>
|
||||
</span>
|
||||
</label>
|
||||
</a>
|
||||
{/if}
|
||||
{/foreach}
|
||||
<a id="desc-{$table}-refresh" class="list-tooolbar-btn" href="javascript:location.reload();">
|
||||
@@ -137,7 +104,7 @@
|
||||
<script language="javascript" type="text/javascript">
|
||||
//<![CDATA[
|
||||
var submited = false
|
||||
var modules_list_loaded = false;
|
||||
|
||||
$(function() {
|
||||
//get reference on save link
|
||||
btn_save = $('i[class~="process-icon-save"]').parent();
|
||||
@@ -205,52 +172,10 @@
|
||||
}
|
||||
{/block}
|
||||
}
|
||||
{if isset($tab_modules_open)}
|
||||
if ({$tab_modules_open})
|
||||
openModulesList();
|
||||
{/if}
|
||||
});
|
||||
{if isset($tab_modules_list)}
|
||||
$('.process-icon-modules-list').parent('a').unbind().bind('click', function (){
|
||||
console.log('ok');
|
||||
openModulesList();
|
||||
});
|
||||
|
||||
function openModulesList()
|
||||
{
|
||||
$('#modules_list_container').modal('show');
|
||||
if (!modules_list_loaded)
|
||||
{
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url : '{$admin_module_ajax_url}',
|
||||
async: true,
|
||||
data : {
|
||||
ajax : "1",
|
||||
controller : "AdminModules",
|
||||
action : "getTabModulesList",
|
||||
tab_modules_list : '{$tab_modules_list}',
|
||||
back_tab_modules_list : '{$back_tab_modules_list}'
|
||||
},
|
||||
success : function(data)
|
||||
{
|
||||
$('#modules_list_container_tab').html(data).slideDown();
|
||||
$('#modules_list_loader').hide();
|
||||
modules_list_loaded = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#modules_list_container_tab').slideDown();
|
||||
$('#modules_list_loader').hide();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
{/if}
|
||||
//]]>
|
||||
</script>
|
||||
{/if}
|
||||
</script>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{if $simple_header}
|
||||
|
||||
@@ -23,10 +23,7 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{if $show_toolbar}
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
{/if}
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
id_language = Number({$current_id_lang});
|
||||
@@ -380,6 +377,9 @@
|
||||
<div class="small"><sup>*</sup> {l s='Required field'}</div>
|
||||
{/if*} -->
|
||||
{if isset($categoryData['bottom'])}{$categoryData['bottom']}{/if}
|
||||
{block name="footer"}
|
||||
{include file="footer_toolbar.tpl"}
|
||||
{/block}
|
||||
</fieldset>
|
||||
{/foreach}
|
||||
{hook h='displayAdminOptions'}
|
||||
|
||||
@@ -23,10 +23,6 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{if $show_toolbar}
|
||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
||||
{/if}
|
||||
|
||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||
|
||||
{block name="override_tpl"}{/block}
|
||||
|
||||
@@ -1,201 +0,0 @@
|
||||
{*
|
||||
* 2007-2013 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-2013 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
|
||||
<div class="page-head">
|
||||
{block name=pageTitle}
|
||||
<h2 class="page-title">
|
||||
{if is_array($title)}{$title|end}{else}{$title}{/if}
|
||||
</h2>
|
||||
{/block}
|
||||
|
||||
<div class="page-bar toolbarBox">
|
||||
<div class="btn-toolbar">
|
||||
{block name=toolbarBox}
|
||||
<ul class="cc_button nav nav-pills pull-right">
|
||||
{foreach from=$toolbar_btn item=btn key=k}
|
||||
<li>
|
||||
<a id="desc-{$table}-{if isset($btn.imgclass)}{$btn.imgclass}{else}{$k}{/if}" class="toolbar_btn" {if isset($btn.href)}href="{$btn.href}"{/if} title="{$btn.desc}" {if isset($btn.target) && $btn.target}target="_blank"{/if}{if isset($btn.js) && $btn.js}onclick="{$btn.js}"{/if}>
|
||||
<i class="process-icon-{if isset($btn.imgclass)}{$btn.imgclass}{else}{$k}{/if} {if isset($btn.class)}{$btn.class}{/if}" ></i>
|
||||
<div {if isset($btn.force_desc) && $btn.force_desc == true } class="locked" {/if}>{$btn.desc}</div>
|
||||
</a>
|
||||
{if $k == 'modules-list'}
|
||||
<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">×</button>
|
||||
<h3 class="modal-title">{l s='Modules'}</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="modules_list_container_tab" style="display:none;"></div>
|
||||
<div id="modules_list_loader"><img src="../img/loader.gif" alt=""/></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
//<![CDATA[
|
||||
var submited = false
|
||||
var modules_list_loaded = 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}
|
||||
}
|
||||
{if isset($tab_modules_open)}
|
||||
if ({$tab_modules_open})
|
||||
openModulesList();
|
||||
{/if}
|
||||
});
|
||||
{if isset($tab_modules_list)}
|
||||
$('.process-icon-modules-list').parent('a').unbind().bind('click', function (){
|
||||
openModulesList();
|
||||
});
|
||||
|
||||
function openModulesList()
|
||||
{
|
||||
$('#modules_list_container').modal('show');
|
||||
if (!modules_list_loaded)
|
||||
{
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url : '{$admin_module_ajax_url}',
|
||||
async: true,
|
||||
data : {
|
||||
ajax : "1",
|
||||
controller : "AdminModules",
|
||||
action : "getTabModulesList",
|
||||
tab_modules_list : '{$tab_modules_list}',
|
||||
back_tab_modules_list : '{$back_tab_modules_list}'
|
||||
},
|
||||
success : function(data)
|
||||
{
|
||||
$('#modules_list_container_tab').html(data).slideDown();
|
||||
$('#modules_list_loader').hide();
|
||||
modules_list_loaded = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#modules_list_container_tab').slideDown();
|
||||
$('#modules_list_loader').hide();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
{/if}
|
||||
//]]>
|
||||
</script>
|
||||
{/block}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{block name=pageBreadcrumb}
|
||||
<ul class="breadcrumb hide">
|
||||
<li>
|
||||
{if $title}
|
||||
{foreach $title as $key => $item name=title}
|
||||
{* Use strip_tags because if the string already has been through htmlentities using escape will break it *}
|
||||
<span class="item-{$key} ">{$item|strip_tags}
|
||||
{if !$smarty.foreach.title.last}
|
||||
<img alt=">" style="margin-right:5px" src="../img/admin/separator_breadcrumb.png" />
|
||||
{/if}
|
||||
</span>
|
||||
{/foreach}
|
||||
{else}
|
||||
|
||||
{/if}
|
||||
</li>
|
||||
</ul>
|
||||
{/block}
|
||||
@@ -1119,17 +1119,43 @@ class AdminControllerCore extends Controller
|
||||
|
||||
$title = implode(' '.Configuration::get('PS_NAVIGATION_PIPE').' ', $this->toolbar_title);
|
||||
|
||||
switch ($this->display)
|
||||
{
|
||||
case 'view':
|
||||
// Default cancel button - like old back link
|
||||
$back = Tools::safeOutput(Tools::getValue('back', ''));
|
||||
if (empty($back))
|
||||
$back = self::$currentIndex.'&token='.$this->token;
|
||||
if (!Validate::isCleanHtml($back))
|
||||
die(Tools::displayError());
|
||||
if (!$this->lite_display)
|
||||
$this->page_header_toolbar_btn['back'] = array(
|
||||
'href' => $back,
|
||||
'desc' => $this->l('Back to list')
|
||||
);
|
||||
break;
|
||||
case 'add':
|
||||
case 'edit':
|
||||
// Default cancel button - like old back link
|
||||
$back = Tools::safeOutput(Tools::getValue('back', ''));
|
||||
if (empty($back))
|
||||
$back = self::$currentIndex.'&token='.$this->token;
|
||||
if (!Validate::isCleanHtml($back))
|
||||
die(Tools::displayError());
|
||||
if (!$this->lite_display)
|
||||
$this->page_header_toolbar_btn['cancel'] = array(
|
||||
'href' => $back,
|
||||
'desc' => $this->l('Cancel')
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
if (is_array($this->page_header_toolbar_btn)
|
||||
&& $this->page_header_toolbar_btn instanceof Traversable
|
||||
|| trim($title) != '')
|
||||
$this->show_page_header_toolbar = true;
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
|
||||
$this->page_header_toolbar_title = $title;
|
||||
$this->addPageHeaderToolBarModulesListButton();
|
||||
}
|
||||
|
||||
@@ -1149,7 +1175,17 @@ class AdminControllerCore extends Controller
|
||||
'href' => '#',
|
||||
'desc' => $this->l('Save')
|
||||
);
|
||||
//no break
|
||||
$back = Tools::safeOutput(Tools::getValue('back', ''));
|
||||
if (empty($back))
|
||||
$back = self::$currentIndex.'&token='.$this->token;
|
||||
if (!Validate::isCleanHtml($back))
|
||||
die(Tools::displayError());
|
||||
if (!$this->lite_display)
|
||||
$this->toolbar_btn['cancel'] = array(
|
||||
'href' => $back,
|
||||
'desc' => $this->l('Cancel')
|
||||
);
|
||||
break;
|
||||
case 'view':
|
||||
// Default cancel button - like old back link
|
||||
$back = Tools::safeOutput(Tools::getValue('back', ''));
|
||||
@@ -1545,9 +1581,11 @@ class AdminControllerCore extends Controller
|
||||
}
|
||||
|
||||
$this->getLanguages();
|
||||
// toolbar (save, cancel, new, ..)
|
||||
// toolbar (save, cancel, new, ..)
|
||||
$this->initToolbar();
|
||||
$this->initTabModuleList();
|
||||
$this->initPageHeaderToolbar();
|
||||
|
||||
if ($this->display == 'edit' || $this->display == 'add')
|
||||
{
|
||||
if (!$this->loadObject(true))
|
||||
@@ -1580,7 +1618,11 @@ class AdminControllerCore extends Controller
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content,
|
||||
'lite_display' => $this->lite_display,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
@@ -1695,8 +1737,6 @@ class AdminControllerCore extends Controller
|
||||
*/
|
||||
public function renderList()
|
||||
{
|
||||
$this->initPageHeaderToolbar();
|
||||
|
||||
if (!($this->fields_list && is_array($this->fields_list)))
|
||||
return false;
|
||||
$this->getList($this->context->language->id);
|
||||
@@ -2114,9 +2154,9 @@ class AdminControllerCore extends Controller
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
||||
}
|
||||
elseif (Tools::getValue('submitAdd'.$this->table)
|
||||
|| Tools::getValue('submitAdd'.$this->table.'AndStay')
|
||||
|| Tools::getValue('submitAdd'.$this->table.'AndPreview'))
|
||||
elseif (Tools::isSubmit('submitAdd'.$this->table)
|
||||
|| Tools::isSubmit('submitAdd'.$this->table.'AndStay')
|
||||
|| Tools::isSubmit('submitAdd'.$this->table.'AndPreview'))
|
||||
{
|
||||
// case 1: updating existing entry
|
||||
if ($this->id_object)
|
||||
@@ -2124,7 +2164,7 @@ class AdminControllerCore extends Controller
|
||||
if ($this->tabAccess['edit'] === '1')
|
||||
{
|
||||
$this->action = 'save';
|
||||
if (Tools::getValue('submitAdd'.$this->table.'AndStay'))
|
||||
if (Tools::isSubmit('submitAdd'.$this->table.'AndStay'))
|
||||
$this->display = 'edit';
|
||||
else
|
||||
$this->display = 'list';
|
||||
@@ -2138,7 +2178,7 @@ class AdminControllerCore extends Controller
|
||||
if ($this->tabAccess['add'] === '1')
|
||||
{
|
||||
$this->action = 'save';
|
||||
if (Tools::getValue('submitAdd'.$this->table.'AndStay'))
|
||||
if (Tools::isSubmit('submitAdd'.$this->table.'AndStay'))
|
||||
$this->display = 'edit';
|
||||
else
|
||||
$this->display = 'list';
|
||||
|
||||
@@ -45,12 +45,6 @@ class AdminAccessControllerCore extends AdminController
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Permissions');
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
/**
|
||||
* AdminController::renderForm() override
|
||||
* @see AdminController::renderForm()
|
||||
@@ -131,9 +125,23 @@ class AdminAccessControllerCore extends AdminController
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
public function initToolbarTitle()
|
||||
{
|
||||
$this->toolbar_title = array_unique($this->breadcrumbs);
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
parent::initPageHeaderToolbar();
|
||||
unset($this->page_header_toolbar_btn['cancel']);
|
||||
}
|
||||
|
||||
public function ajaxProcessUpdateAccess()
|
||||
{
|
||||
if (_PS_MODE_DEMO_)
|
||||
|
||||
@@ -26,9 +26,22 @@
|
||||
|
||||
class AdminAddonsCatalogControllerCore extends AdminController
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->bootstrap = true;
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function initContent()
|
||||
{
|
||||
$this->context->smarty->assign('parentDomain', Tools::getHttpHost(true).substr($_SERVER['REQUEST_URI'], 0, -1 * strlen(basename($_SERVER['REQUEST_URI']))));
|
||||
$this->initPageHeaderToolbar();
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'parentDomain' => Tools::getHttpHost(true).substr($_SERVER['REQUEST_URI'], 0, -1 * strlen(basename($_SERVER['REQUEST_URI']))),
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
parent::initContent();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,12 +85,12 @@ class AdminAddressesControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Addresses');
|
||||
$this->page_header_toolbar_btn['new_address'] = array(
|
||||
'href' => self::$currentIndex.'&addaddress&token='.$this->token,
|
||||
'desc' => $this->l('Add new address'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_address'] = array(
|
||||
'href' => self::$currentIndex.'&addaddress&token='.$this->token,
|
||||
'desc' => $this->l('Add new address'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -58,12 +58,12 @@ class AdminAttachmentsControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Attachments');
|
||||
$this->page_header_toolbar_btn['new_attachment'] = array(
|
||||
'href' => self::$currentIndex.'&addattachment&token='.$this->token,
|
||||
'desc' => $this->l('Add new attachment'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_attachment'] = array(
|
||||
'href' => self::$currentIndex.'&addattachment&token='.$this->token,
|
||||
'desc' => $this->l('Add new attachment'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -424,6 +424,7 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
||||
|
||||
// toolbar (save, cancel, new, ..)
|
||||
$this->initToolbar();
|
||||
$this->initPageHeaderToolbar();
|
||||
if ($this->display == 'edit' || $this->display == 'add')
|
||||
{
|
||||
if (!($this->object = $this->loadObject(true)))
|
||||
@@ -451,23 +452,16 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
||||
'token' => $this->token,
|
||||
'content' => $this->content,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
if ($this->display == 'view')
|
||||
if (empty($this->display))
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->attribute_name[$this->context->employee->id_lang];
|
||||
$this->page_header_toolbar_btn['back_to_list'] = array(
|
||||
'href' => Context::getContext()->link->getAdminLink('AdminAttributesGroups'),
|
||||
'desc' => $this->l('Back to list'),
|
||||
'icon' => 'process-icon-back'
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Attribute groups');
|
||||
$this->page_header_toolbar_btn['new_attribute_group'] = array(
|
||||
'href' => self::$currentIndex.'&addattribute_group&token='.$this->token,
|
||||
'desc' => $this->l('Add new attribute'),
|
||||
@@ -478,7 +472,7 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
||||
'desc' => $this->l('Add new value'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
@@ -544,7 +538,14 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
||||
break;
|
||||
|
||||
case 'view':
|
||||
$bread_extended[] = $this->attribute_name[$this->context->employee->id_lang];
|
||||
if (Tools::getIsset('viewattribute_group'))
|
||||
{
|
||||
if (($id = Tools::getValue('id_attribute_group')))
|
||||
if (Validate::isLoadedObject($obj = new AttributeGroup((int)$id)))
|
||||
$bread_extended[] = $obj->name[$this->context->employee->id_lang];
|
||||
}
|
||||
else
|
||||
$bread_extended[] = $this->attribute_name[$this->context->employee->id_lang];
|
||||
break;
|
||||
|
||||
case 'editAttributes':
|
||||
|
||||
@@ -59,12 +59,12 @@ class AdminCartRulesControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Cart rules');
|
||||
$this->page_header_toolbar_btn['new_cart_rule'] = array(
|
||||
'href' => self::$currentIndex.'&addcart_rule&token='.$this->token,
|
||||
'desc' => $this->l('Add new cart rule'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_cart_rule'] = array(
|
||||
'href' => self::$currentIndex.'&addcart_rule&token='.$this->token,
|
||||
'desc' => $this->l('Add new cart rule'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -96,12 +96,12 @@ class AdminCartsControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Carts');
|
||||
$this->page_header_toolbar_btn['export_cart'] = array(
|
||||
'href' => self::$currentIndex.'&exportcart&token='.$this->token,
|
||||
'desc' => $this->l('Export carts'),
|
||||
'icon' => 'process-icon-export'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['export_cart'] = array(
|
||||
'href' => self::$currentIndex.'&exportcart&token='.$this->token,
|
||||
'desc' => $this->l('Export carts'),
|
||||
'icon' => 'process-icon-export'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -160,12 +160,14 @@ class AdminCategoriesControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Categories');
|
||||
$this->page_header_toolbar_btn['new_category'] = array(
|
||||
'href' => self::$currentIndex.'&addcategory&token='.$this->token,
|
||||
'desc' => $this->l('Add new category'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
{
|
||||
$this->page_header_toolbar_btn['new_category'] = array(
|
||||
'href' => self::$currentIndex.'&addcategory&token='.$this->token,
|
||||
'desc' => $this->l('Add new category'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
}
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -118,17 +118,28 @@ class AdminCmsContentControllerCore extends AdminController
|
||||
if (!$id_cms_category)
|
||||
$id_cms_category = 1;
|
||||
|
||||
$this->page_header_toolbar_title = $this->l('CMS');
|
||||
$this->page_header_toolbar_btn['new_cms_category'] = array(
|
||||
'href' => self::$currentIndex.'&addcms_category&token='.$this->token,
|
||||
'desc' => $this->l('Add new CMS category'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
$this->page_header_toolbar_btn['new_cms_page'] = array(
|
||||
'href' => self::$currentIndex.'&addcms&id_cms_category='.$id_cms_category.'&token='.$this->token,
|
||||
'desc' => $this->l('Add new CMS page'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
$this->page_header_toolbar_title = 'CMS';
|
||||
|
||||
if ($this->display == 'list')
|
||||
{
|
||||
$this->page_header_toolbar_btn['new_cms_category'] = array(
|
||||
'href' => self::$currentIndex.'&addcms_category&token='.$this->token,
|
||||
'desc' => $this->l('Add new CMS category'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
$this->page_header_toolbar_btn['new_cms_page'] = array(
|
||||
'href' => self::$currentIndex.'&addcms&id_cms_category='.$id_cms_category.'&token='.$this->token,
|
||||
'desc' => $this->l('Add new CMS page'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->page_header_toolbar_btn['cancel'] = array(
|
||||
'href' => self::$currentIndex.'&token='.$this->token,
|
||||
'desc' => $this->l('Cancel')
|
||||
);
|
||||
}
|
||||
|
||||
if (is_array($this->page_header_toolbar_btn)
|
||||
&& $this->page_header_toolbar_btn instanceof Traversable
|
||||
|
||||
@@ -119,12 +119,12 @@ class AdminContactsControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Contacts');
|
||||
$this->page_header_toolbar_btn['new_contact'] = array(
|
||||
'href' => self::$currentIndex.'&addcontact&token='.$this->token,
|
||||
'desc' => $this->l('Add new contact'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if(empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_contact'] = array(
|
||||
'href' => self::$currentIndex.'&addcontact&token='.$this->token,
|
||||
'desc' => $this->l('Add new contact'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -341,5 +341,17 @@ class AdminCurrenciesControllerCore extends AdminController
|
||||
$this->errors[] = Tools::displayError('This currency already exists.');
|
||||
parent::initProcess();
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_currency'] = array(
|
||||
'href' => self::$currentIndex.'&addcurrency&token='.$this->token,
|
||||
'desc' => $this->l('Add new currency'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -190,12 +190,12 @@ class AdminCustomersControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Customers');
|
||||
$this->page_header_toolbar_btn['new_customer'] = array(
|
||||
'href' => self::$currentIndex.'&addcustomer&token='.$this->token,
|
||||
'desc' => $this->l('Add new customer'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_customer'] = array(
|
||||
'href' => self::$currentIndex.'&addcustomer&token='.$this->token,
|
||||
'desc' => $this->l('Add new customer'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -118,13 +118,16 @@ class AdminDeliverySlipControllerCore extends AdminController
|
||||
|
||||
public function initContent()
|
||||
{
|
||||
$this->content .= $this->renderForm().'<br />';
|
||||
$this->initPageHeaderToolbar();
|
||||
$this->show_toolbar = false;
|
||||
$this->content .= $this->renderForm();
|
||||
$this->content .= $this->renderOptions();
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,6 +181,7 @@ class AdminEmailsControllerCore extends AdminController
|
||||
{
|
||||
$this->initTabModuleList();
|
||||
$this->initToolbar();
|
||||
$this->initPageHeaderToolbar();
|
||||
$this->addToolBarModulesListButton();
|
||||
unset($this->toolbar_btn['save']);
|
||||
$back = $this->context->link->getAdminLink('AdminHome');
|
||||
@@ -195,6 +196,9 @@ class AdminEmailsControllerCore extends AdminController
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -140,6 +140,18 @@ class AdminEmployeesControllerCore extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_employee'] = array(
|
||||
'href' => self::$currentIndex.'&addemployee&token='.$this->token,
|
||||
'desc' => $this->l('Add new employee'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
public function renderList()
|
||||
{
|
||||
$this->_select = 'pl.`name` AS profile';
|
||||
|
||||
@@ -137,7 +137,6 @@ class AdminFeaturesControllerCore extends AdminController
|
||||
}
|
||||
|
||||
$this->feature_name = $obj->name;
|
||||
$this->toolbar_title = $this->feature_name;
|
||||
$this->fields_list = array(
|
||||
'id_feature_value' => array(
|
||||
'title' => $this->l('ID'),
|
||||
@@ -200,16 +199,7 @@ class AdminFeaturesControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
if ($this->display == 'view')
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->feature_name[$this->context->employee->id_lang];
|
||||
$this->page_header_toolbar_btn['back_to_list'] = array(
|
||||
'href' => Context::getContext()->link->getAdminLink('AdminFeatures'),
|
||||
'desc' => $this->l('Back to list'),
|
||||
'icon' => 'process-icon-back'
|
||||
);
|
||||
}
|
||||
else
|
||||
if (empty($this->display))
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Features');
|
||||
$this->page_header_toolbar_btn['new_feature'] = array(
|
||||
@@ -272,6 +262,27 @@ class AdminFeaturesControllerCore extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
public function initToolbarTitle()
|
||||
{
|
||||
$bread_extended = $this->breadcrumbs;
|
||||
|
||||
switch ($this->display)
|
||||
{
|
||||
case 'view':
|
||||
if (Tools::getIsset('viewfeature'))
|
||||
{
|
||||
if (($id = Tools::getValue('id_feature')))
|
||||
if (Validate::isLoadedObject($obj = new Feature((int)$id)))
|
||||
$bread_extended[] = $obj->name[$this->context->employee->id_lang];
|
||||
}
|
||||
else
|
||||
$bread_extended[] = $this->attribute_name[$this->context->employee->id_lang];
|
||||
break;
|
||||
}
|
||||
|
||||
$this->toolbar_title = $bread_extended;
|
||||
}
|
||||
|
||||
/**
|
||||
* AdminController::renderForm() override
|
||||
* @see AdminController::renderForm()
|
||||
@@ -349,6 +360,7 @@ class AdminFeaturesControllerCore extends AdminController
|
||||
{
|
||||
// toolbar (save, cancel, new, ..)
|
||||
$this->initToolbar();
|
||||
$this->initPageHeaderToolbar();
|
||||
if ($this->display == 'edit' || $this->display == 'add')
|
||||
{
|
||||
if (!$this->loadObject(true))
|
||||
@@ -382,6 +394,9 @@ class AdminFeaturesControllerCore extends AdminController
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -87,12 +87,12 @@ class AdminGendersControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Genders');
|
||||
$this->page_header_toolbar_btn['new_gender'] = array(
|
||||
'href' => self::$currentIndex.'&addgender&token='.$this->token,
|
||||
'desc' => $this->l('Add new gender'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if(empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_gender'] = array(
|
||||
'href' => self::$currentIndex.'&addgender&token='.$this->token,
|
||||
'desc' => $this->l('Add new gender'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -146,12 +146,12 @@ class AdminGroupsControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Groups');
|
||||
$this->page_header_toolbar_btn['new_group'] = array(
|
||||
'href' => self::$currentIndex.'&addgroup&token='.$this->token,
|
||||
'desc' => $this->l('Add new group'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_group'] = array(
|
||||
'href' => self::$currentIndex.'&addgroup&token='.$this->token,
|
||||
'desc' => $this->l('Add new group'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -648,7 +648,19 @@ class AdminImagesControllerCore extends AdminController
|
||||
'safe_mode' => Tools::getSafeModeStatus(),
|
||||
'link_ppreferences' => 'index.php?tab=AdminPPreferences&token='.Tools::getAdminTokenLite('AdminPPreferences').'#PS_LEGACY_IMAGES_on',
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_image_type'] = array(
|
||||
'href' => self::$currentIndex.'&addimage_type&token='.$this->token,
|
||||
'desc' => $this->l('Add new image type'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
/**
|
||||
* Move product images to the new filesystem
|
||||
|
||||
@@ -617,6 +617,7 @@ class AdminImportControllerCore extends AdminController
|
||||
{
|
||||
// toolbar (save, cancel, new, ..)
|
||||
$this->initToolbar();
|
||||
$this->initPageHeaderToolbar();
|
||||
if ($this->display == 'import')
|
||||
if (Tools::getValue('csv'))
|
||||
$this->content .= $this->renderView();
|
||||
@@ -631,6 +632,9 @@ class AdminImportControllerCore extends AdminController
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -40,6 +40,17 @@ class AdminInformationControllerCore extends AdminController
|
||||
parent::initContent();
|
||||
}
|
||||
|
||||
public function initToolbarTitle()
|
||||
{
|
||||
$this->toolbar_title = array_unique($this->breadcrumbs);
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
parent::initPageHeaderToolbar();
|
||||
unset($this->page_header_toolbar_btn['back']);
|
||||
}
|
||||
|
||||
public function renderView()
|
||||
{
|
||||
$this->initPageHeaderToolbar();
|
||||
@@ -77,12 +88,6 @@ class AdminInformationControllerCore extends AdminController
|
||||
return parent::renderView();
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Configuration information');
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
/**
|
||||
* get all tests
|
||||
*
|
||||
|
||||
@@ -121,6 +121,7 @@ class AdminInvoicesControllerCore extends AdminController
|
||||
);
|
||||
|
||||
$this->table = 'invoice_date';
|
||||
$this->show_toolbar = false;
|
||||
$this->toolbar_title = $this->l('Print PDF invoices');
|
||||
return parent::renderForm();
|
||||
}
|
||||
@@ -185,6 +186,7 @@ class AdminInvoicesControllerCore extends AdminController
|
||||
{
|
||||
$this->display = 'edit';
|
||||
$this->initToolbar();
|
||||
$this->initPageHeaderToolbar();
|
||||
$this->content .= $this->initFormByDate();
|
||||
$this->content .= $this->initFormByStatus();
|
||||
$this->table = 'invoice';
|
||||
@@ -192,7 +194,10 @@ class AdminInvoicesControllerCore extends AdminController
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -102,12 +102,12 @@ class AdminLanguagesControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Languages');
|
||||
$this->page_header_toolbar_btn['new_language'] = array(
|
||||
'href' => self::$currentIndex.'&addlang&token='.$this->token,
|
||||
'desc' => $this->l('Add new language'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_language'] = array(
|
||||
'href' => self::$currentIndex.'&addlang&token='.$this->token,
|
||||
'desc' => $this->l('Add new language'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -300,6 +300,9 @@ class AdminLocalizationControllerCore extends AdminController
|
||||
'localization_form' => $this->renderForm(),
|
||||
'localization_options' => $this->renderOptions(),
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -102,17 +102,33 @@ class AdminManufacturersControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Manufacturers');
|
||||
$this->page_header_toolbar_btn['new_manufacturer'] = array(
|
||||
'href' => self::$currentIndex.'&addmanufacturer&token='.$this->token,
|
||||
'desc' => $this->l('Add new manufacturer'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
$this->page_header_toolbar_btn['new_manufacturer_address'] = array(
|
||||
'href' => self::$currentIndex.'&addaddress&token='.$this->token,
|
||||
'desc' => $this->l('Add new manufacturer address'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
{
|
||||
$this->page_header_toolbar_btn['new_manufacturer'] = array(
|
||||
'href' => self::$currentIndex.'&addmanufacturer&token='.$this->token,
|
||||
'desc' => $this->l('Add new manufacturer'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
$this->page_header_toolbar_btn['new_manufacturer_address'] = array(
|
||||
'href' => self::$currentIndex.'&addaddress&token='.$this->token,
|
||||
'desc' => $this->l('Add new manufacturer address'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
}
|
||||
elseif ($this->display == 'editaddresses' || $this->display == 'addaddress') {
|
||||
// Default cancel button - like old back link
|
||||
if (!isset($this->no_back) || $this->no_back == false)
|
||||
{
|
||||
$back = Tools::safeOutput(Tools::getValue('back', ''));
|
||||
if (empty($back))
|
||||
$back = self::$currentIndex.'&token='.$this->token;
|
||||
|
||||
$this->page_header_toolbar_btn['cancel'] = array(
|
||||
'href' => $back,
|
||||
'desc' => $this->l('Cancel')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
@@ -652,6 +668,7 @@ class AdminManufacturersControllerCore extends AdminController
|
||||
{
|
||||
// toolbar (save, cancel, new, ..)
|
||||
$this->initToolbar();
|
||||
$this->initPageHeaderToolbar();
|
||||
if ($this->display == 'editaddresses' || $this->display == 'addaddress')
|
||||
$this->content .= $this->renderFormAddress();
|
||||
else if ($this->display == 'edit' || $this->display == 'add')
|
||||
@@ -676,6 +693,9 @@ class AdminManufacturersControllerCore extends AdminController
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,12 @@ class AdminMarketingControllerCore extends AdminController
|
||||
{
|
||||
$this->toolbar_title = array_unique($this->breadcrumbs);
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
parent::initPageHeaderToolbar();
|
||||
$this->page_header_toolbar_btn = array();
|
||||
}
|
||||
|
||||
public function initToolbar()
|
||||
{
|
||||
|
||||
@@ -227,6 +227,7 @@ class AdminModulesPositionsControllerCore extends AdminController
|
||||
public function initContent()
|
||||
{
|
||||
$this->addJS(__PS_BASE_URI__.'js/vendor/jquery.sortable.js');
|
||||
$this->initPageHeaderToolbar();
|
||||
|
||||
if (array_key_exists('addToHook', $_GET) || array_key_exists('editGraft', $_GET) || (Tools::isSubmit('submitAddToHook') && $this->errors))
|
||||
{
|
||||
@@ -237,7 +238,10 @@ class AdminModulesPositionsControllerCore extends AdminController
|
||||
$this->content .= $this->initMain();
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content
|
||||
'content' => $this->content,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -90,12 +90,12 @@ class AdminOrderMessageControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Order messages');
|
||||
$this->page_header_toolbar_btn['new_order_message'] = array(
|
||||
'href' => self::$currentIndex.'&addorder_message&token='.$this->token,
|
||||
'desc' => $this->l('Add new order message'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_order_message'] = array(
|
||||
'href' => self::$currentIndex.'&addorder_message&token='.$this->token,
|
||||
'desc' => $this->l('Add new order message'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -139,12 +139,12 @@ class AdminOrdersControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Orders');
|
||||
$this->page_header_toolbar_btn['new_order'] = array(
|
||||
'href' => self::$currentIndex.'&addorder&token='.$this->token,
|
||||
'desc' => $this->l('Add new order'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display) && Context::getContext()->shop->getContext() == Shop::CONTEXT_SHOP && isset($this->toolbar_btn['new']) && Shop::isFeatureActive())
|
||||
$this->page_header_toolbar_btn['new_order'] = array(
|
||||
'href' => self::$currentIndex.'&addorder&token='.$this->token,
|
||||
'desc' => $this->l('Add new order'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -84,6 +84,17 @@ class AdminPaymentControllerCore extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
public function initToolbarTitle()
|
||||
{
|
||||
$this->toolbar_title = array_unique($this->breadcrumbs);
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
parent::initPageHeaderToolbar();
|
||||
$this->page_header_toolbar_btn = array();
|
||||
}
|
||||
|
||||
public function postProcess()
|
||||
{
|
||||
if ($this->action)
|
||||
|
||||
@@ -496,12 +496,16 @@ class AdminPerformanceControllerCore extends AdminController
|
||||
public function initContent()
|
||||
{
|
||||
$this->initToolbar();
|
||||
$this->initPageHeaderToolbar();
|
||||
$this->display = '';
|
||||
$this->content .= $this->renderForm();
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -2433,12 +2433,12 @@ class AdminProductsControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Products');
|
||||
$this->page_header_toolbar_btn['new_product'] = array(
|
||||
'href' => self::$currentIndex.'&addproduct&token='.$this->token,
|
||||
'desc' => $this->l('Add new product'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_product'] = array(
|
||||
'href' => self::$currentIndex.'&addproduct&token='.$this->token,
|
||||
'desc' => $this->l('Add new product'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -99,12 +99,12 @@ class AdminProfilesControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Profiles');
|
||||
$this->page_header_toolbar_btn['new_profile'] = array(
|
||||
'href' => self::$currentIndex.'&addprofile&token='.$this->token,
|
||||
'desc' => $this->l('Add new profile'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_profile'] = array(
|
||||
'href' => self::$currentIndex.'&addprofile&token='.$this->token,
|
||||
'desc' => $this->l('Add new profile'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -117,12 +117,12 @@ class AdminQuickAccessesControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Quick access');
|
||||
$this->page_header_toolbar_btn['new_quick_access'] = array(
|
||||
'href' => self::$currentIndex.'&addquick_access&token='.$this->token,
|
||||
'desc' => $this->l('Add new quick access'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_quick_access'] = array(
|
||||
'href' => self::$currentIndex.'&addquick_access&token='.$this->token,
|
||||
'desc' => $this->l('Add new quick access'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -155,12 +155,12 @@ class AdminReferrersControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Referrers');
|
||||
$this->page_header_toolbar_btn['new_referrer'] = array(
|
||||
'href' => self::$currentIndex.'&addreferrer&token='.$this->token,
|
||||
'desc' => $this->l('Add new referrer'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if(empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_referrer'] = array(
|
||||
'href' => self::$currentIndex.'&addreferrer&token='.$this->token,
|
||||
'desc' => $this->l('Add new referrer'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -267,6 +267,7 @@ class AdminRequestSqlControllerCore extends AdminController
|
||||
{
|
||||
// toolbar (save, cancel, new, ..)
|
||||
$this->initToolbar();
|
||||
$this->initPageHeaderToolbar();
|
||||
if ($this->display == 'edit' || $this->display == 'add')
|
||||
{
|
||||
if (!$this->loadObject(true))
|
||||
@@ -291,10 +292,25 @@ class AdminRequestSqlControllerCore extends AdminController
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_request'] = array(
|
||||
'href' => self::$currentIndex.'&addrequest_sql&token='.$this->token,
|
||||
'desc' => $this->l('Add new SQL request'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
/**
|
||||
* Genrating a export file
|
||||
*/
|
||||
|
||||
@@ -116,12 +116,12 @@ class AdminScenesControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Scenes');
|
||||
$this->page_header_toolbar_btn['new_scene'] = array(
|
||||
'href' => self::$currentIndex.'&addscene&token='.$this->token,
|
||||
'desc' => $this->l('Add new scene'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_scene'] = array(
|
||||
'href' => self::$currentIndex.'&addscene&token='.$this->token,
|
||||
'desc' => $this->l('Add new scene'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -191,6 +191,18 @@ class AdminSearchConfControllerCore extends AdminController
|
||||
);
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_alias'] = array(
|
||||
'href' => self::$currentIndex.'&addalias&token='.$this->token,
|
||||
'desc' => $this->l('Add new alias'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
public function initProcess()
|
||||
{
|
||||
parent::initProcess();
|
||||
|
||||
@@ -80,12 +80,12 @@ class AdminSearchEnginesControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Search engines');
|
||||
$this->page_header_toolbar_btn['new_search_engine'] = array(
|
||||
'href' => self::$currentIndex.'&addsearch_engine&token='.$this->token,
|
||||
'desc' => $this->l('Add new search engine'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if(empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_search_engine'] = array(
|
||||
'href' => self::$currentIndex.'&addsearch_engine&token='.$this->token,
|
||||
'desc' => $this->l('Add new search engine'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -79,7 +79,6 @@ class AdminSlipControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Slips');
|
||||
$this->page_header_toolbar_btn['generate_pdf'] = array(
|
||||
'href' => self::$currentIndex.'&token='.$this->token,
|
||||
'desc' => $this->l('Generate PDF'),
|
||||
@@ -154,13 +153,17 @@ class AdminSlipControllerCore extends AdminController
|
||||
public function initContent()
|
||||
{
|
||||
$this->initToolbar();
|
||||
$this->initPageHeaderToolbar();
|
||||
$this->content .= $this->renderList();
|
||||
$this->content .= $this->renderForm();
|
||||
$this->content .= '<br>'.$this->renderOptions();
|
||||
$this->content .= $this->renderOptions();
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -118,12 +118,12 @@ class AdminSpecificPriceRuleControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Specific price rules');
|
||||
$this->page_header_toolbar_btn['new_specific_price_rule'] = array(
|
||||
'href' => self::$currentIndex.'&addspecific_price_rule&token='.$this->token,
|
||||
'desc' => $this->l('Add new specific rule'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_specific_price_rule'] = array(
|
||||
'href' => self::$currentIndex.'&addspecific_price_rule&token='.$this->token,
|
||||
'desc' => $this->l('Add new specific rule'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -109,12 +109,12 @@ class AdminStatesControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('States');
|
||||
$this->page_header_toolbar_btn['new_state'] = array(
|
||||
'href' => self::$currentIndex.'&addstate&token='.$this->token,
|
||||
'desc' => $this->l('Add new state'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_state'] = array(
|
||||
'href' => self::$currentIndex.'&addstate&token='.$this->token,
|
||||
'desc' => $this->l('Add new state'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ abstract class AdminStatsTabControllerCore extends AdminPreferencesControllerCor
|
||||
$this->initTabModuleList();
|
||||
$this->addToolBarModulesListButton();
|
||||
$this->toolbar_title = $this->l('Stats', 'AdminStatsTab');
|
||||
$this->initPageHeaderToolbar();
|
||||
if ($this->display == 'view')
|
||||
{
|
||||
// Some controllers use the view action without an object
|
||||
@@ -57,10 +58,19 @@ abstract class AdminStatsTabControllerCore extends AdminPreferencesControllerCor
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
parent::initPageHeaderToolbar();
|
||||
unset($this->page_header_toolbar_btn['back']);
|
||||
}
|
||||
|
||||
public function displayCalendar()
|
||||
{
|
||||
return AdminStatsTabController::displayCalendarForm(array(
|
||||
|
||||
@@ -195,18 +195,20 @@ class AdminStatusesControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('States');
|
||||
$this->page_header_toolbar_btn['new_order_state'] = array(
|
||||
'href' => self::$currentIndex.'&addorder_state&token='.$this->token,
|
||||
'desc' => $this->l('Add new order state'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
$this->page_header_toolbar_btn['new_order_return_state'] = array(
|
||||
'href' => self::$currentIndex.'&addorder_return_state&token='.$this->token,
|
||||
'desc' => $this->l('Add new order return state'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
if (empty($this->display))
|
||||
{
|
||||
$this->page_header_toolbar_btn['new_order_state'] = array(
|
||||
'href' => self::$currentIndex.'&addorder_state&token='.$this->token,
|
||||
'desc' => $this->l('Add new order state'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
$this->page_header_toolbar_btn['new_order_return_state'] = array(
|
||||
'href' => self::$currentIndex.'&addorder_return_state&token='.$this->token,
|
||||
'desc' => $this->l('Add new order return state'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
}
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
|
||||
@@ -78,8 +78,6 @@ class AdminStockManagementControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Stock management');
|
||||
|
||||
if ($this->display == 'details')
|
||||
$this->page_header_toolbar_btn['back_to_list'] = array(
|
||||
'href' => Context::getContext()->link->getAdminLink('AdminStockManagement'),
|
||||
@@ -1036,6 +1034,8 @@ class AdminStockManagementControllerCore extends AdminController
|
||||
|
||||
$helper = new HelperForm();
|
||||
|
||||
$this->initPageHeaderToolbar();
|
||||
|
||||
// Check if form template has been overriden
|
||||
if (file_exists($this->context->smarty->getTemplateDir(0).'/'.$this->tpl_folder.'form.tpl'))
|
||||
$helper->tpl = $this->tpl_folder.'form.tpl';
|
||||
@@ -1079,7 +1079,10 @@ class AdminStockManagementControllerCore extends AdminController
|
||||
$this->content .= $helper->generateForm($this->fields_form);
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content
|
||||
'content' => $this->content,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
else
|
||||
|
||||
@@ -129,6 +129,18 @@ class AdminStoresControllerCore extends AdminController
|
||||
unset($this->toolbar_btn['save']);
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_store'] = array(
|
||||
'href' => self::$currentIndex.'&addstore&token='.$this->token,
|
||||
'desc' => $this->l('Add new store'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
public function renderList()
|
||||
{
|
||||
// Set toolbar options
|
||||
|
||||
@@ -72,12 +72,12 @@ class AdminSuppliersControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Suppliers');
|
||||
$this->page_header_toolbar_btn['new_supplier'] = array(
|
||||
'href' => self::$currentIndex.'&addsupplier&token='.$this->token,
|
||||
'desc' => $this->l('Add new supplier'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_supplier'] = array(
|
||||
'href' => self::$currentIndex.'&addsupplier&token='.$this->token,
|
||||
'desc' => $this->l('Add new supplier'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -149,15 +149,13 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Supply orders');
|
||||
|
||||
if ($this->display == 'details')
|
||||
$this->page_header_toolbar_btn['back'] = array(
|
||||
'href' => Context::getContext()->link->getAdminLink('AdminSupplyOrders'),
|
||||
'desc' => $this->l('Back to list'),
|
||||
'icon' => 'process-icon-back'
|
||||
);
|
||||
else
|
||||
elseif (empty($this->display))
|
||||
{
|
||||
$this->page_header_toolbar_btn['new_supply_order'] = array(
|
||||
'href' => self::$currentIndex.'&addsupply_order&token='.$this->token,
|
||||
@@ -575,6 +573,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
||||
$this->display = 'update_order_state';
|
||||
// overrides parent::initContent();
|
||||
$this->initToolbar();
|
||||
$this->initPageHeaderToolbar();
|
||||
|
||||
// given the current state, loads available states
|
||||
$states = SupplyOrderState::getSupplyOrderStates($supply_order->id_supply_order_state);
|
||||
@@ -636,7 +635,10 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $content,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
@@ -719,6 +721,8 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
||||
if (!Validate::isLoadedObject($supply_order))
|
||||
return parent::initContent();
|
||||
|
||||
$this->initPageHeaderToolbar();
|
||||
|
||||
// re-defines fields_list
|
||||
$this->fields_list = array(
|
||||
'supplier_reference' => array(
|
||||
@@ -855,7 +859,10 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
||||
|
||||
// assigns var
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $content,
|
||||
'content' => $content,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ class AdminTabsControllerCore extends AdminController
|
||||
'desc' => $this->l('Back to list'),
|
||||
'icon' => 'process-icon-back'
|
||||
);
|
||||
else
|
||||
elseif(empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_menu'] = array(
|
||||
'href' => self::$currentIndex.'&addtab&token='.$this->token,
|
||||
'desc' => $this->l('Add new menu'),
|
||||
|
||||
@@ -68,12 +68,12 @@ class AdminTagsControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Tags');
|
||||
$this->page_header_toolbar_btn['new_tag'] = array(
|
||||
'href' => self::$currentIndex.'&addtag&token='.$this->token,
|
||||
'desc' => $this->l('Add new tag'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_tag'] = array(
|
||||
'href' => self::$currentIndex.'&addtag&token='.$this->token,
|
||||
'desc' => $this->l('Add new tag'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -108,6 +108,18 @@ class AdminTaxesControllerCore extends AdminController
|
||||
$this->_where .= ' AND a.deleted = 0';
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_tax'] = array(
|
||||
'href' => self::$currentIndex.'&addtax&token='.$this->token,
|
||||
'desc' => $this->l('Add new tax'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
/**
|
||||
* Display delete action link
|
||||
*/
|
||||
|
||||
@@ -396,6 +396,18 @@ class AdminThemesControllerCore extends AdminController
|
||||
return parent::processDelete();
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_theme'] = array(
|
||||
'href' => self::$currentIndex.'&addtheme&token='.$this->token,
|
||||
'desc' => $this->l('Add new theme'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
public function initContent()
|
||||
{
|
||||
|
||||
@@ -434,8 +446,10 @@ class AdminThemesControllerCore extends AdminController
|
||||
public function ajaxProcessGetAddonsThemes()
|
||||
{
|
||||
// notice : readfile should be replaced by something else
|
||||
if (@fsockopen('addons.prestashop.com', 80, $errno, $errst, 3))
|
||||
@readfile('http://addons.prestashop.com/adminthemes.php?lang='.$this->context->language->iso_code);
|
||||
/*if (@fsockopen('addons.prestashop.com', 80, $errno, $errst, 3))
|
||||
@readfile('http://addons.prestashop.com/adminthemes.php?lang='.$this->context->language->iso_code);*/
|
||||
|
||||
die(Tools::file_get_contents('http://addons.prestashop.com/adminthemes.php?lang='.$this->context->language->iso_code));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -53,6 +53,8 @@ class AdminTrackingControllerCore extends AdminController
|
||||
|
||||
public function initContent()
|
||||
{
|
||||
$this->initPageHeaderToolbar();
|
||||
|
||||
if ($id_category = Tools::getValue('id_category') && Tools::getIsset('viewcategory'))
|
||||
Tools::redirectAdmin($this->context->link->getAdminLink('AdminProducts').'&id_category='.(int)$id_category.'&viewcategory');
|
||||
|
||||
@@ -72,15 +74,12 @@ class AdminTrackingControllerCore extends AdminController
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Monitoring');
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
public function getCustomListCategoriesEmpty()
|
||||
{
|
||||
$this->table = 'category';
|
||||
|
||||
@@ -98,6 +98,8 @@ class AdminTranslationsControllerCore extends AdminController
|
||||
*/
|
||||
public function initContent()
|
||||
{
|
||||
$this->initPageHeaderToolbar();
|
||||
|
||||
if (!is_null($this->type_selected))
|
||||
{
|
||||
$method_name = 'initForm'.$this->type_selected;
|
||||
@@ -112,7 +114,11 @@ class AdminTranslationsControllerCore extends AdminController
|
||||
else
|
||||
$this->content = $this->initMain();
|
||||
|
||||
$this->context->smarty->assign(array('content' => $this->content));
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -72,12 +72,12 @@ class AdminWarehousesControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Warehouses');
|
||||
$this->page_header_toolbar_btn['new_warehouse'] = array(
|
||||
'href' => self::$currentIndex.'&addwarehouse&token='.$this->token,
|
||||
'desc' => $this->l('Add new warehouse'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if(empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_warehouse'] = array(
|
||||
'href' => self::$currentIndex.'&addwarehouse&token='.$this->token,
|
||||
'desc' => $this->l('Add new warehouse'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -92,6 +92,19 @@ class AdminWebserviceControllerCore extends AdminController
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_webservice'] = array(
|
||||
'href' => self::$currentIndex.'&addwebservice_account&token='.$this->token,
|
||||
'desc' => $this->l('Add new webservice'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
|
||||
protected function processUpdateOptions()
|
||||
{
|
||||
parent::processUpdateOptions();
|
||||
|
||||
@@ -64,12 +64,12 @@ class AdminZonesControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Zones');
|
||||
$this->page_header_toolbar_btn['new_zone'] = array(
|
||||
'href' => self::$currentIndex.'&addzone&token='.$this->token,
|
||||
'desc' => $this->l('Add new zone'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_zone'] = array(
|
||||
'href' => self::$currentIndex.'&addzone&token='.$this->token,
|
||||
'desc' => $this->l('Add new zone'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user