// better message for Theme edition + french translation
This commit is contained in:
1 parent
abbb67528b
commit
7102e90f13
3 files changed
+525
-511
No files matched your search
@@ -122,7 +122,8 @@ class ShopCore extends ObjectModel
|
|||||||
parent::__construct($id, $id_lang, $id_shop);
|
parent::__construct($id, $id_lang, $id_shop);
|
||||||
if ($this->id)
|
if ($this->id)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT su.physical_uri, su.virtual_uri, su.domain, su.domain_ssl, t.name, t.directory
|
$sql = 'SELECT su.physical_uri, su.virtual_uri,
|
||||||
|
su.domain, su.domain_ssl, t.id_theme, t.name, t.directory
|
||||||
FROM '._DB_PREFIX_.'shop s
|
FROM '._DB_PREFIX_.'shop s
|
||||||
LEFT JOIN '._DB_PREFIX_.'shop_url su ON (s.id_shop = su.id_shop)
|
LEFT JOIN '._DB_PREFIX_.'shop_url su ON (s.id_shop = su.id_shop)
|
||||||
LEFT JOIN '._DB_PREFIX_.'theme t ON (t.id_theme = s.id_theme)
|
LEFT JOIN '._DB_PREFIX_.'theme t ON (t.id_theme = s.id_theme)
|
||||||
@@ -133,6 +134,7 @@ class ShopCore extends ObjectModel
|
|||||||
if (!$row = Db::getInstance()->getRow($sql))
|
if (!$row = Db::getInstance()->getRow($sql))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
$this->theme_id = $row['id_theme'];
|
||||||
$this->theme_name = $row['name'];
|
$this->theme_name = $row['name'];
|
||||||
$this->theme_directory = $row['directory'];
|
$this->theme_directory = $row['directory'];
|
||||||
$this->physical_uri = $row['physical_uri'];
|
$this->physical_uri = $row['physical_uri'];
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ class AdminThemesControllerCore extends AdminController
|
|||||||
'input' => array(
|
'input' => array(
|
||||||
array(
|
array(
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'label' => $this->l('Name:'),
|
'label' => $this->l('Name of the theme:'),
|
||||||
'name' => 'name',
|
'name' => 'name',
|
||||||
'size' => 48,
|
'size' => 48,
|
||||||
'required' => true,
|
'required' => true,
|
||||||
@@ -175,19 +175,22 @@ class AdminThemesControllerCore extends AdminController
|
|||||||
{
|
{
|
||||||
$this->fields_form['input'][] = array(
|
$this->fields_form['input'][] = array(
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'label' => $this->l('Directory:'),
|
'label' => $this->l('Name of the theme\'s directory:'),
|
||||||
'name' => 'directory',
|
'name' => 'directory',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'desc' => $this->l('Note: only the existence of the directory is checked. Please be sure to select a valid theme directory.'),
|
'desc' => $this->l('If the directory does not exists, it will be created.'),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$theme_query = Theme::getThemes();
|
||||||
$this->fields_form['input'][] = array(
|
$this->fields_form['input'][] = array(
|
||||||
'type' => 'select',
|
'type' => 'select',
|
||||||
'name' => 'based_on',
|
'name' => 'based_on',
|
||||||
'label' => $this->l('Based on'),
|
'label' => $this->l('Copy missing files from existing theme:'),
|
||||||
|
'desc' => $this->l('If you create a new theme, it\'s recommended to use default theme files for basic.'),
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'id' => 'id', 'name' => 'name',
|
'id' => 'id', 'name' => 'name',
|
||||||
'default' => array('value' => 0, 'label' => ' - '),
|
'default' => array('value' => 0, 'label' => ' - '),
|
||||||
'query' => Theme::getThemes(),
|
'query' => $theme_query,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -201,7 +204,7 @@ class AdminThemesControllerCore extends AdminController
|
|||||||
'class' => 't',
|
'class' => 't',
|
||||||
'values' => $available_theme_dir,
|
'values' => $available_theme_dir,
|
||||||
'selected' => $selected_theme_dir,
|
'selected' => $selected_theme_dir,
|
||||||
'desc' => $this->l('Note: only the existence of the directory is checked. Please be sure to select a valid theme directory.'),
|
'desc' => $this->l('Please select a valid theme directory.'),
|
||||||
);
|
);
|
||||||
|
|
||||||
return parent::renderForm();
|
return parent::renderForm();
|
||||||
|
|||||||
+511
-502
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user