diff --git a/core/lib/Thelia/Controller/Admin/FileController.php b/core/lib/Thelia/Controller/Admin/FileController.php index 8494d833a..01bbad521 100644 --- a/core/lib/Thelia/Controller/Admin/FileController.php +++ b/core/lib/Thelia/Controller/Admin/FileController.php @@ -31,10 +31,12 @@ use Thelia\Model\ContentDocument; use Thelia\Model\ContentImage; use Thelia\Model\FolderDocument; use Thelia\Model\FolderImage; +use Thelia\Model\Lang; use Thelia\Model\ProductDocument; use Thelia\Model\ProductImage; use Thelia\Tools\FileManager; use Thelia\Tools\Rest\ResponseRest; +use Thelia\Tools\URL; /** * Created by JetBrains PhpStorm. @@ -182,6 +184,7 @@ class FileController extends BaseAdminController } $documentModel->setParentId($parentId); + $documentModel->setLocale(Lang::getDefaultLanguage()->getLocale()); $documentModel->setTitle($fileBeingUploaded->getClientOriginalName()); $documentCreateOrUpdateEvent = new DocumentCreateOrUpdateEvent( @@ -389,7 +392,7 @@ class FileController extends BaseAdminController $this->adminLogAppend(AdminResources::retrieve($parentType), AccessManager::UPDATE, sprintf('Image with Ref %s (ID %d) modified', $imageUpdated->getTitle(), $imageUpdated->getId())); if ($this->getRequest()->get('save_mode') == 'close') { - $this->redirectToRoute('admin.images'); + $this->redirect(URL::getInstance()->absoluteUrl($fileManager->getRedirectionUrl($parentType, $image->getParentId(), FileManager::FILE_TYPE_IMAGES))); } else { $this->redirectSuccess($imageModification); } @@ -466,7 +469,7 @@ class FileController extends BaseAdminController $this->adminLogAppend(AdminResources::retrieve($parentType), AccessManager::UPDATE, sprintf('Document with Ref %s (ID %d) modified', $documentUpdated->getTitle(), $documentUpdated->getId())); if ($this->getRequest()->get('save_mode') == 'close') { - $this->redirectToRoute('admin.documents'); + $this->redirect(URL::getInstance()->absoluteUrl($fileManager->getRedirectionUrl($parentType, $document->getParentId(), FileManager::FILE_TYPE_DOCUMENTS))); } else { $this->redirectSuccess($documentModification); } diff --git a/core/lib/Thelia/Core/Template/Loop/Cart.php b/core/lib/Thelia/Core/Template/Loop/Cart.php index 4f635ddeb..91c22a7b4 100644 --- a/core/lib/Thelia/Core/Template/Loop/Cart.php +++ b/core/lib/Thelia/Core/Template/Loop/Cart.php @@ -82,9 +82,9 @@ class Cart extends BaseLoop implements ArraySearchLoopInterface public function parseResults(LoopResult $loopResult) { $taxCountry = $this->container->get('thelia.taxEngine')->getDeliveryCountry(); - + $locale = $this->request->getSession()->getLang()->getLocale(); foreach ($loopResult->getResultDataCollection() as $cartItem) { - $product = $cartItem->getProduct(); + $product = $cartItem->getProduct(null, $locale); $productSaleElement = $cartItem->getProductSaleElements(); $loopResultRow = new LoopResultRow(); diff --git a/core/lib/Thelia/Core/Template/Loop/Document.php b/core/lib/Thelia/Core/Template/Loop/Document.php index 3e4063d7b..77a38587e 100644 --- a/core/lib/Thelia/Core/Template/Loop/Document.php +++ b/core/lib/Thelia/Core/Template/Loop/Document.php @@ -237,7 +237,7 @@ class Document extends BaseI18nLoop implements PropelSearchLoopInterface $loopResultRow ->set("ID" , $result->getId()) ->set("LOCALE" , $this->locale) - ->set("DOCUMENT_URL" , $event->getFileUrl()) + ->set("DOCUMENT_URL" , $event->getDocumentUrl()) ->set("DOCUMENT_PATH" , $event->getDocumentPath()) ->set("ORIGINAL_DOCUMENT_PATH", $source_filepath) ->set("TITLE" , $result->getVirtualColumn('i18n_TITLE')) diff --git a/core/lib/Thelia/Model/CartItem.php b/core/lib/Thelia/Model/CartItem.php index 7818f63d2..ad25ec13e 100644 --- a/core/lib/Thelia/Model/CartItem.php +++ b/core/lib/Thelia/Model/CartItem.php @@ -8,6 +8,7 @@ use Thelia\Core\Event\TheliaEvents; use Thelia\Model\Base\CartItem as BaseCartItem; use Thelia\Core\Event\Cart\CartEvent; +use Thelia\Model\ConfigQuery; use Thelia\TaxEngine\Calculator; class CartItem extends BaseCartItem @@ -89,6 +90,23 @@ class CartItem extends BaseCartItem return $this->getPromo() == 1 ? $this->getPromoPrice() : $this->getPrice(); } + public function getProduct(ConnectionInterface $con = null, $locale = null) + { + $product = parent::getProduct($con); + + $translation = $product->getTranslation($locale); + + if ($translation->isNew()) { + if (ConfigQuery::getDefaultLangWhenNoTranslationAvailable()) { + $locale = Lang::getDefaultLanguage()->getLocale(); + } + } + + $product->setLocale($locale); + + return $product; + } + public function getRealTaxedPrice(Country $country) { return $this->getPromo() == 1 ? $this->getTaxedPromoPrice($country) : $this->getTaxedPrice($country); diff --git a/core/lib/Thelia/Model/Lang.php b/core/lib/Thelia/Model/Lang.php index a0baa80c2..546eb7b20 100644 --- a/core/lib/Thelia/Model/Lang.php +++ b/core/lib/Thelia/Model/Lang.php @@ -17,6 +17,9 @@ use Thelia\Model\Map\LangTableMap; class Lang extends BaseLang { use \Thelia\Model\Tools\ModelEventDispatcherTrait; + + protected static $defaultLanguage; + /** * Return the default language object, using a local variable to cache it. * @@ -24,10 +27,13 @@ class Lang extends BaseLang */ public static function getDefaultLanguage() { - $default_lang = LangQuery::create()->findOneByByDefault(1); + if (null === self::$defaultLanguage) { + self::$defaultLanguage = LangQuery::create()->findOneByByDefault(1); - if ($default_lang == null) throw new \RuntimeException("No default language is defined. Please define one."); - return $default_lang; + if (self::$defaultLanguage == null) throw new \RuntimeException("No default language is defined. Please define one."); + } + + return self::$defaultLanguage; } public function toggleDefault() diff --git a/templates/backOffice/default/admin-layout.tpl b/templates/backOffice/default/admin-layout.tpl index fe80d0330..9ced036b9 100644 --- a/templates/backOffice/default/admin-layout.tpl +++ b/templates/backOffice/default/admin-layout.tpl @@ -4,6 +4,8 @@ {check_auth role="ADMIN" resource="{block name="check-resource"}{/block}" access="{block name="check-access"}{/block}" login_tpl="/admin/login"} {/block} +{block name="no-return-functions"}{/block} + {* -- Define some stuff for Smarty ------------------------------------------ *} {config_load file='variables.conf'} diff --git a/templates/backOffice/default/admin-logs.html b/templates/backOffice/default/admin-logs.html index 5ca9f9399..5c7aa63fc 100644 --- a/templates/backOffice/default/admin-logs.html +++ b/templates/backOffice/default/admin-logs.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Thelia Mailing System'}{/block} {block name="check-resource"}admin.configuration.admin-logs{/block} diff --git a/templates/backOffice/default/administrators.html b/templates/backOffice/default/administrators.html index 333b38f45..e0251a0d4 100644 --- a/templates/backOffice/default/administrators.html +++ b/templates/backOffice/default/administrators.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Back-office users'}{/block} {block name="check-resource"}admin.configuration.administrator{/block} diff --git a/templates/backOffice/default/advanced-configuration.html b/templates/backOffice/default/advanced-configuration.html index ef21fad37..3b6b8fdab 100644 --- a/templates/backOffice/default/advanced-configuration.html +++ b/templates/backOffice/default/advanced-configuration.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Advanced configuration'}{/block} {block name="check-resource"}admin.cache{/block} diff --git a/templates/backOffice/default/attribute-edit.html b/templates/backOffice/default/attribute-edit.html index e635d3892..3af39c275 100644 --- a/templates/backOffice/default/attribute-edit.html +++ b/templates/backOffice/default/attribute-edit.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Edit an attribute'}{/block} {block name="check-resource"}admin.configuration.attribute{/block} diff --git a/templates/backOffice/default/attributes.html b/templates/backOffice/default/attributes.html index 984dad6d5..74c4d88aa 100644 --- a/templates/backOffice/default/attributes.html +++ b/templates/backOffice/default/attributes.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Thelia Product Attributes'}{/block} {block name="check-resource"}admin.configuration.attribute{/block} diff --git a/templates/backOffice/default/categories.html b/templates/backOffice/default/categories.html index 3cf007adf..5239efaa4 100644 --- a/templates/backOffice/default/categories.html +++ b/templates/backOffice/default/categories.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'catalog'} +{/block} + {block name="page-title"}{intl l='Categories'}{/block} {block name="check-resource"}admin.category{/block} diff --git a/templates/backOffice/default/category-edit.html b/templates/backOffice/default/category-edit.html index af50e6c14..e5178fbf2 100644 --- a/templates/backOffice/default/category-edit.html +++ b/templates/backOffice/default/category-edit.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'catalog'} +{/block} + {block name="check-resource"}admin.category{/block} {block name="check-access"}update{/block} diff --git a/templates/backOffice/default/config-store.html b/templates/backOffice/default/config-store.html index 2cebd7664..dd648a943 100644 --- a/templates/backOffice/default/config-store.html +++ b/templates/backOffice/default/config-store.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Store'}{/block} {block name="check-resource"}admin.configuration.store{/block} diff --git a/templates/backOffice/default/configuration.html b/templates/backOffice/default/configuration.html index 2379c6432..e7e057209 100644 --- a/templates/backOffice/default/configuration.html +++ b/templates/backOffice/default/configuration.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Configuration'}{/block} {block name="check-resource"}admin.configuration{/block} diff --git a/templates/backOffice/default/content-edit.html b/templates/backOffice/default/content-edit.html index 87570e8a6..ac1a3d802 100644 --- a/templates/backOffice/default/content-edit.html +++ b/templates/backOffice/default/content-edit.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'folder'} +{/block} + {block name="check-resource"}admin.content{/block} {block name="check-access"}view{/block} diff --git a/templates/backOffice/default/countries.html b/templates/backOffice/default/countries.html index 87aeaed22..cf2226a74 100644 --- a/templates/backOffice/default/countries.html +++ b/templates/backOffice/default/countries.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Countries'}{/block} {block name="check-resource"}admin.configuration.country{/block} diff --git a/templates/backOffice/default/country-edit.html b/templates/backOffice/default/country-edit.html index 4a513ff23..f687a26a2 100644 --- a/templates/backOffice/default/country-edit.html +++ b/templates/backOffice/default/country-edit.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Edit a country'}{/block} {block name="check-resource"}admin.configuration.country{/block} diff --git a/templates/backOffice/default/coupon-create.html b/templates/backOffice/default/coupon-create.html index 5d6180277..d1a56e68b 100644 --- a/templates/backOffice/default/coupon-create.html +++ b/templates/backOffice/default/coupon-create.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'tools'} +{/block} + {block name="check-resource"}admin.coupon{/block} {block name="check-access"}create{/block} diff --git a/templates/backOffice/default/coupon-list.html b/templates/backOffice/default/coupon-list.html index 30a3327b7..12a2c3b9f 100644 --- a/templates/backOffice/default/coupon-list.html +++ b/templates/backOffice/default/coupon-list.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'tools'} +{/block} + {block name="check-resource"}admin.coupon{/block} {block name="check-access"}view{/block} diff --git a/templates/backOffice/default/coupon-update.html b/templates/backOffice/default/coupon-update.html index 0ef964a99..3e93eeee2 100644 --- a/templates/backOffice/default/coupon-update.html +++ b/templates/backOffice/default/coupon-update.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'tools'} +{/block} + {block name="check-resource"}admin.coupon{/block} {block name="check-access"}update{/block} diff --git a/templates/backOffice/default/currencies.html b/templates/backOffice/default/currencies.html index 475aac143..344ead588 100644 --- a/templates/backOffice/default/currencies.html +++ b/templates/backOffice/default/currencies.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Currencies'}{/block} {block name="check-resource"}admin.configuration.currency{/block} diff --git a/templates/backOffice/default/currency-edit.html b/templates/backOffice/default/currency-edit.html index 4d59e0fee..3fc598bc5 100644 --- a/templates/backOffice/default/currency-edit.html +++ b/templates/backOffice/default/currency-edit.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Edit a currency'}{/block} {block name="check-resource"}admin.configuration.currency{/block} diff --git a/templates/backOffice/default/customer-edit.html b/templates/backOffice/default/customer-edit.html index 6c252390f..62bdf1765 100644 --- a/templates/backOffice/default/customer-edit.html +++ b/templates/backOffice/default/customer-edit.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'customer'} +{/block} + {block name="page-title"}{intl l='Edit a customer'}{/block} {block name="check-resource"}admin.customer{/block} diff --git a/templates/backOffice/default/customers.html b/templates/backOffice/default/customers.html index ab6b97fbf..7002896c0 100644 --- a/templates/backOffice/default/customers.html +++ b/templates/backOffice/default/customers.html @@ -1,6 +1,9 @@ - {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'customer'} +{/block} + {block name="page-title"}{intl l='Customer'}{/block} {block name="check-resource"}admin.customer{/block} diff --git a/templates/backOffice/default/document-edit.html b/templates/backOffice/default/document-edit.html index b39cf1aee..f8caa97aa 100644 --- a/templates/backOffice/default/document-edit.html +++ b/templates/backOffice/default/document-edit.html @@ -34,7 +34,7 @@ hide_submit_buttons = false page_url = "{url path="/admin/document/type/{$documentType}/{$ID}/update"}" - close_url = "{url path="{$redirectUrl}"}" + close_url = "{url path="{$redirectUrl}" noamp=1}" } {form_hidden_fields form=$form} diff --git a/templates/backOffice/default/export.html b/templates/backOffice/default/export.html index 12ec8565a..7bc7efd2e 100644 --- a/templates/backOffice/default/export.html +++ b/templates/backOffice/default/export.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'tools'} +{/block} + {block name="page-title"}{intl l='Exports'}{/block} {block name="check-resource"}admin.export{/block} diff --git a/templates/backOffice/default/feature-edit.html b/templates/backOffice/default/feature-edit.html index 31c01edac..3585c4756 100644 --- a/templates/backOffice/default/feature-edit.html +++ b/templates/backOffice/default/feature-edit.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Edit a feature'}{/block} {block name="check-resource"}admin.configuration.feature{/block} diff --git a/templates/backOffice/default/features.html b/templates/backOffice/default/features.html index 6e5c18b91..a2d59a047 100644 --- a/templates/backOffice/default/features.html +++ b/templates/backOffice/default/features.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Thelia Product Features'}{/block} {block name="check-resource"}admin.configuration.feature{/block} diff --git a/templates/backOffice/default/folder-edit.html b/templates/backOffice/default/folder-edit.html index d5b58625b..50df01098 100644 --- a/templates/backOffice/default/folder-edit.html +++ b/templates/backOffice/default/folder-edit.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'folder'} +{/block} + {block name="check-resource"}admin.folder{/block} {block name="check-access"}update{/block} diff --git a/templates/backOffice/default/folders.html b/templates/backOffice/default/folders.html index 1b96fd9b7..7a078356c 100644 --- a/templates/backOffice/default/folders.html +++ b/templates/backOffice/default/folders.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'folder'} +{/block} + {block name="page-title"}{intl l='Folders'}{/block} {block name="check-resource"}admin.folder{/block} diff --git a/templates/backOffice/default/home.html b/templates/backOffice/default/home.html index a5eda4b59..3f48ee417 100644 --- a/templates/backOffice/default/home.html +++ b/templates/backOffice/default/home.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'home'} +{/block} + {block name="page-title"}{intl l='Back-office home'}{/block} {block name="main-content"} diff --git a/templates/backOffice/default/image-edit.html b/templates/backOffice/default/image-edit.html index 88c7cc5a1..0461ce1a8 100644 --- a/templates/backOffice/default/image-edit.html +++ b/templates/backOffice/default/image-edit.html @@ -34,7 +34,7 @@ hide_submit_buttons = false page_url = "{url path="/admin/image/type/{$imageType}/{$ID}/update"}" - close_url = "{url path="{$redirectUrl}"}" + close_url = "{url path="{$redirectUrl}" noamp=1}" } {form_hidden_fields form=$form} diff --git a/templates/backOffice/default/languages.html b/templates/backOffice/default/languages.html index 12a1a0f3e..9678fbfe4 100644 --- a/templates/backOffice/default/languages.html +++ b/templates/backOffice/default/languages.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Thelia Languages'}{/block} {block name="check-resource"}admin.configuration.language{/block} diff --git a/templates/backOffice/default/mailing-system.html b/templates/backOffice/default/mailing-system.html index 0162dc8e6..15e180feb 100644 --- a/templates/backOffice/default/mailing-system.html +++ b/templates/backOffice/default/mailing-system.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Thelia Mailing System'}{/block} {block name="check-resource"}admin.configuration.mailing-system{/block} diff --git a/templates/backOffice/default/message-edit.html b/templates/backOffice/default/message-edit.html index 5eeff56ce..1e6adc0ae 100644 --- a/templates/backOffice/default/message-edit.html +++ b/templates/backOffice/default/message-edit.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Edit a mailing template'}{/block} {block name="check-resource"}admin.configuration.message{/block} diff --git a/templates/backOffice/default/messages.html b/templates/backOffice/default/messages.html index c299942da..b6cc2b004 100644 --- a/templates/backOffice/default/messages.html +++ b/templates/backOffice/default/messages.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Thelia Mailing Templates'}{/block} {block name="check-resource"}admin.configuration.message{/block} diff --git a/templates/backOffice/default/module-configure.html b/templates/backOffice/default/module-configure.html index 9ed9fa924..3908cf72e 100644 --- a/templates/backOffice/default/module-configure.html +++ b/templates/backOffice/default/module-configure.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'modules'} +{/block} + {block name="page-title"}{intl l='Modules'}{/block} {block name="check-resource"}admin.module{/block} diff --git a/templates/backOffice/default/module-edit.html b/templates/backOffice/default/module-edit.html index ab1edc9d0..1c28605eb 100644 --- a/templates/backOffice/default/module-edit.html +++ b/templates/backOffice/default/module-edit.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'modules'} +{/block} + {block name="page-title"}{intl l='Edit a module'}{/block} {block name="check-resource"}admin.module{/block} diff --git a/templates/backOffice/default/modules.html b/templates/backOffice/default/modules.html index eb735c129..d8968648c 100644 --- a/templates/backOffice/default/modules.html +++ b/templates/backOffice/default/modules.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'modules'} +{/block} + {block name="page-title"}{intl l='Modules'}{/block} {block name="check-resource"}admin.module{/block} diff --git a/templates/backOffice/default/order-edit.html b/templates/backOffice/default/order-edit.html index 238938e7a..190ffadd4 100644 --- a/templates/backOffice/default/order-edit.html +++ b/templates/backOffice/default/order-edit.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'order'} +{/block} + {block name="page-title"}{intl l='Edit an order'}{/block} {block name="check-resource"}admin.order{/block} diff --git a/templates/backOffice/default/orders.html b/templates/backOffice/default/orders.html index 721ee459c..86d6c8faf 100644 --- a/templates/backOffice/default/orders.html +++ b/templates/backOffice/default/orders.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'order'} +{/block} + {block name="page-title"}{intl l='Orders'}{/block} {block name="check-resource"}admin.order{/block} diff --git a/templates/backOffice/default/product-edit.html b/templates/backOffice/default/product-edit.html index 11369ed17..72df5e344 100644 --- a/templates/backOffice/default/product-edit.html +++ b/templates/backOffice/default/product-edit.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'catalog'} +{/block} + {block name="check-resource"}admin.product{/block} {block name="check-access"}update{/block} diff --git a/templates/backOffice/default/profile-edit.html b/templates/backOffice/default/profile-edit.html index fde3ad01a..106c716c8 100644 --- a/templates/backOffice/default/profile-edit.html +++ b/templates/backOffice/default/profile-edit.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Edit a profile'}{/block} {block name="check-resource"}admin.configuration.profile{/block} diff --git a/templates/backOffice/default/profiles.html b/templates/backOffice/default/profiles.html index 20104e725..03aec354e 100644 --- a/templates/backOffice/default/profiles.html +++ b/templates/backOffice/default/profiles.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Administration profiles'}{/block} {block name="check-resource"}admin.configuration.profile{/block} diff --git a/templates/backOffice/default/shipping-configuration-edit.html b/templates/backOffice/default/shipping-configuration-edit.html index f4eb75c96..dc503cce9 100644 --- a/templates/backOffice/default/shipping-configuration-edit.html +++ b/templates/backOffice/default/shipping-configuration-edit.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Edit a shipping configuration'}{/block} {block name="check-resource"}admin.configuration.shipping-configuration{/block} diff --git a/templates/backOffice/default/shipping-configuration.html b/templates/backOffice/default/shipping-configuration.html index ae662816f..8eccb4dfc 100644 --- a/templates/backOffice/default/shipping-configuration.html +++ b/templates/backOffice/default/shipping-configuration.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Thelia Shipping configuration'}{/block} {block name="check-resource"}admin.configuration.shipping-configuration{/block} diff --git a/templates/backOffice/default/shipping-zones-edit.html b/templates/backOffice/default/shipping-zones-edit.html index 8a18a1f59..50712820f 100644 --- a/templates/backOffice/default/shipping-zones-edit.html +++ b/templates/backOffice/default/shipping-zones-edit.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Edit a shipping zone'}{/block} {block name="check-resource"}admin.configuration.shipping-zone{/block} diff --git a/templates/backOffice/default/shipping-zones.html b/templates/backOffice/default/shipping-zones.html index 6382930d2..fde6589eb 100644 --- a/templates/backOffice/default/shipping-zones.html +++ b/templates/backOffice/default/shipping-zones.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Thelia Shipping zones'}{/block} {block name="check-resource"}admin.configuration.shipping-zone{/block} diff --git a/templates/backOffice/default/system-logs.html b/templates/backOffice/default/system-logs.html index 4bf8a1f60..4601c39d7 100644 --- a/templates/backOffice/default/system-logs.html +++ b/templates/backOffice/default/system-logs.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='System Logs'}{/block} {block name="check-resource"}admin.configuration.variable{/block} diff --git a/templates/backOffice/default/tax-edit.html b/templates/backOffice/default/tax-edit.html index 31ff9ccd9..b073d9304 100644 --- a/templates/backOffice/default/tax-edit.html +++ b/templates/backOffice/default/tax-edit.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Edit a tax'}{/block} {block name="check-resource"}admin.configuration.tax{/block} diff --git a/templates/backOffice/default/tax-rule-edit.html b/templates/backOffice/default/tax-rule-edit.html index 06c3f4e38..71c638e0b 100644 --- a/templates/backOffice/default/tax-rule-edit.html +++ b/templates/backOffice/default/tax-rule-edit.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Edit a tax rule'}{/block} {block name="check-resource"}admin.configuration.tax{/block} diff --git a/templates/backOffice/default/taxes-rules.html b/templates/backOffice/default/taxes-rules.html index 84cd6f2d6..72cc3763a 100644 --- a/templates/backOffice/default/taxes-rules.html +++ b/templates/backOffice/default/taxes-rules.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Taxes rules'}{/block} {block name="check-resource"}admin.configuration.tax{/block} diff --git a/templates/backOffice/default/template-edit.html b/templates/backOffice/default/template-edit.html index 82d66057a..6c707a0aa 100644 --- a/templates/backOffice/default/template-edit.html +++ b/templates/backOffice/default/template-edit.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Edit a template'}{/block} {block name="check-resource"}admin.configuration.template{/block} diff --git a/templates/backOffice/default/templates.html b/templates/backOffice/default/templates.html index 0e9370b25..b12d857ee 100644 --- a/templates/backOffice/default/templates.html +++ b/templates/backOffice/default/templates.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Thelia Product Templates'}{/block} {block name="check-resource"}admin.configuration.template{/block} diff --git a/templates/backOffice/default/tools.html b/templates/backOffice/default/tools.html index f21d9cbc9..b97263508 100644 --- a/templates/backOffice/default/tools.html +++ b/templates/backOffice/default/tools.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'tools'} +{/block} + {block name="page-title"}{intl l='Tools'}{/block} {block name="check-resource"}admin.tools{/block} diff --git a/templates/backOffice/default/translations.html b/templates/backOffice/default/translations.html index fbe0321d4..c67d59fe0 100644 --- a/templates/backOffice/default/translations.html +++ b/templates/backOffice/default/translations.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Translations'}{/block} {block name="check-resource"}admin.configuration.variable{/block} diff --git a/templates/backOffice/default/variable-edit.html b/templates/backOffice/default/variable-edit.html index 05d831e6f..a54c7b4f6 100644 --- a/templates/backOffice/default/variable-edit.html +++ b/templates/backOffice/default/variable-edit.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Edit a system variable'}{/block} {block name="check-resource"}admin.configuration.variable{/block} diff --git a/templates/backOffice/default/variables.html b/templates/backOffice/default/variables.html index a31dababa..da60dedb3 100644 --- a/templates/backOffice/default/variables.html +++ b/templates/backOffice/default/variables.html @@ -1,5 +1,9 @@ {extends file="admin-layout.tpl"} +{block name="no-return-functions"} + {$admin_current_location = 'configuration'} +{/block} + {block name="page-title"}{intl l='Thelia System Variables'}{/block} {block name="check-resource"}admin.configuration.variable{/block}