From a06ebbae925a81fa56c9f856da7171538dbb8b07 Mon Sep 17 00:00:00 2001 From: mMarinetti Date: Wed, 16 Nov 2011 15:29:00 +0000 Subject: [PATCH] [+] BO : #PSFV-94 - AddonsAccount and AddonsCatalog --- admin-dev/themes/template/addons_catalog/content.tpl | 3 +++ admin-dev/themes/template/addons_myaccount/content.tpl | 2 ++ .../admin/AdminAddonsCatalogController.php | 9 ++++----- .../admin/AdminAddonsMyAccountController.php | 9 ++++----- 4 files changed, 13 insertions(+), 10 deletions(-) create mode 100644 admin-dev/themes/template/addons_catalog/content.tpl create mode 100644 admin-dev/themes/template/addons_myaccount/content.tpl rename admin-dev/tabs/AdminAddonsCatalog.php => controllers/admin/AdminAddonsCatalogController.php (71%) rename admin-dev/tabs/AdminAddonsMyAccount.php => controllers/admin/AdminAddonsMyAccountController.php (71%) diff --git a/admin-dev/themes/template/addons_catalog/content.tpl b/admin-dev/themes/template/addons_catalog/content.tpl new file mode 100644 index 000000000..5bd3128aa --- /dev/null +++ b/admin-dev/themes/template/addons_catalog/content.tpl @@ -0,0 +1,3 @@ + +
 
+ diff --git a/admin-dev/themes/template/addons_myaccount/content.tpl b/admin-dev/themes/template/addons_myaccount/content.tpl new file mode 100644 index 000000000..296f6fb1f --- /dev/null +++ b/admin-dev/themes/template/addons_myaccount/content.tpl @@ -0,0 +1,2 @@ + +
 
diff --git a/admin-dev/tabs/AdminAddonsCatalog.php b/controllers/admin/AdminAddonsCatalogController.php similarity index 71% rename from admin-dev/tabs/AdminAddonsCatalog.php rename to controllers/admin/AdminAddonsCatalogController.php index c7863aa71..2899ffc49 100644 --- a/admin-dev/tabs/AdminAddonsCatalog.php +++ b/controllers/admin/AdminAddonsCatalogController.php @@ -25,13 +25,12 @@ * International Registered Trademark & Property of PrestaShop SA */ -class AdminAddonsCatalog extends AdminTab +class AdminAddonsCatalogControllerCore extends AdminController { - public function display() + public function initContent() { - $parentDomain = Tools::getHttpHost(true).substr($_SERVER['REQUEST_URI'], 0, -1 * strlen(basename($_SERVER['REQUEST_URI']))); - echo ' -
 
'; + $this->context->smarty->assign('parentDomain', Tools::getHttpHost(true).substr($_SERVER['REQUEST_URI'], 0, -1 * strlen(basename($_SERVER['REQUEST_URI'])))); + parent::initContent(); } } diff --git a/admin-dev/tabs/AdminAddonsMyAccount.php b/controllers/admin/AdminAddonsMyAccountController.php similarity index 71% rename from admin-dev/tabs/AdminAddonsMyAccount.php rename to controllers/admin/AdminAddonsMyAccountController.php index e856cc670..613c2820a 100644 --- a/admin-dev/tabs/AdminAddonsMyAccount.php +++ b/controllers/admin/AdminAddonsMyAccountController.php @@ -25,13 +25,12 @@ * International Registered Trademark & Property of PrestaShop SA */ -class AdminAddonsMyAccount extends AdminTab +class AdminAddonsMyAccountControllerCore extends AdminController { - public function display() + public function initContent() { - $parentDomain = Tools::getHttpHost(true).substr($_SERVER['REQUEST_URI'], 0, -1 * strlen(basename($_SERVER['REQUEST_URI']))); - echo ' -
 
'; + $this->context->smarty->assign('parentDomain', Tools::getHttpHost(true).substr($_SERVER['REQUEST_URI'], 0, -1 * strlen(basename($_SERVER['REQUEST_URI'])))); + parent::initContent(); } }