// Toolbar modifs
This commit is contained in:
1 parent
b7e13e2e7f
commit
d88857610d
78 files changed
+871
-626
No files matched your search
@@ -25,7 +25,7 @@
|
|||||||
<div id="ajax_confirmation" class="alert alert-success" style="display:none"></div>
|
<div id="ajax_confirmation" class="alert alert-success" style="display:none"></div>
|
||||||
{* ajaxBox allows*} <div id="ajaxBox" style="display:none"></div>
|
{* ajaxBox allows*} <div id="ajaxBox" style="display:none"></div>
|
||||||
{if isset($content)}
|
{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">
|
<div class="leadin">
|
||||||
{foreach from=$page_header_toolbar_btn item=btn key=k}
|
{foreach from=$page_header_toolbar_btn item=btn key=k}
|
||||||
{if $k == 'modules-list'}
|
{if $k == 'modules-list'}
|
||||||
|
|||||||
@@ -22,6 +22,33 @@
|
|||||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
* International Registered Trademark & Property of PrestaShop SA
|
* 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>
|
<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>
|
<div class="clear"> </div>
|
||||||
|
|
||||||
@@ -1,45 +1,37 @@
|
|||||||
<div class="row">
|
<div class="productTabs">
|
||||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
<ul class="tab nav nav-tabs">
|
||||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
<li class="tab-row">
|
||||||
</div>
|
<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">
|
||||||
<div class="row">
|
<a class="tab-page" id="cart_rule_link_conditions" href="javascript:displayCartRuleTab('conditions');"><i class="icon-random"></i> {l s='Conditions'}</a>
|
||||||
<div class="productTabs">
|
</li>
|
||||||
<ul class="tab nav nav-tabs">
|
<li class="tab-row">
|
||||||
<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>
|
||||||
<a class="tab-page" id="cart_rule_link_informations" href="javascript:displayCartRuleTab('informations');"><i class="icon-info"></i> {l s='Information'}</a>
|
</li>
|
||||||
</li>
|
</ul>
|
||||||
<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>
|
</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">
|
<script type="text/javascript">
|
||||||
var product_rule_groups_counter = {if isset($product_rule_groups_counter)}{$product_rule_groups_counter|intval}{else}0{/if};
|
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>
|
||||||
<script type="text/javascript" src="../js/sendMailTest.js"></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"}
|
{extends file="helpers/options/options.tpl"}
|
||||||
{block name="field"}
|
{block name="field"}
|
||||||
{if $field['type'] == 'checkbox_table'}
|
{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">
|
<table class="table" cellspacing="0">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -44,8 +45,6 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="clear"></div>
|
|
||||||
<br />
|
|
||||||
{else}
|
{else}
|
||||||
{$smarty.block.parent}
|
{$smarty.block.parent}
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -22,8 +22,32 @@
|
|||||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*}
|
*}
|
||||||
|
{if isset($content)}
|
||||||
{$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)}
|
{if isset($display_regenerate)}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
* International Registered Trademark & Property of PrestaShop SA
|
* 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>
|
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||||
{if $module_confirmation}
|
{if $module_confirmation}
|
||||||
<div class="module_confirmation conf confirm">
|
<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}
|
{$modules_list}
|
||||||
@@ -23,7 +23,6 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* 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>
|
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||||
|
|
||||||
<form action="{$url_submit}" id="{$table}_form" method="post" class="form-horizontal">
|
<form action="{$url_submit}" id="{$table}_form" method="post" class="form-horizontal">
|
||||||
|
|||||||
@@ -28,7 +28,6 @@
|
|||||||
var come_from = 'AdminModulesPositions';
|
var come_from = 'AdminModulesPositions';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
|
||||||
<div>{block name="leadin"}{/block}</div>
|
<div>{block name="leadin"}{/block}</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|||||||
@@ -976,7 +976,6 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
|
||||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||||
|
|
||||||
<form action="" method="" class="form-horizontal">
|
<form action="" method="" class="form-horizontal">
|
||||||
|
|||||||
@@ -23,7 +23,35 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* 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">
|
<form action="{$action_fees}" id="fees" name="fees" method="post" class="form-horizontal">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
|
|||||||
@@ -23,8 +23,28 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*}
|
*}
|
||||||
|
|
||||||
{if $toolbar_btn}
|
{if isset($show_page_header_toolbar) && $show_page_header_toolbar &&(!isset($lite_display) || !$lite_display)}
|
||||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
<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}
|
{/if}
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|||||||
@@ -52,16 +52,23 @@
|
|||||||
{block name="after"}
|
{block name="after"}
|
||||||
<fieldset id="prestastore-content"></fieldset>
|
<fieldset id="prestastore-content"></fieldset>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$.post(
|
$.ajax({
|
||||||
"ajax-tab.php",
|
type: 'POST',
|
||||||
{
|
headers: { "cache-control": "no-cache" },
|
||||||
|
url: 'ajax-tab.php?rand=' + new Date().getTime(),
|
||||||
|
async: true,
|
||||||
|
cache: false,
|
||||||
|
dataType : "html",
|
||||||
|
data: {
|
||||||
tab: 'AdminThemes',
|
tab: 'AdminThemes',
|
||||||
token: '{$token}',
|
token: '{$token}',
|
||||||
ajax: '1',
|
ajax: '1',
|
||||||
action:'getAddonsThemes',
|
action:'getAddonsThemes',
|
||||||
page:'themes'
|
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>
|
</script>
|
||||||
{/block}
|
{/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)
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
* International Registered Trademark & Property of PrestaShop SA
|
* 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}
|
{if isset($fields.title)}<h3>{$fields.title}</h3>{/if}
|
||||||
|
|
||||||
{block name="defaultForm"}
|
{block name="defaultForm"}
|
||||||
@@ -82,7 +76,7 @@
|
|||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block name="field"}
|
{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"}
|
{block name="input"}
|
||||||
{if $input.type == 'text' || $input.type == 'tags'}
|
{if $input.type == 'text' || $input.type == 'tags'}
|
||||||
{if isset($input.lang) AND $input.lang}
|
{if isset($input.lang) AND $input.lang}
|
||||||
@@ -639,6 +633,9 @@
|
|||||||
<!-- {*if $required_fields}
|
<!-- {*if $required_fields}
|
||||||
<div class="small"><sup>*</sup> {l s='Required field'}</div>
|
<div class="small"><sup>*</sup> {l s='Required field'}</div>
|
||||||
{/if*} -->
|
{/if*} -->
|
||||||
|
{block name="footer"}
|
||||||
|
{include file="footer_toolbar.tpl"}
|
||||||
|
{/block}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
{/block}
|
{/block}
|
||||||
{block name="other_fieldsets"}{/block}
|
{block name="other_fieldsets"}{/block}
|
||||||
|
|||||||
@@ -57,25 +57,6 @@
|
|||||||
{if !$simple_header}
|
{if !$simple_header}
|
||||||
<div class="leadin">
|
<div class="leadin">
|
||||||
{block name="leadin"}{/block}
|
{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>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
@@ -100,28 +81,14 @@
|
|||||||
{if isset($toolbar_btn) && count($toolbar_btn) >0}
|
{if isset($toolbar_btn) && count($toolbar_btn) >0}
|
||||||
<span class="panel-heading-action">
|
<span class="panel-heading-action">
|
||||||
{foreach from=$toolbar_btn item=btn key=k}
|
{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}>
|
{if $k != 'modules-list'}
|
||||||
<label>
|
<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}>
|
||||||
<span title="" data-toggle="tooltip" class="label-tooltip" data-original-title="{l s=$btn.desc}" data-html="true">
|
<label>
|
||||||
<i class="process-icon-{if isset($btn.imgclass)}{$btn.imgclass}{else}{$k}{/if} {if isset($btn.class)}{$btn.class}{/if}" ></i>
|
<span title="" data-toggle="tooltip" class="label-tooltip" data-original-title="{l s=$btn.desc}" data-html="true">
|
||||||
</span>
|
<i class="process-icon-{if isset($btn.imgclass)}{$btn.imgclass}{else}{$k}{/if} {if isset($btn.class)}{$btn.class}{/if}" ></i>
|
||||||
</label>
|
</span>
|
||||||
</a>
|
</label>
|
||||||
{if $k == 'modules-list'}
|
</a>
|
||||||
<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}
|
{/if}
|
||||||
{/foreach}
|
{/foreach}
|
||||||
<a id="desc-{$table}-refresh" class="list-tooolbar-btn" href="javascript:location.reload();">
|
<a id="desc-{$table}-refresh" class="list-tooolbar-btn" href="javascript:location.reload();">
|
||||||
@@ -137,7 +104,7 @@
|
|||||||
<script language="javascript" type="text/javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
var submited = false
|
var submited = false
|
||||||
var modules_list_loaded = false;
|
|
||||||
$(function() {
|
$(function() {
|
||||||
//get reference on save link
|
//get reference on save link
|
||||||
btn_save = $('i[class~="process-icon-save"]').parent();
|
btn_save = $('i[class~="process-icon-save"]').parent();
|
||||||
@@ -205,52 +172,10 @@
|
|||||||
}
|
}
|
||||||
{/block}
|
{/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>
|
</script>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{if $simple_header}
|
{if $simple_header}
|
||||||
|
|||||||
@@ -23,10 +23,7 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*}
|
*}
|
||||||
|
|
||||||
{if $show_toolbar}
|
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||||
{include file="toolbar.tpl" toolbar_btn=$toolbar_btn toolbar_scroll=$toolbar_scroll title=$title}
|
|
||||||
<div class="leadin">{block name="leadin"}{/block}</div>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
id_language = Number({$current_id_lang});
|
id_language = Number({$current_id_lang});
|
||||||
@@ -380,6 +377,9 @@
|
|||||||
<div class="small"><sup>*</sup> {l s='Required field'}</div>
|
<div class="small"><sup>*</sup> {l s='Required field'}</div>
|
||||||
{/if*} -->
|
{/if*} -->
|
||||||
{if isset($categoryData['bottom'])}{$categoryData['bottom']}{/if}
|
{if isset($categoryData['bottom'])}{$categoryData['bottom']}{/if}
|
||||||
|
{block name="footer"}
|
||||||
|
{include file="footer_toolbar.tpl"}
|
||||||
|
{/block}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
{hook h='displayAdminOptions'}
|
{hook h='displayAdminOptions'}
|
||||||
|
|||||||
@@ -23,10 +23,6 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* 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>
|
<div class="leadin">{block name="leadin"}{/block}</div>
|
||||||
|
|
||||||
{block name="override_tpl"}{/block}
|
{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);
|
$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)
|
if (is_array($this->page_header_toolbar_btn)
|
||||||
&& $this->page_header_toolbar_btn instanceof Traversable
|
&& $this->page_header_toolbar_btn instanceof Traversable
|
||||||
|| trim($title) != '')
|
|| trim($title) != '')
|
||||||
$this->show_page_header_toolbar = true;
|
$this->show_page_header_toolbar = true;
|
||||||
|
|
||||||
$this->context->smarty->assign(array(
|
$this->page_header_toolbar_title = $title;
|
||||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
|
||||||
'page_header_toolbar_title' => $title,
|
|
||||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
|
||||||
));
|
|
||||||
|
|
||||||
$this->addPageHeaderToolBarModulesListButton();
|
$this->addPageHeaderToolBarModulesListButton();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1149,7 +1175,17 @@ class AdminControllerCore extends Controller
|
|||||||
'href' => '#',
|
'href' => '#',
|
||||||
'desc' => $this->l('Save')
|
'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':
|
case 'view':
|
||||||
// Default cancel button - like old back link
|
// Default cancel button - like old back link
|
||||||
$back = Tools::safeOutput(Tools::getValue('back', ''));
|
$back = Tools::safeOutput(Tools::getValue('back', ''));
|
||||||
@@ -1545,9 +1581,11 @@ class AdminControllerCore extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->getLanguages();
|
$this->getLanguages();
|
||||||
// toolbar (save, cancel, new, ..)
|
// toolbar (save, cancel, new, ..)
|
||||||
$this->initToolbar();
|
$this->initToolbar();
|
||||||
$this->initTabModuleList();
|
$this->initTabModuleList();
|
||||||
|
$this->initPageHeaderToolbar();
|
||||||
|
|
||||||
if ($this->display == 'edit' || $this->display == 'add')
|
if ($this->display == 'edit' || $this->display == 'add')
|
||||||
{
|
{
|
||||||
if (!$this->loadObject(true))
|
if (!$this->loadObject(true))
|
||||||
@@ -1580,7 +1618,11 @@ class AdminControllerCore extends Controller
|
|||||||
|
|
||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'content' => $this->content,
|
'content' => $this->content,
|
||||||
|
'lite_display' => $this->lite_display,
|
||||||
'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
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1695,8 +1737,6 @@ class AdminControllerCore extends Controller
|
|||||||
*/
|
*/
|
||||||
public function renderList()
|
public function renderList()
|
||||||
{
|
{
|
||||||
$this->initPageHeaderToolbar();
|
|
||||||
|
|
||||||
if (!($this->fields_list && is_array($this->fields_list)))
|
if (!($this->fields_list && is_array($this->fields_list)))
|
||||||
return false;
|
return false;
|
||||||
$this->getList($this->context->language->id);
|
$this->getList($this->context->language->id);
|
||||||
@@ -2114,9 +2154,9 @@ class AdminControllerCore extends Controller
|
|||||||
else
|
else
|
||||||
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
$this->errors[] = Tools::displayError('You do not have permission to edit this.');
|
||||||
}
|
}
|
||||||
elseif (Tools::getValue('submitAdd'.$this->table)
|
elseif (Tools::isSubmit('submitAdd'.$this->table)
|
||||||
|| Tools::getValue('submitAdd'.$this->table.'AndStay')
|
|| Tools::isSubmit('submitAdd'.$this->table.'AndStay')
|
||||||
|| Tools::getValue('submitAdd'.$this->table.'AndPreview'))
|
|| Tools::isSubmit('submitAdd'.$this->table.'AndPreview'))
|
||||||
{
|
{
|
||||||
// case 1: updating existing entry
|
// case 1: updating existing entry
|
||||||
if ($this->id_object)
|
if ($this->id_object)
|
||||||
@@ -2124,7 +2164,7 @@ class AdminControllerCore extends Controller
|
|||||||
if ($this->tabAccess['edit'] === '1')
|
if ($this->tabAccess['edit'] === '1')
|
||||||
{
|
{
|
||||||
$this->action = 'save';
|
$this->action = 'save';
|
||||||
if (Tools::getValue('submitAdd'.$this->table.'AndStay'))
|
if (Tools::isSubmit('submitAdd'.$this->table.'AndStay'))
|
||||||
$this->display = 'edit';
|
$this->display = 'edit';
|
||||||
else
|
else
|
||||||
$this->display = 'list';
|
$this->display = 'list';
|
||||||
@@ -2138,7 +2178,7 @@ class AdminControllerCore extends Controller
|
|||||||
if ($this->tabAccess['add'] === '1')
|
if ($this->tabAccess['add'] === '1')
|
||||||
{
|
{
|
||||||
$this->action = 'save';
|
$this->action = 'save';
|
||||||
if (Tools::getValue('submitAdd'.$this->table.'AndStay'))
|
if (Tools::isSubmit('submitAdd'.$this->table.'AndStay'))
|
||||||
$this->display = 'edit';
|
$this->display = 'edit';
|
||||||
else
|
else
|
||||||
$this->display = 'list';
|
$this->display = 'list';
|
||||||
|
|||||||
@@ -45,12 +45,6 @@ class AdminAccessControllerCore extends AdminController
|
|||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function initPageHeaderToolbar()
|
|
||||||
{
|
|
||||||
$this->page_header_toolbar_title = $this->l('Permissions');
|
|
||||||
parent::initPageHeaderToolbar();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AdminController::renderForm() override
|
* AdminController::renderForm() override
|
||||||
* @see AdminController::renderForm()
|
* @see AdminController::renderForm()
|
||||||
@@ -131,9 +125,23 @@ class AdminAccessControllerCore extends AdminController
|
|||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'content' => $this->content,
|
'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 initToolbarTitle()
|
||||||
|
{
|
||||||
|
$this->toolbar_title = array_unique($this->breadcrumbs);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function initPageHeaderToolbar()
|
||||||
|
{
|
||||||
|
parent::initPageHeaderToolbar();
|
||||||
|
unset($this->page_header_toolbar_btn['cancel']);
|
||||||
|
}
|
||||||
|
|
||||||
public function ajaxProcessUpdateAccess()
|
public function ajaxProcessUpdateAccess()
|
||||||
{
|
{
|
||||||
if (_PS_MODE_DEMO_)
|
if (_PS_MODE_DEMO_)
|
||||||
|
|||||||
@@ -26,9 +26,22 @@
|
|||||||
|
|
||||||
class AdminAddonsCatalogControllerCore extends AdminController
|
class AdminAddonsCatalogControllerCore extends AdminController
|
||||||
{
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->bootstrap = true;
|
||||||
|
parent::__construct();
|
||||||
|
}
|
||||||
|
|
||||||
public function initContent()
|
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();
|
parent::initContent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,12 +85,12 @@ class AdminAddressesControllerCore extends AdminController
|
|||||||
|
|
||||||
public function initPageHeaderToolbar()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('Addresses');
|
if (empty($this->display))
|
||||||
$this->page_header_toolbar_btn['new_address'] = array(
|
$this->page_header_toolbar_btn['new_address'] = array(
|
||||||
'href' => self::$currentIndex.'&addaddress&token='.$this->token,
|
'href' => self::$currentIndex.'&addaddress&token='.$this->token,
|
||||||
'desc' => $this->l('Add new address'),
|
'desc' => $this->l('Add new address'),
|
||||||
'icon' => 'process-icon-new'
|
'icon' => 'process-icon-new'
|
||||||
);
|
);
|
||||||
|
|
||||||
parent::initPageHeaderToolbar();
|
parent::initPageHeaderToolbar();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,12 +58,12 @@ class AdminAttachmentsControllerCore extends AdminController
|
|||||||
|
|
||||||
public function initPageHeaderToolbar()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('Attachments');
|
if (empty($this->display))
|
||||||
$this->page_header_toolbar_btn['new_attachment'] = array(
|
$this->page_header_toolbar_btn['new_attachment'] = array(
|
||||||
'href' => self::$currentIndex.'&addattachment&token='.$this->token,
|
'href' => self::$currentIndex.'&addattachment&token='.$this->token,
|
||||||
'desc' => $this->l('Add new attachment'),
|
'desc' => $this->l('Add new attachment'),
|
||||||
'icon' => 'process-icon-new'
|
'icon' => 'process-icon-new'
|
||||||
);
|
);
|
||||||
|
|
||||||
parent::initPageHeaderToolbar();
|
parent::initPageHeaderToolbar();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -424,6 +424,7 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
|||||||
|
|
||||||
// toolbar (save, cancel, new, ..)
|
// toolbar (save, cancel, new, ..)
|
||||||
$this->initToolbar();
|
$this->initToolbar();
|
||||||
|
$this->initPageHeaderToolbar();
|
||||||
if ($this->display == 'edit' || $this->display == 'add')
|
if ($this->display == 'edit' || $this->display == 'add')
|
||||||
{
|
{
|
||||||
if (!($this->object = $this->loadObject(true)))
|
if (!($this->object = $this->loadObject(true)))
|
||||||
@@ -451,23 +452,16 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
|||||||
'token' => $this->token,
|
'token' => $this->token,
|
||||||
'content' => $this->content,
|
'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()
|
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(
|
$this->page_header_toolbar_btn['new_attribute_group'] = array(
|
||||||
'href' => self::$currentIndex.'&addattribute_group&token='.$this->token,
|
'href' => self::$currentIndex.'&addattribute_group&token='.$this->token,
|
||||||
'desc' => $this->l('Add new attribute'),
|
'desc' => $this->l('Add new attribute'),
|
||||||
@@ -478,7 +472,7 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
|||||||
'desc' => $this->l('Add new value'),
|
'desc' => $this->l('Add new value'),
|
||||||
'icon' => 'process-icon-new'
|
'icon' => 'process-icon-new'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
parent::initPageHeaderToolbar();
|
parent::initPageHeaderToolbar();
|
||||||
}
|
}
|
||||||
@@ -544,7 +538,14 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'view':
|
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;
|
break;
|
||||||
|
|
||||||
case 'editAttributes':
|
case 'editAttributes':
|
||||||
|
|||||||
@@ -59,12 +59,12 @@ class AdminCartRulesControllerCore extends AdminController
|
|||||||
|
|
||||||
public function initPageHeaderToolbar()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('Cart rules');
|
if (empty($this->display))
|
||||||
$this->page_header_toolbar_btn['new_cart_rule'] = array(
|
$this->page_header_toolbar_btn['new_cart_rule'] = array(
|
||||||
'href' => self::$currentIndex.'&addcart_rule&token='.$this->token,
|
'href' => self::$currentIndex.'&addcart_rule&token='.$this->token,
|
||||||
'desc' => $this->l('Add new cart rule'),
|
'desc' => $this->l('Add new cart rule'),
|
||||||
'icon' => 'process-icon-new'
|
'icon' => 'process-icon-new'
|
||||||
);
|
);
|
||||||
|
|
||||||
parent::initPageHeaderToolbar();
|
parent::initPageHeaderToolbar();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,12 +96,12 @@ class AdminCartsControllerCore extends AdminController
|
|||||||
|
|
||||||
public function initPageHeaderToolbar()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('Carts');
|
if (empty($this->display))
|
||||||
$this->page_header_toolbar_btn['export_cart'] = array(
|
$this->page_header_toolbar_btn['export_cart'] = array(
|
||||||
'href' => self::$currentIndex.'&exportcart&token='.$this->token,
|
'href' => self::$currentIndex.'&exportcart&token='.$this->token,
|
||||||
'desc' => $this->l('Export carts'),
|
'desc' => $this->l('Export carts'),
|
||||||
'icon' => 'process-icon-export'
|
'icon' => 'process-icon-export'
|
||||||
);
|
);
|
||||||
|
|
||||||
parent::initPageHeaderToolbar();
|
parent::initPageHeaderToolbar();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -160,12 +160,14 @@ class AdminCategoriesControllerCore extends AdminController
|
|||||||
|
|
||||||
public function initPageHeaderToolbar()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('Categories');
|
if (empty($this->display))
|
||||||
$this->page_header_toolbar_btn['new_category'] = array(
|
{
|
||||||
'href' => self::$currentIndex.'&addcategory&token='.$this->token,
|
$this->page_header_toolbar_btn['new_category'] = array(
|
||||||
'desc' => $this->l('Add new category'),
|
'href' => self::$currentIndex.'&addcategory&token='.$this->token,
|
||||||
'icon' => 'process-icon-new'
|
'desc' => $this->l('Add new category'),
|
||||||
);
|
'icon' => 'process-icon-new'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
parent::initPageHeaderToolbar();
|
parent::initPageHeaderToolbar();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,17 +118,28 @@ class AdminCmsContentControllerCore extends AdminController
|
|||||||
if (!$id_cms_category)
|
if (!$id_cms_category)
|
||||||
$id_cms_category = 1;
|
$id_cms_category = 1;
|
||||||
|
|
||||||
$this->page_header_toolbar_title = $this->l('CMS');
|
$this->page_header_toolbar_title = 'CMS';
|
||||||
$this->page_header_toolbar_btn['new_cms_category'] = array(
|
|
||||||
'href' => self::$currentIndex.'&addcms_category&token='.$this->token,
|
if ($this->display == 'list')
|
||||||
'desc' => $this->l('Add new CMS category'),
|
{
|
||||||
'icon' => 'process-icon-new'
|
$this->page_header_toolbar_btn['new_cms_category'] = array(
|
||||||
);
|
'href' => self::$currentIndex.'&addcms_category&token='.$this->token,
|
||||||
$this->page_header_toolbar_btn['new_cms_page'] = array(
|
'desc' => $this->l('Add new CMS category'),
|
||||||
'href' => self::$currentIndex.'&addcms&id_cms_category='.$id_cms_category.'&token='.$this->token,
|
'icon' => 'process-icon-new'
|
||||||
'desc' => $this->l('Add new CMS page'),
|
);
|
||||||
'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)
|
if (is_array($this->page_header_toolbar_btn)
|
||||||
&& $this->page_header_toolbar_btn instanceof Traversable
|
&& $this->page_header_toolbar_btn instanceof Traversable
|
||||||
|
|||||||
@@ -119,12 +119,12 @@ class AdminContactsControllerCore extends AdminController
|
|||||||
|
|
||||||
public function initPageHeaderToolbar()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('Contacts');
|
if(empty($this->display))
|
||||||
$this->page_header_toolbar_btn['new_contact'] = array(
|
$this->page_header_toolbar_btn['new_contact'] = array(
|
||||||
'href' => self::$currentIndex.'&addcontact&token='.$this->token,
|
'href' => self::$currentIndex.'&addcontact&token='.$this->token,
|
||||||
'desc' => $this->l('Add new contact'),
|
'desc' => $this->l('Add new contact'),
|
||||||
'icon' => 'process-icon-new'
|
'icon' => 'process-icon-new'
|
||||||
);
|
);
|
||||||
|
|
||||||
parent::initPageHeaderToolbar();
|
parent::initPageHeaderToolbar();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -341,5 +341,17 @@ class AdminCurrenciesControllerCore extends AdminController
|
|||||||
$this->errors[] = Tools::displayError('This currency already exists.');
|
$this->errors[] = Tools::displayError('This currency already exists.');
|
||||||
parent::initProcess();
|
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()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('Customers');
|
if (empty($this->display))
|
||||||
$this->page_header_toolbar_btn['new_customer'] = array(
|
$this->page_header_toolbar_btn['new_customer'] = array(
|
||||||
'href' => self::$currentIndex.'&addcustomer&token='.$this->token,
|
'href' => self::$currentIndex.'&addcustomer&token='.$this->token,
|
||||||
'desc' => $this->l('Add new customer'),
|
'desc' => $this->l('Add new customer'),
|
||||||
'icon' => 'process-icon-new'
|
'icon' => 'process-icon-new'
|
||||||
);
|
);
|
||||||
|
|
||||||
parent::initPageHeaderToolbar();
|
parent::initPageHeaderToolbar();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,13 +118,16 @@ class AdminDeliverySlipControllerCore extends AdminController
|
|||||||
|
|
||||||
public function initContent()
|
public function initContent()
|
||||||
{
|
{
|
||||||
$this->content .= $this->renderForm().'<br />';
|
$this->initPageHeaderToolbar();
|
||||||
$this->show_toolbar = false;
|
$this->show_toolbar = false;
|
||||||
|
$this->content .= $this->renderForm();
|
||||||
$this->content .= $this->renderOptions();
|
$this->content .= $this->renderOptions();
|
||||||
|
|
||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'content' => $this->content,
|
'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
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -181,6 +181,7 @@ class AdminEmailsControllerCore extends AdminController
|
|||||||
{
|
{
|
||||||
$this->initTabModuleList();
|
$this->initTabModuleList();
|
||||||
$this->initToolbar();
|
$this->initToolbar();
|
||||||
|
$this->initPageHeaderToolbar();
|
||||||
$this->addToolBarModulesListButton();
|
$this->addToolBarModulesListButton();
|
||||||
unset($this->toolbar_btn['save']);
|
unset($this->toolbar_btn['save']);
|
||||||
$back = $this->context->link->getAdminLink('AdminHome');
|
$back = $this->context->link->getAdminLink('AdminHome');
|
||||||
@@ -195,6 +196,9 @@ class AdminEmailsControllerCore extends AdminController
|
|||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'content' => $this->content,
|
'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
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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()
|
public function renderList()
|
||||||
{
|
{
|
||||||
$this->_select = 'pl.`name` AS profile';
|
$this->_select = 'pl.`name` AS profile';
|
||||||
|
|||||||
@@ -137,7 +137,6 @@ class AdminFeaturesControllerCore extends AdminController
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->feature_name = $obj->name;
|
$this->feature_name = $obj->name;
|
||||||
$this->toolbar_title = $this->feature_name;
|
|
||||||
$this->fields_list = array(
|
$this->fields_list = array(
|
||||||
'id_feature_value' => array(
|
'id_feature_value' => array(
|
||||||
'title' => $this->l('ID'),
|
'title' => $this->l('ID'),
|
||||||
@@ -200,16 +199,7 @@ class AdminFeaturesControllerCore extends AdminController
|
|||||||
|
|
||||||
public function initPageHeaderToolbar()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
if ($this->display == 'view')
|
if (empty($this->display))
|
||||||
{
|
|
||||||
$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
|
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('Features');
|
$this->page_header_toolbar_title = $this->l('Features');
|
||||||
$this->page_header_toolbar_btn['new_feature'] = array(
|
$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
|
* AdminController::renderForm() override
|
||||||
* @see AdminController::renderForm()
|
* @see AdminController::renderForm()
|
||||||
@@ -349,6 +360,7 @@ class AdminFeaturesControllerCore extends AdminController
|
|||||||
{
|
{
|
||||||
// toolbar (save, cancel, new, ..)
|
// toolbar (save, cancel, new, ..)
|
||||||
$this->initToolbar();
|
$this->initToolbar();
|
||||||
|
$this->initPageHeaderToolbar();
|
||||||
if ($this->display == 'edit' || $this->display == 'add')
|
if ($this->display == 'edit' || $this->display == 'add')
|
||||||
{
|
{
|
||||||
if (!$this->loadObject(true))
|
if (!$this->loadObject(true))
|
||||||
@@ -382,6 +394,9 @@ class AdminFeaturesControllerCore extends AdminController
|
|||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'content' => $this->content,
|
'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
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -87,12 +87,12 @@ class AdminGendersControllerCore extends AdminController
|
|||||||
|
|
||||||
public function initPageHeaderToolbar()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('Genders');
|
if(empty($this->display))
|
||||||
$this->page_header_toolbar_btn['new_gender'] = array(
|
$this->page_header_toolbar_btn['new_gender'] = array(
|
||||||
'href' => self::$currentIndex.'&addgender&token='.$this->token,
|
'href' => self::$currentIndex.'&addgender&token='.$this->token,
|
||||||
'desc' => $this->l('Add new gender'),
|
'desc' => $this->l('Add new gender'),
|
||||||
'icon' => 'process-icon-new'
|
'icon' => 'process-icon-new'
|
||||||
);
|
);
|
||||||
|
|
||||||
parent::initPageHeaderToolbar();
|
parent::initPageHeaderToolbar();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,12 +146,12 @@ class AdminGroupsControllerCore extends AdminController
|
|||||||
|
|
||||||
public function initPageHeaderToolbar()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('Groups');
|
if (empty($this->display))
|
||||||
$this->page_header_toolbar_btn['new_group'] = array(
|
$this->page_header_toolbar_btn['new_group'] = array(
|
||||||
'href' => self::$currentIndex.'&addgroup&token='.$this->token,
|
'href' => self::$currentIndex.'&addgroup&token='.$this->token,
|
||||||
'desc' => $this->l('Add new group'),
|
'desc' => $this->l('Add new group'),
|
||||||
'icon' => 'process-icon-new'
|
'icon' => 'process-icon-new'
|
||||||
);
|
);
|
||||||
|
|
||||||
parent::initPageHeaderToolbar();
|
parent::initPageHeaderToolbar();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -648,7 +648,19 @@ class AdminImagesControllerCore extends AdminController
|
|||||||
'safe_mode' => Tools::getSafeModeStatus(),
|
'safe_mode' => Tools::getSafeModeStatus(),
|
||||||
'link_ppreferences' => 'index.php?tab=AdminPPreferences&token='.Tools::getAdminTokenLite('AdminPPreferences').'#PS_LEGACY_IMAGES_on',
|
'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
|
* Move product images to the new filesystem
|
||||||
|
|||||||
@@ -617,6 +617,7 @@ class AdminImportControllerCore extends AdminController
|
|||||||
{
|
{
|
||||||
// toolbar (save, cancel, new, ..)
|
// toolbar (save, cancel, new, ..)
|
||||||
$this->initToolbar();
|
$this->initToolbar();
|
||||||
|
$this->initPageHeaderToolbar();
|
||||||
if ($this->display == 'import')
|
if ($this->display == 'import')
|
||||||
if (Tools::getValue('csv'))
|
if (Tools::getValue('csv'))
|
||||||
$this->content .= $this->renderView();
|
$this->content .= $this->renderView();
|
||||||
@@ -631,6 +632,9 @@ class AdminImportControllerCore extends AdminController
|
|||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'content' => $this->content,
|
'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
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,17 @@ class AdminInformationControllerCore extends AdminController
|
|||||||
parent::initContent();
|
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()
|
public function renderView()
|
||||||
{
|
{
|
||||||
$this->initPageHeaderToolbar();
|
$this->initPageHeaderToolbar();
|
||||||
@@ -77,12 +88,6 @@ class AdminInformationControllerCore extends AdminController
|
|||||||
return parent::renderView();
|
return parent::renderView();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function initPageHeaderToolbar()
|
|
||||||
{
|
|
||||||
$this->page_header_toolbar_title = $this->l('Configuration information');
|
|
||||||
parent::initPageHeaderToolbar();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get all tests
|
* get all tests
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ class AdminInvoicesControllerCore extends AdminController
|
|||||||
);
|
);
|
||||||
|
|
||||||
$this->table = 'invoice_date';
|
$this->table = 'invoice_date';
|
||||||
|
$this->show_toolbar = false;
|
||||||
$this->toolbar_title = $this->l('Print PDF invoices');
|
$this->toolbar_title = $this->l('Print PDF invoices');
|
||||||
return parent::renderForm();
|
return parent::renderForm();
|
||||||
}
|
}
|
||||||
@@ -185,6 +186,7 @@ class AdminInvoicesControllerCore extends AdminController
|
|||||||
{
|
{
|
||||||
$this->display = 'edit';
|
$this->display = 'edit';
|
||||||
$this->initToolbar();
|
$this->initToolbar();
|
||||||
|
$this->initPageHeaderToolbar();
|
||||||
$this->content .= $this->initFormByDate();
|
$this->content .= $this->initFormByDate();
|
||||||
$this->content .= $this->initFormByStatus();
|
$this->content .= $this->initFormByStatus();
|
||||||
$this->table = 'invoice';
|
$this->table = 'invoice';
|
||||||
@@ -192,7 +194,10 @@ class AdminInvoicesControllerCore extends AdminController
|
|||||||
|
|
||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'content' => $this->content,
|
'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()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('Languages');
|
if (empty($this->display))
|
||||||
$this->page_header_toolbar_btn['new_language'] = array(
|
$this->page_header_toolbar_btn['new_language'] = array(
|
||||||
'href' => self::$currentIndex.'&addlang&token='.$this->token,
|
'href' => self::$currentIndex.'&addlang&token='.$this->token,
|
||||||
'desc' => $this->l('Add new language'),
|
'desc' => $this->l('Add new language'),
|
||||||
'icon' => 'process-icon-new'
|
'icon' => 'process-icon-new'
|
||||||
);
|
);
|
||||||
|
|
||||||
parent::initPageHeaderToolbar();
|
parent::initPageHeaderToolbar();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -300,6 +300,9 @@ class AdminLocalizationControllerCore extends AdminController
|
|||||||
'localization_form' => $this->renderForm(),
|
'localization_form' => $this->renderForm(),
|
||||||
'localization_options' => $this->renderOptions(),
|
'localization_options' => $this->renderOptions(),
|
||||||
'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,17 +102,33 @@ class AdminManufacturersControllerCore extends AdminController
|
|||||||
|
|
||||||
public function initPageHeaderToolbar()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('Manufacturers');
|
if (empty($this->display))
|
||||||
$this->page_header_toolbar_btn['new_manufacturer'] = array(
|
{
|
||||||
'href' => self::$currentIndex.'&addmanufacturer&token='.$this->token,
|
$this->page_header_toolbar_btn['new_manufacturer'] = array(
|
||||||
'desc' => $this->l('Add new manufacturer'),
|
'href' => self::$currentIndex.'&addmanufacturer&token='.$this->token,
|
||||||
'icon' => 'process-icon-new'
|
'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,
|
$this->page_header_toolbar_btn['new_manufacturer_address'] = array(
|
||||||
'desc' => $this->l('Add new manufacturer address'),
|
'href' => self::$currentIndex.'&addaddress&token='.$this->token,
|
||||||
'icon' => 'process-icon-new'
|
'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();
|
parent::initPageHeaderToolbar();
|
||||||
}
|
}
|
||||||
@@ -652,6 +668,7 @@ class AdminManufacturersControllerCore extends AdminController
|
|||||||
{
|
{
|
||||||
// toolbar (save, cancel, new, ..)
|
// toolbar (save, cancel, new, ..)
|
||||||
$this->initToolbar();
|
$this->initToolbar();
|
||||||
|
$this->initPageHeaderToolbar();
|
||||||
if ($this->display == 'editaddresses' || $this->display == 'addaddress')
|
if ($this->display == 'editaddresses' || $this->display == 'addaddress')
|
||||||
$this->content .= $this->renderFormAddress();
|
$this->content .= $this->renderFormAddress();
|
||||||
else if ($this->display == 'edit' || $this->display == 'add')
|
else if ($this->display == 'edit' || $this->display == 'add')
|
||||||
@@ -676,6 +693,9 @@ class AdminManufacturersControllerCore extends AdminController
|
|||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'content' => $this->content,
|
'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
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,6 +43,12 @@ class AdminMarketingControllerCore extends AdminController
|
|||||||
{
|
{
|
||||||
$this->toolbar_title = array_unique($this->breadcrumbs);
|
$this->toolbar_title = array_unique($this->breadcrumbs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function initPageHeaderToolbar()
|
||||||
|
{
|
||||||
|
parent::initPageHeaderToolbar();
|
||||||
|
$this->page_header_toolbar_btn = array();
|
||||||
|
}
|
||||||
|
|
||||||
public function initToolbar()
|
public function initToolbar()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -227,6 +227,7 @@ class AdminModulesPositionsControllerCore extends AdminController
|
|||||||
public function initContent()
|
public function initContent()
|
||||||
{
|
{
|
||||||
$this->addJS(__PS_BASE_URI__.'js/vendor/jquery.sortable.js');
|
$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))
|
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->content .= $this->initMain();
|
||||||
|
|
||||||
$this->context->smarty->assign(array(
|
$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()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('Order messages');
|
if (empty($this->display))
|
||||||
$this->page_header_toolbar_btn['new_order_message'] = array(
|
$this->page_header_toolbar_btn['new_order_message'] = array(
|
||||||
'href' => self::$currentIndex.'&addorder_message&token='.$this->token,
|
'href' => self::$currentIndex.'&addorder_message&token='.$this->token,
|
||||||
'desc' => $this->l('Add new order message'),
|
'desc' => $this->l('Add new order message'),
|
||||||
'icon' => 'process-icon-new'
|
'icon' => 'process-icon-new'
|
||||||
);
|
);
|
||||||
|
|
||||||
parent::initPageHeaderToolbar();
|
parent::initPageHeaderToolbar();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,12 +139,12 @@ class AdminOrdersControllerCore extends AdminController
|
|||||||
|
|
||||||
public function initPageHeaderToolbar()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('Orders');
|
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(
|
$this->page_header_toolbar_btn['new_order'] = array(
|
||||||
'href' => self::$currentIndex.'&addorder&token='.$this->token,
|
'href' => self::$currentIndex.'&addorder&token='.$this->token,
|
||||||
'desc' => $this->l('Add new order'),
|
'desc' => $this->l('Add new order'),
|
||||||
'icon' => 'process-icon-new'
|
'icon' => 'process-icon-new'
|
||||||
);
|
);
|
||||||
|
|
||||||
parent::initPageHeaderToolbar();
|
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()
|
public function postProcess()
|
||||||
{
|
{
|
||||||
if ($this->action)
|
if ($this->action)
|
||||||
|
|||||||
@@ -496,12 +496,16 @@ class AdminPerformanceControllerCore extends AdminController
|
|||||||
public function initContent()
|
public function initContent()
|
||||||
{
|
{
|
||||||
$this->initToolbar();
|
$this->initToolbar();
|
||||||
|
$this->initPageHeaderToolbar();
|
||||||
$this->display = '';
|
$this->display = '';
|
||||||
$this->content .= $this->renderForm();
|
$this->content .= $this->renderForm();
|
||||||
|
|
||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'content' => $this->content,
|
'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()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('Products');
|
if (empty($this->display))
|
||||||
$this->page_header_toolbar_btn['new_product'] = array(
|
$this->page_header_toolbar_btn['new_product'] = array(
|
||||||
'href' => self::$currentIndex.'&addproduct&token='.$this->token,
|
'href' => self::$currentIndex.'&addproduct&token='.$this->token,
|
||||||
'desc' => $this->l('Add new product'),
|
'desc' => $this->l('Add new product'),
|
||||||
'icon' => 'process-icon-new'
|
'icon' => 'process-icon-new'
|
||||||
);
|
);
|
||||||
|
|
||||||
parent::initPageHeaderToolbar();
|
parent::initPageHeaderToolbar();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,12 +99,12 @@ class AdminProfilesControllerCore extends AdminController
|
|||||||
|
|
||||||
public function initPageHeaderToolbar()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('Profiles');
|
if (empty($this->display))
|
||||||
$this->page_header_toolbar_btn['new_profile'] = array(
|
$this->page_header_toolbar_btn['new_profile'] = array(
|
||||||
'href' => self::$currentIndex.'&addprofile&token='.$this->token,
|
'href' => self::$currentIndex.'&addprofile&token='.$this->token,
|
||||||
'desc' => $this->l('Add new profile'),
|
'desc' => $this->l('Add new profile'),
|
||||||
'icon' => 'process-icon-new'
|
'icon' => 'process-icon-new'
|
||||||
);
|
);
|
||||||
|
|
||||||
parent::initPageHeaderToolbar();
|
parent::initPageHeaderToolbar();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,12 +117,12 @@ class AdminQuickAccessesControllerCore extends AdminController
|
|||||||
|
|
||||||
public function initPageHeaderToolbar()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('Quick access');
|
if (empty($this->display))
|
||||||
$this->page_header_toolbar_btn['new_quick_access'] = array(
|
$this->page_header_toolbar_btn['new_quick_access'] = array(
|
||||||
'href' => self::$currentIndex.'&addquick_access&token='.$this->token,
|
'href' => self::$currentIndex.'&addquick_access&token='.$this->token,
|
||||||
'desc' => $this->l('Add new quick access'),
|
'desc' => $this->l('Add new quick access'),
|
||||||
'icon' => 'process-icon-new'
|
'icon' => 'process-icon-new'
|
||||||
);
|
);
|
||||||
|
|
||||||
parent::initPageHeaderToolbar();
|
parent::initPageHeaderToolbar();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -155,12 +155,12 @@ class AdminReferrersControllerCore extends AdminController
|
|||||||
|
|
||||||
public function initPageHeaderToolbar()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('Referrers');
|
if(empty($this->display))
|
||||||
$this->page_header_toolbar_btn['new_referrer'] = array(
|
$this->page_header_toolbar_btn['new_referrer'] = array(
|
||||||
'href' => self::$currentIndex.'&addreferrer&token='.$this->token,
|
'href' => self::$currentIndex.'&addreferrer&token='.$this->token,
|
||||||
'desc' => $this->l('Add new referrer'),
|
'desc' => $this->l('Add new referrer'),
|
||||||
'icon' => 'process-icon-new'
|
'icon' => 'process-icon-new'
|
||||||
);
|
);
|
||||||
|
|
||||||
parent::initPageHeaderToolbar();
|
parent::initPageHeaderToolbar();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -267,6 +267,7 @@ class AdminRequestSqlControllerCore extends AdminController
|
|||||||
{
|
{
|
||||||
// toolbar (save, cancel, new, ..)
|
// toolbar (save, cancel, new, ..)
|
||||||
$this->initToolbar();
|
$this->initToolbar();
|
||||||
|
$this->initPageHeaderToolbar();
|
||||||
if ($this->display == 'edit' || $this->display == 'add')
|
if ($this->display == 'edit' || $this->display == 'add')
|
||||||
{
|
{
|
||||||
if (!$this->loadObject(true))
|
if (!$this->loadObject(true))
|
||||||
@@ -291,10 +292,25 @@ class AdminRequestSqlControllerCore extends AdminController
|
|||||||
|
|
||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'content' => $this->content,
|
'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
|
* Genrating a export file
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -116,12 +116,12 @@ class AdminScenesControllerCore extends AdminController
|
|||||||
|
|
||||||
public function initPageHeaderToolbar()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('Scenes');
|
if (empty($this->display))
|
||||||
$this->page_header_toolbar_btn['new_scene'] = array(
|
$this->page_header_toolbar_btn['new_scene'] = array(
|
||||||
'href' => self::$currentIndex.'&addscene&token='.$this->token,
|
'href' => self::$currentIndex.'&addscene&token='.$this->token,
|
||||||
'desc' => $this->l('Add new scene'),
|
'desc' => $this->l('Add new scene'),
|
||||||
'icon' => 'process-icon-new'
|
'icon' => 'process-icon-new'
|
||||||
);
|
);
|
||||||
|
|
||||||
parent::initPageHeaderToolbar();
|
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()
|
public function initProcess()
|
||||||
{
|
{
|
||||||
parent::initProcess();
|
parent::initProcess();
|
||||||
|
|||||||
@@ -80,12 +80,12 @@ class AdminSearchEnginesControllerCore extends AdminController
|
|||||||
|
|
||||||
public function initPageHeaderToolbar()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('Search engines');
|
if(empty($this->display))
|
||||||
$this->page_header_toolbar_btn['new_search_engine'] = array(
|
$this->page_header_toolbar_btn['new_search_engine'] = array(
|
||||||
'href' => self::$currentIndex.'&addsearch_engine&token='.$this->token,
|
'href' => self::$currentIndex.'&addsearch_engine&token='.$this->token,
|
||||||
'desc' => $this->l('Add new search engine'),
|
'desc' => $this->l('Add new search engine'),
|
||||||
'icon' => 'process-icon-new'
|
'icon' => 'process-icon-new'
|
||||||
);
|
);
|
||||||
|
|
||||||
parent::initPageHeaderToolbar();
|
parent::initPageHeaderToolbar();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,7 +79,6 @@ class AdminSlipControllerCore extends AdminController
|
|||||||
|
|
||||||
public function initPageHeaderToolbar()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('Slips');
|
|
||||||
$this->page_header_toolbar_btn['generate_pdf'] = array(
|
$this->page_header_toolbar_btn['generate_pdf'] = array(
|
||||||
'href' => self::$currentIndex.'&token='.$this->token,
|
'href' => self::$currentIndex.'&token='.$this->token,
|
||||||
'desc' => $this->l('Generate PDF'),
|
'desc' => $this->l('Generate PDF'),
|
||||||
@@ -154,13 +153,17 @@ class AdminSlipControllerCore extends AdminController
|
|||||||
public function initContent()
|
public function initContent()
|
||||||
{
|
{
|
||||||
$this->initToolbar();
|
$this->initToolbar();
|
||||||
|
$this->initPageHeaderToolbar();
|
||||||
$this->content .= $this->renderList();
|
$this->content .= $this->renderList();
|
||||||
$this->content .= $this->renderForm();
|
$this->content .= $this->renderForm();
|
||||||
$this->content .= '<br>'.$this->renderOptions();
|
$this->content .= $this->renderOptions();
|
||||||
|
|
||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'content' => $this->content,
|
'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
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -118,12 +118,12 @@ class AdminSpecificPriceRuleControllerCore extends AdminController
|
|||||||
|
|
||||||
public function initPageHeaderToolbar()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('Specific price rules');
|
if (empty($this->display))
|
||||||
$this->page_header_toolbar_btn['new_specific_price_rule'] = array(
|
$this->page_header_toolbar_btn['new_specific_price_rule'] = array(
|
||||||
'href' => self::$currentIndex.'&addspecific_price_rule&token='.$this->token,
|
'href' => self::$currentIndex.'&addspecific_price_rule&token='.$this->token,
|
||||||
'desc' => $this->l('Add new specific rule'),
|
'desc' => $this->l('Add new specific rule'),
|
||||||
'icon' => 'process-icon-new'
|
'icon' => 'process-icon-new'
|
||||||
);
|
);
|
||||||
|
|
||||||
parent::initPageHeaderToolbar();
|
parent::initPageHeaderToolbar();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,12 +109,12 @@ class AdminStatesControllerCore extends AdminController
|
|||||||
|
|
||||||
public function initPageHeaderToolbar()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('States');
|
if (empty($this->display))
|
||||||
$this->page_header_toolbar_btn['new_state'] = array(
|
$this->page_header_toolbar_btn['new_state'] = array(
|
||||||
'href' => self::$currentIndex.'&addstate&token='.$this->token,
|
'href' => self::$currentIndex.'&addstate&token='.$this->token,
|
||||||
'desc' => $this->l('Add new state'),
|
'desc' => $this->l('Add new state'),
|
||||||
'icon' => 'process-icon-new'
|
'icon' => 'process-icon-new'
|
||||||
);
|
);
|
||||||
|
|
||||||
parent::initPageHeaderToolbar();
|
parent::initPageHeaderToolbar();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ abstract class AdminStatsTabControllerCore extends AdminPreferencesControllerCor
|
|||||||
$this->initTabModuleList();
|
$this->initTabModuleList();
|
||||||
$this->addToolBarModulesListButton();
|
$this->addToolBarModulesListButton();
|
||||||
$this->toolbar_title = $this->l('Stats', 'AdminStatsTab');
|
$this->toolbar_title = $this->l('Stats', 'AdminStatsTab');
|
||||||
|
$this->initPageHeaderToolbar();
|
||||||
if ($this->display == 'view')
|
if ($this->display == 'view')
|
||||||
{
|
{
|
||||||
// Some controllers use the view action without an object
|
// Some controllers use the view action without an object
|
||||||
@@ -57,10 +58,19 @@ abstract class AdminStatsTabControllerCore extends AdminPreferencesControllerCor
|
|||||||
|
|
||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'content' => $this->content,
|
'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()
|
public function displayCalendar()
|
||||||
{
|
{
|
||||||
return AdminStatsTabController::displayCalendarForm(array(
|
return AdminStatsTabController::displayCalendarForm(array(
|
||||||
|
|||||||
@@ -195,18 +195,20 @@ class AdminStatusesControllerCore extends AdminController
|
|||||||
|
|
||||||
public function initPageHeaderToolbar()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('States');
|
if (empty($this->display))
|
||||||
$this->page_header_toolbar_btn['new_order_state'] = array(
|
{
|
||||||
'href' => self::$currentIndex.'&addorder_state&token='.$this->token,
|
$this->page_header_toolbar_btn['new_order_state'] = array(
|
||||||
'desc' => $this->l('Add new order state'),
|
'href' => self::$currentIndex.'&addorder_state&token='.$this->token,
|
||||||
'icon' => 'process-icon-new'
|
'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,
|
$this->page_header_toolbar_btn['new_order_return_state'] = array(
|
||||||
'desc' => $this->l('Add new order return state'),
|
'href' => self::$currentIndex.'&addorder_return_state&token='.$this->token,
|
||||||
'icon' => 'process-icon-new'
|
'desc' => $this->l('Add new order return state'),
|
||||||
);
|
'icon' => 'process-icon-new'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
parent::initPageHeaderToolbar();
|
parent::initPageHeaderToolbar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -78,8 +78,6 @@ class AdminStockManagementControllerCore extends AdminController
|
|||||||
|
|
||||||
public function initPageHeaderToolbar()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('Stock management');
|
|
||||||
|
|
||||||
if ($this->display == 'details')
|
if ($this->display == 'details')
|
||||||
$this->page_header_toolbar_btn['back_to_list'] = array(
|
$this->page_header_toolbar_btn['back_to_list'] = array(
|
||||||
'href' => Context::getContext()->link->getAdminLink('AdminStockManagement'),
|
'href' => Context::getContext()->link->getAdminLink('AdminStockManagement'),
|
||||||
@@ -1036,6 +1034,8 @@ class AdminStockManagementControllerCore extends AdminController
|
|||||||
|
|
||||||
$helper = new HelperForm();
|
$helper = new HelperForm();
|
||||||
|
|
||||||
|
$this->initPageHeaderToolbar();
|
||||||
|
|
||||||
// Check if form template has been overriden
|
// Check if form template has been overriden
|
||||||
if (file_exists($this->context->smarty->getTemplateDir(0).'/'.$this->tpl_folder.'form.tpl'))
|
if (file_exists($this->context->smarty->getTemplateDir(0).'/'.$this->tpl_folder.'form.tpl'))
|
||||||
$helper->tpl = $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->content .= $helper->generateForm($this->fields_form);
|
||||||
|
|
||||||
$this->context->smarty->assign(array(
|
$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
|
else
|
||||||
|
|||||||
@@ -129,6 +129,18 @@ class AdminStoresControllerCore extends AdminController
|
|||||||
unset($this->toolbar_btn['save']);
|
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()
|
public function renderList()
|
||||||
{
|
{
|
||||||
// Set toolbar options
|
// Set toolbar options
|
||||||
|
|||||||
@@ -72,12 +72,12 @@ class AdminSuppliersControllerCore extends AdminController
|
|||||||
|
|
||||||
public function initPageHeaderToolbar()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('Suppliers');
|
if (empty($this->display))
|
||||||
$this->page_header_toolbar_btn['new_supplier'] = array(
|
$this->page_header_toolbar_btn['new_supplier'] = array(
|
||||||
'href' => self::$currentIndex.'&addsupplier&token='.$this->token,
|
'href' => self::$currentIndex.'&addsupplier&token='.$this->token,
|
||||||
'desc' => $this->l('Add new supplier'),
|
'desc' => $this->l('Add new supplier'),
|
||||||
'icon' => 'process-icon-new'
|
'icon' => 'process-icon-new'
|
||||||
);
|
);
|
||||||
|
|
||||||
parent::initPageHeaderToolbar();
|
parent::initPageHeaderToolbar();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -149,15 +149,13 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
|
|
||||||
public function initPageHeaderToolbar()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('Supply orders');
|
|
||||||
|
|
||||||
if ($this->display == 'details')
|
if ($this->display == 'details')
|
||||||
$this->page_header_toolbar_btn['back'] = array(
|
$this->page_header_toolbar_btn['back'] = array(
|
||||||
'href' => Context::getContext()->link->getAdminLink('AdminSupplyOrders'),
|
'href' => Context::getContext()->link->getAdminLink('AdminSupplyOrders'),
|
||||||
'desc' => $this->l('Back to list'),
|
'desc' => $this->l('Back to list'),
|
||||||
'icon' => 'process-icon-back'
|
'icon' => 'process-icon-back'
|
||||||
);
|
);
|
||||||
else
|
elseif (empty($this->display))
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_btn['new_supply_order'] = array(
|
$this->page_header_toolbar_btn['new_supply_order'] = array(
|
||||||
'href' => self::$currentIndex.'&addsupply_order&token='.$this->token,
|
'href' => self::$currentIndex.'&addsupply_order&token='.$this->token,
|
||||||
@@ -575,6 +573,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
$this->display = 'update_order_state';
|
$this->display = 'update_order_state';
|
||||||
// overrides parent::initContent();
|
// overrides parent::initContent();
|
||||||
$this->initToolbar();
|
$this->initToolbar();
|
||||||
|
$this->initPageHeaderToolbar();
|
||||||
|
|
||||||
// given the current state, loads available states
|
// given the current state, loads available states
|
||||||
$states = SupplyOrderState::getSupplyOrderStates($supply_order->id_supply_order_state);
|
$states = SupplyOrderState::getSupplyOrderStates($supply_order->id_supply_order_state);
|
||||||
@@ -636,7 +635,10 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
|
|
||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'content' => $content,
|
'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))
|
if (!Validate::isLoadedObject($supply_order))
|
||||||
return parent::initContent();
|
return parent::initContent();
|
||||||
|
|
||||||
|
$this->initPageHeaderToolbar();
|
||||||
|
|
||||||
// re-defines fields_list
|
// re-defines fields_list
|
||||||
$this->fields_list = array(
|
$this->fields_list = array(
|
||||||
'supplier_reference' => array(
|
'supplier_reference' => array(
|
||||||
@@ -855,7 +859,10 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
|||||||
|
|
||||||
// assigns var
|
// assigns var
|
||||||
$this->context->smarty->assign(array(
|
$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'),
|
'desc' => $this->l('Back to list'),
|
||||||
'icon' => 'process-icon-back'
|
'icon' => 'process-icon-back'
|
||||||
);
|
);
|
||||||
else
|
elseif(empty($this->display))
|
||||||
$this->page_header_toolbar_btn['new_menu'] = array(
|
$this->page_header_toolbar_btn['new_menu'] = array(
|
||||||
'href' => self::$currentIndex.'&addtab&token='.$this->token,
|
'href' => self::$currentIndex.'&addtab&token='.$this->token,
|
||||||
'desc' => $this->l('Add new menu'),
|
'desc' => $this->l('Add new menu'),
|
||||||
|
|||||||
@@ -68,12 +68,12 @@ class AdminTagsControllerCore extends AdminController
|
|||||||
|
|
||||||
public function initPageHeaderToolbar()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('Tags');
|
if (empty($this->display))
|
||||||
$this->page_header_toolbar_btn['new_tag'] = array(
|
$this->page_header_toolbar_btn['new_tag'] = array(
|
||||||
'href' => self::$currentIndex.'&addtag&token='.$this->token,
|
'href' => self::$currentIndex.'&addtag&token='.$this->token,
|
||||||
'desc' => $this->l('Add new tag'),
|
'desc' => $this->l('Add new tag'),
|
||||||
'icon' => 'process-icon-new'
|
'icon' => 'process-icon-new'
|
||||||
);
|
);
|
||||||
|
|
||||||
parent::initPageHeaderToolbar();
|
parent::initPageHeaderToolbar();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -108,6 +108,18 @@ class AdminTaxesControllerCore extends AdminController
|
|||||||
$this->_where .= ' AND a.deleted = 0';
|
$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
|
* Display delete action link
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -396,6 +396,18 @@ class AdminThemesControllerCore extends AdminController
|
|||||||
return parent::processDelete();
|
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()
|
public function initContent()
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -434,8 +446,10 @@ class AdminThemesControllerCore extends AdminController
|
|||||||
public function ajaxProcessGetAddonsThemes()
|
public function ajaxProcessGetAddonsThemes()
|
||||||
{
|
{
|
||||||
// notice : readfile should be replaced by something else
|
// notice : readfile should be replaced by something else
|
||||||
if (@fsockopen('addons.prestashop.com', 80, $errno, $errst, 3))
|
/*if (@fsockopen('addons.prestashop.com', 80, $errno, $errst, 3))
|
||||||
@readfile('http://addons.prestashop.com/adminthemes.php?lang='.$this->context->language->iso_code);
|
@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()
|
public function initContent()
|
||||||
{
|
{
|
||||||
|
$this->initPageHeaderToolbar();
|
||||||
|
|
||||||
if ($id_category = Tools::getValue('id_category') && Tools::getIsset('viewcategory'))
|
if ($id_category = Tools::getValue('id_category') && Tools::getIsset('viewcategory'))
|
||||||
Tools::redirectAdmin($this->context->link->getAdminLink('AdminProducts').'&id_category='.(int)$id_category.'&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(
|
$this->context->smarty->assign(array(
|
||||||
'content' => $this->content,
|
'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()
|
|
||||||
{
|
|
||||||
$this->page_header_toolbar_title = $this->l('Monitoring');
|
|
||||||
parent::initPageHeaderToolbar();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getCustomListCategoriesEmpty()
|
public function getCustomListCategoriesEmpty()
|
||||||
{
|
{
|
||||||
$this->table = 'category';
|
$this->table = 'category';
|
||||||
|
|||||||
@@ -98,6 +98,8 @@ class AdminTranslationsControllerCore extends AdminController
|
|||||||
*/
|
*/
|
||||||
public function initContent()
|
public function initContent()
|
||||||
{
|
{
|
||||||
|
$this->initPageHeaderToolbar();
|
||||||
|
|
||||||
if (!is_null($this->type_selected))
|
if (!is_null($this->type_selected))
|
||||||
{
|
{
|
||||||
$method_name = 'initForm'.$this->type_selected;
|
$method_name = 'initForm'.$this->type_selected;
|
||||||
@@ -112,7 +114,11 @@ class AdminTranslationsControllerCore extends AdminController
|
|||||||
else
|
else
|
||||||
$this->content = $this->initMain();
|
$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()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('Warehouses');
|
if(empty($this->display))
|
||||||
$this->page_header_toolbar_btn['new_warehouse'] = array(
|
$this->page_header_toolbar_btn['new_warehouse'] = array(
|
||||||
'href' => self::$currentIndex.'&addwarehouse&token='.$this->token,
|
'href' => self::$currentIndex.'&addwarehouse&token='.$this->token,
|
||||||
'desc' => $this->l('Add new warehouse'),
|
'desc' => $this->l('Add new warehouse'),
|
||||||
'icon' => 'process-icon-new'
|
'icon' => 'process-icon-new'
|
||||||
);
|
);
|
||||||
|
|
||||||
parent::initPageHeaderToolbar();
|
parent::initPageHeaderToolbar();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,6 +92,19 @@ class AdminWebserviceControllerCore extends AdminController
|
|||||||
parent::__construct();
|
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()
|
protected function processUpdateOptions()
|
||||||
{
|
{
|
||||||
parent::processUpdateOptions();
|
parent::processUpdateOptions();
|
||||||
|
|||||||
@@ -64,12 +64,12 @@ class AdminZonesControllerCore extends AdminController
|
|||||||
|
|
||||||
public function initPageHeaderToolbar()
|
public function initPageHeaderToolbar()
|
||||||
{
|
{
|
||||||
$this->page_header_toolbar_title = $this->l('Zones');
|
if (empty($this->display))
|
||||||
$this->page_header_toolbar_btn['new_zone'] = array(
|
$this->page_header_toolbar_btn['new_zone'] = array(
|
||||||
'href' => self::$currentIndex.'&addzone&token='.$this->token,
|
'href' => self::$currentIndex.'&addzone&token='.$this->token,
|
||||||
'desc' => $this->l('Add new zone'),
|
'desc' => $this->l('Add new zone'),
|
||||||
'icon' => 'process-icon-new'
|
'icon' => 'process-icon-new'
|
||||||
);
|
);
|
||||||
|
|
||||||
parent::initPageHeaderToolbar();
|
parent::initPageHeaderToolbar();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user