From 40d2a6282b2fa6bcfd1f0a1e7b5a52e2bc096ca2 Mon Sep 17 00:00:00 2001 From: lLefevre Date: Tue, 22 Nov 2011 16:05:08 +0000 Subject: [PATCH] // fix added toolbar in AdminInformationController git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10445 b9a71923-0436-4b27-9f14-aed3839534dd --- .../themes/template/information/content.tpl | 118 -------------- .../themes/template/information/view.tpl | 150 ++++++++++++++++++ .../admin/AdminInformationController.php | 15 +- 3 files changed, 160 insertions(+), 123 deletions(-) delete mode 100755 admin-dev/themes/template/information/content.tpl create mode 100644 admin-dev/themes/template/information/view.tpl diff --git a/admin-dev/themes/template/information/content.tpl b/admin-dev/themes/template/information/content.tpl deleted file mode 100755 index e7c092c8f..000000000 --- a/admin-dev/themes/template/information/content.tpl +++ /dev/null @@ -1,118 +0,0 @@ -
- {l s='Information'} -

{l s='This information must be indicated when you report a bug on our bug tracker or if you report a problem on our forum.'}

-
-
-
- {l s='Information about your configuration'} -

{l s='Server information'}

-

- {l s='Prestashop Version'}: {$version.ps} -

- - {if count($uname)} -

- {l s='Server information'}: {$uname} -

- {/if} - -

- {l s='Server software Version'}: {$version.server} -

-

- {l s='PHP Version'}: {$version.php} -

-

- {l s='MySQL Version'}: {$version.mysql} -

- {if $apache_instaweb} -

{l s='PageSpeed module for Apache installed (mod_instaweb)'}

- {/if} - -
-

{l s='Store information'}

-

- {l s='URL of your website'}: {$shop.url} -

-

- {l s='Theme name used'}: {$shop.theme} -

-
-

{l s='Mail information'}

-

- {l s='Mail method'}: - -{if $mail} - {l s='You use PHP mail() function.'}

-{else} - {l s='You use your own SMTP parameters'}

-

- {l s='SMTP server'}: {$smtp.server} -

-

- {l s='SMTP user'}: - {if $smtp.user neq ''} - {l s='Defined'} - {else} - {l s='Not defined'} - {/if} -

-

- {l s='SMTP password'}: - {if $smtp.password neq ''} - {l s='Defined'} - {else} - {l s='Not defined'} - {/if} -

-

- {l s='Encryption'}: {$smtp.encryption} -

-

- {l s='Port'}: {$smtp.port} -

-{/if} -
-

{l s='Your information'}

-

- {l s='Information from you'}: {$user_agent} -

-
-
-
- {l s='Check your configuration'} -

- {l s='Required parameters'}: - {if !$failRequired} - OK -

- {else} - {l s='Please consult the following error(s)'} -

- - {/if} - -

- {l s='Optional parameters'}: - {if !$failOptional} - OK -

- {else} - {l s='Please consult the following error(s)'} -

- - {/if} - -
diff --git a/admin-dev/themes/template/information/view.tpl b/admin-dev/themes/template/information/view.tpl new file mode 100644 index 000000000..bf610c33a --- /dev/null +++ b/admin-dev/themes/template/information/view.tpl @@ -0,0 +1,150 @@ +{* +* 2007-2011 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2011 PrestaShop SA +* @version Release: $Revision: 8897 $ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helper/view/view.tpl"} + +{block name="override_tpl"} + +
+ {l s='Information'} +

{l s='This information must be indicated when you report a bug on our bug tracker or if you report a problem on our forum.'}

+
+
+
+ {l s='Information about your configuration'} +

{l s='Server information'}

+

+ {l s='Prestashop Version'}: {$version.ps} +

+ + {if count($uname)} +

+ {l s='Server information'}: {$uname} +

+ {/if} + +

+ {l s='Server software Version'}: {$version.server} +

+

+ {l s='PHP Version'}: {$version.php} +

+

+ {l s='MySQL Version'}: {$version.mysql} +

+ {if $apache_instaweb} +

{l s='PageSpeed module for Apache installed (mod_instaweb)'}

+ {/if} + +
+

{l s='Store information'}

+

+ {l s='URL of your website'}: {$shop.url} +

+

+ {l s='Theme name used'}: {$shop.theme} +

+
+

{l s='Mail information'}

+

+ {l s='Mail method'}: + + {if $mail} + {l s='You use PHP mail() function.'}

+ {else} + {l s='You use your own SMTP parameters'}

+

+ {l s='SMTP server'}: {$smtp.server} +

+

+ {l s='SMTP user'}: + {if $smtp.user neq ''} + {l s='Defined'} + {else} + {l s='Not defined'} + {/if} +

+

+ {l s='SMTP password'}: + {if $smtp.password neq ''} + {l s='Defined'} + {else} + {l s='Not defined'} + {/if} +

+

+ {l s='Encryption'}: {$smtp.encryption} +

+

+ {l s='Port'}: {$smtp.port} +

+ {/if} +
+

{l s='Your information'}

+

+ {l s='Information from you'}: {$user_agent} +

+
+
+
+ {l s='Check your configuration'} +

+ {l s='Required parameters'}: + {if !$failRequired} + OK +

+ {else} + {l s='Please consult the following error(s)'} +

+
    + {foreach from=$testsRequired item='value' key='key'} + {if $value eq 'fail'} +
  • {$testsErrors[$key]}
  • + {/if} + {/foreach} +
+ {/if} + +

+ {l s='Optional parameters'}: + {if !$failOptional} + OK +

+ {else} + {l s='Please consult the following error(s)'} +

+
    + {foreach from=$testsOptional item='value' key='key'} + {if $value eq 'fail'} +
  • {$testsErrors[$key]}
  • + {/if} + {/foreach} +
+ {/if} + +
+ +{/block} diff --git a/controllers/admin/AdminInformationController.php b/controllers/admin/AdminInformationController.php index c0b7a4a84..80425c180 100644 --- a/controllers/admin/AdminInformationController.php +++ b/controllers/admin/AdminInformationController.php @@ -27,13 +27,15 @@ class AdminInformationControllerCore extends AdminController { - - public function initContent() { + $this->display = 'view'; parent::initContent(); + } - $this->context->smarty->assign(array( + public function initView() + { + $this->tpl_view_vars = array( 'version' => array( 'mysql' => Db::getInstance()->getVersion(), 'php' => phpversion(), @@ -55,9 +57,12 @@ class AdminInformationControllerCore extends AdminController 'port' => Configuration::get('PS_MAIL_SMTP_PORT'), ), 'user_agent' => $_SERVER['HTTP_USER_AGENT'], - )); + ); + $this->tpl_view_vars = array_merge($this->getTestResult(), $this->tpl_view_vars); - $this->context->smarty->assign($this->getTestResult()); + $this->toolbar_title = $this->l('Tools : Informations'); + unset($this->toolbar_btn['cancel']); + return parent::initView(); } /**