diff --git a/core/lib/Thelia/Config/I18n/en_US.php b/core/lib/Thelia/Config/I18n/en_US.php index 688cbf762..7e360de02 100644 --- a/core/lib/Thelia/Config/I18n/en_US.php +++ b/core/lib/Thelia/Config/I18n/en_US.php @@ -282,6 +282,7 @@ return array( 'Store logs into text file' => 'Store logs into text file', 'Store logs into text file, up to a certian size, then a new file is created' => 'Store logs into text file, up to a certian size, then a new file is created', 'Store name' => 'Store name', + 'Store description' => 'Store description', 'Street Address' => 'Street Address', 'Street Address ' => 'Street Address ', 'Strictly use the requested language' => 'Strictly use the requested language', diff --git a/core/lib/Thelia/Config/I18n/fr_FR.php b/core/lib/Thelia/Config/I18n/fr_FR.php index cb9062a1f..a144cff98 100644 --- a/core/lib/Thelia/Config/I18n/fr_FR.php +++ b/core/lib/Thelia/Config/I18n/fr_FR.php @@ -282,6 +282,7 @@ return array( 'Store logs into text file' => 'Conserver les logs dans des fichiers texte', 'Store logs into text file, up to a certian size, then a new file is created' => 'Sauvegarder les logs dans un fichier texte. A partir d\'une certaine taille un nouveau fichier est créé', 'Store name' => 'Nom du magasin', + 'Store description' => 'Description du magasin', 'Street Address' => 'Adresse', 'Street Address ' => 'Rue', 'Strictly use the requested language' => 'Utiliser strictement la langue demandée', diff --git a/core/lib/Thelia/Config/I18n/it_IT.php b/core/lib/Thelia/Config/I18n/it_IT.php index 265f136eb..aaf07cd43 100644 --- a/core/lib/Thelia/Config/I18n/it_IT.php +++ b/core/lib/Thelia/Config/I18n/it_IT.php @@ -160,6 +160,7 @@ return array( 'Store logs into text file' => 'Archiviare i log in un file di testo', 'Store logs into text file, up to a certian size, then a new file is created' => 'Archiviare i log in un file di testo, fino ad una certa dimensione, dopo viene creato un nuovo file', 'Store name' => 'Nome del negozio', + 'Store description' => 'Descrizione del negozio', 'Street Address' => 'Indirizzo', 'Street Address ' => 'Indirizzo ', 'Strictly use the requested language' => 'Utilizzare rigorosamente la lingua richiesta', diff --git a/core/lib/Thelia/Controller/Admin/ConfigStoreController.php b/core/lib/Thelia/Controller/Admin/ConfigStoreController.php index e76959864..0e7fb8090 100644 --- a/core/lib/Thelia/Controller/Admin/ConfigStoreController.php +++ b/core/lib/Thelia/Controller/Admin/ConfigStoreController.php @@ -36,6 +36,7 @@ class ConfigStoreController extends BaseAdminController // Hydrate the store configuration form $configStoreForm = new ConfigStoreForm($this->getRequest(), 'form', array( 'store_name' => ConfigQuery::read("store_name"), + 'store_description' => ConfigQuery::read("store_description"), 'store_email' => ConfigQuery::read("store_email"), 'store_business_id' => ConfigQuery::read("store_business_id"), 'store_phone' => ConfigQuery::read("store_phone"), diff --git a/core/lib/Thelia/Form/ConfigStoreForm.php b/core/lib/Thelia/Form/ConfigStoreForm.php index b7b49b2a0..ee9eb193e 100644 --- a/core/lib/Thelia/Form/ConfigStoreForm.php +++ b/core/lib/Thelia/Form/ConfigStoreForm.php @@ -29,6 +29,13 @@ class ConfigStoreForm extends BaseForm "for" => "store_name" ) )) + ->add("store_description", "text", array( + "label" => Translator::getInstance()->trans('Store description'), + "label_attr" => array( + "for" => "store_description" + ), + "required" => false + )) ->add("store_email", "text", array( "constraints" => array( new Constraints\NotBlank(), diff --git a/setup/insert.sql b/setup/insert.sql index 59e546512..a3ad537b1 100644 --- a/setup/insert.sql +++ b/setup/insert.sql @@ -40,6 +40,7 @@ INSERT INTO `config` (`name`, `value`, `secured`, `hidden`, `created_at`, `updat ('session_config.default', '1', 1, 1, NOW(), NOW()), ('default_lang_without_translation', '1', 1, 1, NOW(), NOW()), ('store_name','', 0, 1, NOW(), NOW()), +('store_description','', 0, 1, NOW(), NOW()), ('store_email','', 0, 1, NOW(), NOW()), ('one_domain_foreach_lang','0', 1, 1, NOW(), NOW()), ('thelia_version','2.0.2', 1, 1, NOW(), NOW()), diff --git a/setup/update/2.0.3.sql b/setup/update/2.0.3.sql index cd465fd61..2fee9090f 100644 --- a/setup/update/2.0.3.sql +++ b/setup/update/2.0.3.sql @@ -6,6 +6,9 @@ UPDATE `config` SET `value`='2.0.3' WHERE `name`='thelia_version'; UPDATE `config` SET `value`='3' WHERE `name`='thelia_release_version'; UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version'; +INSERT INTO `config` (`name`, `value`, `secured`, `hidden`, `created_at`, `updated_at`) VALUES +('store_description', '', 0, 0, NOW(), NOW()); + # Add new column to order (version, version_created_at, version_created_by) ALTER TABLE `order` ADD `version` INT DEFAULT 0 AFTER `updated_at`; diff --git a/templates/backOffice/default/config-store.html b/templates/backOffice/default/config-store.html index dd648a943..61e302e8e 100644 --- a/templates/backOffice/default/config-store.html +++ b/templates/backOffice/default/config-store.html @@ -56,13 +56,23 @@
{form_field form=$form field='store_name'} -
- +
+ -
- -
+
+
+
+ {/form_field} + + {form_field form=$form field='store_description'} +
+ + +
+ +
+
{/form_field} {form_field form=$form field='store_business_id'} diff --git a/templates/backOffice/default/message-edit.html b/templates/backOffice/default/message-edit.html index 1e6adc0ae..290242fa3 100644 --- a/templates/backOffice/default/message-edit.html +++ b/templates/backOffice/default/message-edit.html @@ -116,7 +116,7 @@ {form_field form=$form field='html_template_file_name'}
- {foreach $html_template_list as $template} @@ -132,11 +132,12 @@
{form_field form=$form field='html_message'}
-
{/form_field}
@@ -167,7 +168,7 @@ {form_field form=$form field='text_template_file_name'}
- {foreach $text_template_list as $template} @@ -183,11 +184,12 @@
{form_field form=$form field='text_message'}
-
{/form_field}
@@ -224,18 +226,39 @@ {/block} {block name="javascript-initialization"} + {/block} diff --git a/templates/frontOffice/default/layout.tpl b/templates/frontOffice/default/layout.tpl index 914d003ca..66354fd7b 100644 --- a/templates/frontOffice/default/layout.tpl +++ b/templates/frontOffice/default/layout.tpl @@ -27,7 +27,9 @@ GNU General Public License : http://www.gnu.org/licenses/ {block name="no-return-functions"}{/block} {assign var="store_name" value="{config key="store_name"}"} +{assign var="store_description" value="{config key="store_description"}"} {if not $store_name}{assign var="store_name" value="{intl l='Thelia V2'}"}{/if} +{if not $store_description}{assign var="store_description" value="$store_name"}{/if} {* paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither *} @@ -49,7 +51,7 @@ GNU General Public License : http://www.gnu.org/licenses/ {block name="meta"} - + {/block}