// Set admin display hooks in templates
This commit is contained in:
@@ -148,9 +148,7 @@
|
||||
{/if}
|
||||
|
||||
{* display hook specified to this page : AdminCustomers *}
|
||||
{if $hook !== false}
|
||||
<div>{$hook}</div>
|
||||
{/if}
|
||||
<div>{hook h="displayAdminCustomers" id_customer=$customer->id}</div>
|
||||
|
||||
<div class="clear"> </div>
|
||||
|
||||
|
||||
@@ -28,6 +28,6 @@
|
||||
{block name="end_field_block"}
|
||||
</div>
|
||||
{if $input.name == 'id_feature'}
|
||||
{if isset($hook)}{$hook}{/if}
|
||||
{hook h="displayFeatureValueForm" id_feature_value=$feature_value->id}
|
||||
{/if}
|
||||
{/block}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{if $display_footer}
|
||||
{$HOOK_FOOTER}
|
||||
{hook h="displayBackOfficeFooter"}
|
||||
<div id="footer">
|
||||
<div class="footerLeft">
|
||||
<a href="http://www.prestashop.com/" target="_blank">PrestaShop™ {$ps_version}</a><br />
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
<link rel="shortcut icon" href="{$img_dir}favicon.ico" />
|
||||
{if $display_header}
|
||||
{$HOOK_HEADER}
|
||||
{hook h="displayBackOfficeHeader"}
|
||||
{/if}
|
||||
<!--[if IE]>
|
||||
<link type="text/css" rel="stylesheet" href="{$base_url}css/admin-ie.css" />
|
||||
@@ -191,7 +191,7 @@
|
||||
{if $multi_shop}
|
||||
<div id="header_shoplist"><span>{l s='Select your shop:'}</span>{$shop_list}</div>
|
||||
{/if}
|
||||
{$HOOK_TOP}
|
||||
{hook h="displayBackOfficeTop"}
|
||||
</div>
|
||||
<ul id="menu">
|
||||
{if !$tab}
|
||||
|
||||
@@ -110,16 +110,16 @@ $(document).ready(function() {
|
||||
<div id="partner_preactivation"><p class="center"><img src="../img/loader.gif" alt="" />{l s='Loading...'}</p></div>
|
||||
<div id="discover_prestashop"><p class="center"><img src="../img/loader.gif" alt="" />{l s='Loading...'}</p></div>
|
||||
</div>
|
||||
{$HOOK_BACKOFFICEHOME}
|
||||
{hook h="displayBackOfficeHome"}
|
||||
</div>
|
||||
<div class="clear"> </div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
|
||||
if({$refresh_check_version})
|
||||
if ({$refresh_check_version})
|
||||
{
|
||||
$('#blockNewVersionCheck').hide();
|
||||
$.ajax({
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
data : {
|
||||
ajax : '1',
|
||||
|
||||
@@ -56,8 +56,9 @@
|
||||
{/foreach}
|
||||
</script>
|
||||
|
||||
{if ($HOOK_INVOICE)}
|
||||
<div style="float: right; margin: -40px 40px 10px 0;">{$HOOK_INVOICE}</div><br class="clear" />';
|
||||
{assign var="hook_invoice" value={hook h="displayInvoice" id_order=$order->id}}
|
||||
{if ($hook_invoice)}
|
||||
<div style="float: right; margin: -40px 40px 10px 0;">{$hook_invoice}</div><br class="clear" />';
|
||||
{/if}
|
||||
|
||||
<div class="bloc-command">
|
||||
@@ -183,9 +184,7 @@
|
||||
{/if}
|
||||
|
||||
<!-- Admin order hook -->
|
||||
{if $HOOK_ADMIN_ORDER}
|
||||
{$HOOK_ADMIN_ORDER}
|
||||
{/if}
|
||||
{hook h="displayAdminOrder" id_order=$order->id}
|
||||
</div>
|
||||
<!-- END Left column -->
|
||||
|
||||
|
||||
@@ -1336,10 +1336,6 @@ class AdminControllerCore extends Controller
|
||||
'is_multishop' => $is_multishop,
|
||||
'pic_dir' => _THEME_PROD_PIC_DIR_
|
||||
));
|
||||
$this->context->smarty->assign(array(
|
||||
'HOOK_HEADER' => Hook::exec('displayBackOfficeHeader'),
|
||||
'HOOK_TOP' => Hook::exec('displayBackOfficeTop'),
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1426,10 +1422,6 @@ class AdminControllerCore extends Controller
|
||||
'end_time' => number_format(microtime(true) - $this->timerStart, 3, '.', ''),
|
||||
'iso_is_fr' => strtoupper($this->context->language->iso_code) == 'FR',
|
||||
));
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'HOOK_FOOTER' => Hook::exec('displayBackOfficeFooter'),
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -657,9 +657,6 @@ class AdminCustomersControllerCore extends AdminController
|
||||
// Messages
|
||||
'messages' => $messages,
|
||||
|
||||
// Display hook specified to this page : AdminCustomers
|
||||
'hook' => Hook::exec('displayAdminCustomers', array('id_customer' => $customer->id)),
|
||||
|
||||
// Groups
|
||||
'groups' => $groups,
|
||||
|
||||
|
||||
@@ -263,7 +263,7 @@ class AdminFeaturesControllerCore extends AdminController
|
||||
$feature_value = new FeatureValue(Tools::getValue('id_feature_value'));
|
||||
|
||||
$this->tpl_vars = array(
|
||||
'hook' => Hook::exec('displayFeatureValueForm', array('id_feature_value' => $feature_value->id))
|
||||
'feature_value' => $feature_value,
|
||||
);
|
||||
|
||||
$this->getlanguages();
|
||||
|
||||
@@ -564,11 +564,6 @@ class AdminHomeControllerCore extends AdminController
|
||||
$tpl_vars['last_orders'] =$this->getLastOrders();
|
||||
$tpl_vars['tips_optimization'] = $this->_displayOptimizationTips();
|
||||
|
||||
$HOOK_BACKOFFICEHOME = Hook::exec('displayBackOfficeHome');
|
||||
$tpl_vars['HOOK_BACKOFFICEHOME'] = $HOOK_BACKOFFICEHOME;
|
||||
$smarty->assign($tpl_vars);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1050,8 +1050,6 @@ class AdminOrdersControllerCore extends AdminController
|
||||
'invoices_collection' => $order->getInvoicesCollection(),
|
||||
'not_paid_invoices_collection' => $order->getNotPaidInvoicesCollection(),
|
||||
'payment_methods' => $payment_methods,
|
||||
'HOOK_INVOICE' => Hook::exec('displayInvoice', array('id_order' => $order->id)),
|
||||
'HOOK_ADMIN_ORDER' => Hook::exec('displayAdminOrder', array('id_order' => $order->id))
|
||||
);
|
||||
|
||||
return parent::renderView();
|
||||
|
||||
Reference in New Issue
Block a user