Add store_description field for SEO

This commit is contained in:
Michaël Espeche
2014-06-26 14:25:04 +02:00
parent 6661341eb4
commit 202969fde9
8 changed files with 30 additions and 6 deletions

View File

@@ -271,6 +271,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',

View File

@@ -271,6 +271,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',

View File

@@ -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',

View File

@@ -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"),

View File

@@ -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(),

View File

@@ -39,6 +39,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()),

View File

@@ -65,6 +65,16 @@
</div>
{/form_field}
{form_field form=$form field='store_description'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{$label}:{if $required} <span class="required">*</span>{/if}</label>
<div class="form-group">
<textarea name="{$name}" id="{$label_attr.for}" title="{$label}" class="form-control" placeholder="{intl l='Used in your store front'}" rows="3"{if $required} aria-required="true" required{/if}>{$value}</textarea>
</div>
</div>
{/form_field}
{form_field form=$form field='store_business_id'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{$label}:{if $required} <span class="required">*</span>{/if}</label>

View File

@@ -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 *}
<!--[if lt IE 7 ]><html class="no-js oldie ie6" lang="{lang attr="code"}"> <![endif]-->
@@ -49,7 +51,7 @@ GNU General Public License : http://www.gnu.org/licenses/
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
{block name="meta"}
<meta name="description" content="{if $page_description}{$page_description}{else}{$store_name}{/if}">
<meta name="description" content="{if $page_description}{$page_description}{else}{$store_description}{/if}">
<meta name="robots" content="noindex,nofollow">
{/block}