From f5e7467c86b62d85c637f8694be7c740478a4c0b Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Mon, 9 Sep 2013 21:40:58 +0200 Subject: [PATCH] start creating register and login pages --- .../Thelia/Config/Resources/routing/front.xml | 11 ++ .../Smarty/Plugins/DataAccessFunctions.php | 12 ++ templates/default/index.html | 10 +- templates/default/layout.tpl | 8 +- templates/default/login.html | 51 ++++++ templates/default/register.html | 164 ++++++++++++++++++ 6 files changed, 246 insertions(+), 10 deletions(-) create mode 100644 templates/default/login.html create mode 100644 templates/default/register.html diff --git a/core/lib/Thelia/Config/Resources/routing/front.xml b/core/lib/Thelia/Config/Resources/routing/front.xml index aeff55d7c..2a1afb2c4 100755 --- a/core/lib/Thelia/Config/Resources/routing/front.xml +++ b/core/lib/Thelia/Config/Resources/routing/front.xml @@ -15,6 +15,11 @@ connexion + + Thelia\Controller\Front\DefaultController::noAction + register + + Thelia\Controller\Front\CustomerController::updateAction @@ -23,9 +28,15 @@ Thelia\Controller\Front\CustomerController::loginAction + + Thelia\Controller\Front\DefaultController::noAction + login + + Thelia\Controller\Front\CustomerController::logoutAction + diff --git a/core/lib/Thelia/Core/Template/Smarty/Plugins/DataAccessFunctions.php b/core/lib/Thelia/Core/Template/Smarty/Plugins/DataAccessFunctions.php index 85c2c1709..fded12c0e 100755 --- a/core/lib/Thelia/Core/Template/Smarty/Plugins/DataAccessFunctions.php +++ b/core/lib/Thelia/Core/Template/Smarty/Plugins/DataAccessFunctions.php @@ -151,6 +151,17 @@ class DataAccessFunctions extends AbstractSmartyPlugin } } + /** + * Lang global data + * + * @param $params + * @param $smarty + */ + public function langDataAccess($params, $smarty) + { + return $this->dataAccess("Lang", $params, $this->request->getSession()->getLang()); + } + /** * @param $objectLabel * @param $params @@ -251,6 +262,7 @@ class DataAccessFunctions extends AbstractSmartyPlugin new SmartyPluginDescriptor('function', 'content', $this, 'contentDataAccess'), new SmartyPluginDescriptor('function', 'folder', $this, 'folderDataAccess'), new SmartyPluginDescriptor('function', 'currency', $this, 'currencyDataAccess'), + new SmartyPluginDescriptor('function', 'lang', $this, 'langDataAccess'), ); } } diff --git a/templates/default/index.html b/templates/default/index.html index f9cdeed1c..77f6359ae 100644 --- a/templates/default/index.html +++ b/templates/default/index.html @@ -1,9 +1,5 @@ {extends file="layout.tpl"} -{block name="page-title" append} - homepage -{/block} - {block name="main-content"}