Skip to content

Commit

Permalink
Remove usages of renderTemplate
Browse files Browse the repository at this point in the history
  • Loading branch information
Morgan Pichat committed Oct 17, 2023
1 parent d8e2f99 commit eef0472
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 317 deletions.
64 changes: 12 additions & 52 deletions admin-dev/themes/new-theme/template/layout.tpl
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<!DOCTYPE html>
<html lang="{$iso}">
<head>
{render_template
smarty_template="header.tpl"
twig_template="@PrestaShop/Admin/Layout/head.html.twig"
meta_title=$meta_title
}
{$header}
</head>

<body
Expand All @@ -26,25 +22,16 @@
<span id="shop_version">{$ps_version}</span>

<div class="component" id="quick-access-container">
{render_template
smarty_template="components/layout/quick_access.tpl"
twig_template="@PrestaShop/Admin/Layout/quick_access.html.twig"
}
{include file="components/layout/quick_access.tpl"}
</div>
<div class="component component-search" id="header-search-container">
<div class="component-search-body">
<div class="component-search-top">

{render_template
smarty_template="components/layout/search_form.tpl"
twig_template="@PrestaShop/Admin/Layout/search_form.html.twig"
}
{include file="components/layout/search_form.tpl"}
<button class="component-search-cancel d-none">{l|escape s='Cancel' d='Admin.Actions'}</button>
</div>
{render_template
smarty_template="components/layout/mobile_quickaccess.tpl"
twig_template="@PrestaShop/Admin/Layout/mobile_quick_access.html.twig"
}

{include file="components/layout/mobile_quickaccess.tpl"}
</div>

<div class="component-search-background d-none"></div>
Expand Down Expand Up @@ -103,31 +90,17 @@
<div class="header-right">
{if !isset($hideLegacyStoreContextSelector) || !$hideLegacyStoreContextSelector}
<div class="component" id="header-shop-list-container">
{render_template
smarty_template="components/layout/shop_list.tpl"
twig_template="@PrestaShop/Admin/Layout/shop_list.html.twig"
base_url=$base_url
is_multishop= $is_multishop|default:null
shop_list= $shop_list|default:null
multishop_context= $multishop_context|default:null
current_shop_name= $current_shop_name|default:null
}
{include file="components/layout/shop_list.tpl"}
</div>
{/if}
{if $show_new_orders || $show_new_customers || $show_new_messages}
<div class="component header-right-component" id="header-notifications-container">
{render_template
smarty_template="components/layout/notifications_center.tpl"
twig_template="@PrestaShop/Admin/Layout/notifications_center.html.twig"
}
{include file="components/layout/notifications_center.tpl"}
</div>
{/if}

<div class="component" id="header-employee-container">
{render_template
smarty_template="components/layout/employee_dropdown.tpl"
twig_template="@PrestaShop/Admin/Layout/employee_dropdown.html.twig"
}
{include file="components/layout/employee_dropdown.tpl"}
</div>
{if isset($displayBackOfficeTop)}{$displayBackOfficeTop}{/if}
</div>
Expand All @@ -136,21 +109,11 @@
{/if}

{if $display_header}
{render_template
smarty_template="components/layout/nav_bar.tpl"
twig_template="@PrestaShop/Admin/Layout/nav_bar.html.twig"
}
{include file='components/layout/nav_bar.tpl'}
{/if}

{if isset($page_header_toolbar_template)}
{render_template
smarty_template=$page_header_toolbar_template
twig_template="@PrestaShop/Admin/Layout/toolbar.html.twig"
title=$title
toolbar_btn=$toolbar_btn
help_link=$help_link
enableSidebar=$enableSidebar
}
{if isset($page_header_toolbar)}
{$page_header_toolbar}
{/if}

<div id="main-div">
Expand Down Expand Up @@ -183,10 +146,7 @@
<div class="mobile-layer"></div>

{if $display_footer}
{render_template
smarty_template="footer.tpl"
twig_template="@PrestaShop/Admin/Layout/footer.html.twig"
}
{include file='footer.tpl'}
{/if}
{/if}

Expand Down
1 change: 0 additions & 1 deletion config/smarty.config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ function smartyEscape($string, $esc_type = 'html', $char_set = null, $double_enc
smartyRegisterFunction($smarty, 'modifier', 'classname', 'smartyClassname');
smartyRegisterFunction($smarty, 'modifier', 'classnames', 'smartyClassnames');
smartyRegisterFunction($smarty, 'function', 'url', array('Link', 'getUrlSmarty'));
smartyRegisterFunction($smarty, 'function', 'render_template', 'renderTemplate');

// Native PHP functions
smartyRegisterFunction($smarty, 'modifier', 'addcslashes', 'addcslashes');
Expand Down

This file was deleted.

25 changes: 0 additions & 25 deletions src/PrestaShopBundle/Resources/views/Admin/Layout/footer.html.twig

This file was deleted.

28 changes: 0 additions & 28 deletions src/PrestaShopBundle/Resources/views/Admin/Layout/head.html.twig

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit eef0472

Please sign in to comment.