// Merge -> revision 9385

This commit is contained in:
rMalie
2011-10-17 09:55:33 +00:00
parent e6f45e54a6
commit f1d5a3bf77
15 changed files with 51 additions and 17 deletions
+17 -2
View File
@@ -85,6 +85,9 @@ class BlockCategories extends Module
Configuration::updateValue('BLOCK_CATEG_MAX_DEPTH', (int)($maxDepth));
Configuration::updateValue('BLOCK_CATEG_DHTML', (int)($dhtml));
Configuration::updateValue('BLOCK_CATEG_NBR_COLUMN_FOOTER', $nbrColumns);
Configuration::updateValue('BLOCK_CATEG_SORT_WAY', Tools::getValue('BLOCK_CATEG_SORT_WAY'));
Configuration::updateValue('BLOCK_CATEG_SORT', Tools::getValue('BLOCK_CATEG_SORT'));
$this->_clearBlockcategoriesCache();
$output .= '<div class="conf confirm"><img src="../img/admin/ok.gif" alt="'.$this->l('Confirmation').'" />'.$this->l('Settings updated').'</div>';
}
@@ -112,6 +115,18 @@ class BlockCategories extends Module
<label class="t" for="dhtml_off"> <img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" /></label>
<p class="clear">'.$this->l('Activate dynamic (animated) mode for sublevels').'</p>
</div>
<label>'.$this->l('Sort').'</label>
<div class="margin-form">
<input type="radio" name="BLOCK_CATEG_SORT" id="sort_on" value="0" '.(!Tools::getValue('BLOCK_CATEG_SORT', Configuration::get('BLOCK_CATEG_SORT')) ? 'checked="checked" ' : '').'/>
<label class="t" for="sort_on"> <img src="../modules/'.$this->name.'/sort_number.png" alt="'.$this->l('Enabled').'" title="'.$this->l('By position').'" />'.$this->l('By position').'</label>
<input type="radio" name="BLOCK_CATEG_SORT" id="sort_off" value="1" '.(Tools::getValue('BLOCK_CATEG_SORT', Configuration::get('BLOCK_CATEG_SORT')) ? 'checked="checked" ' : '').'/>
<label class="t" for="sort_off"> <img src="../modules/'.$this->name.'/sort_alphabet.png" alt="'.$this->l('Disabled').'" title="'.$this->l('By name').'" />'.$this->l('By name').'</label> -
<select name="BLOCK_CATEG_SORT_WAY">
<option value="0" '.(!Tools::getValue('BLOCK_CATEG_SORT_WAY', Configuration::get('BLOCK_CATEG_SORT_WAY')) ? 'selected="selected" ' : '').'>'.$this->l('Ascending').'</option>
<option value="1" '.(Tools::getValue('BLOCK_CATEG_SORT_WAY', Configuration::get('BLOCK_CATEG_SORT_WAY')) ? 'selected="selected" ' : '').'>'.$this->l('Descending').'</option>
</select>
</div>
<label>'.$this->l('Footer columns number').'</label>
<div class="margin-form">
<input type="text" name="nbrColumns" value="'.Configuration::get('BLOCK_CATEG_NBR_COLUMN_FOOTER').'" />
@@ -165,7 +180,7 @@ class BlockCategories extends Module
'.((int)($maxdepth) != 0 ? ' AND `level_depth` <= '.(int)($maxdepth) : '').'
AND cg.`id_group` IN ('.pSQL($groups).')
GROUP BY id_category
ORDER BY `level_depth` ASC, c.`position` ASC')
ORDER BY `level_depth` ASC, '.(Configuration::get('BLOCK_CATEG_SORT') ? 'cl.`name`' : 'c.`position`').' '.(Configuration::get('BLOCK_CATEG_SORT_WAY') ? 'DESC' : 'ASC'))
)
return;
@@ -237,7 +252,7 @@ class BlockCategories extends Module
WHERE (c.`active` = 1 OR c.`id_category` = 1)
'.((int)($maxdepth) != 0 ? ' AND `level_depth` <= '.(int)($maxdepth) : '').'
AND cg.`id_group` IN ('.pSQL($groups).')
ORDER BY `level_depth` ASC, c.`position` ASC')
ORDER BY `level_depth` ASC, '.(Configuration::get('BLOCK_CATEG_SORT') ? 'cl.`name`' : 'c.`position`').' '.(Configuration::get('BLOCK_CATEG_SORT_WAY') ? 'DESC' : 'ASC'))
)
return;
$resultParents = array();
+5
View File
@@ -15,6 +15,11 @@ $_MODULE['<{blockcategories}prestashop>blockcategories_971fd8cc345d8bd9f92e9f7d8
$_MODULE['<{blockcategories}prestashop>blockcategories_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé';
$_MODULE['<{blockcategories}prestashop>blockcategories_b9f5c797ebbf55adccdd8539a65a0241'] = 'Desactivé';
$_MODULE['<{blockcategories}prestashop>blockcategories_2c1199ee18b344152f35ec237acb5796'] = 'Activer l\'arbre dynamique (animé)';
$_MODULE['<{blockcategories}prestashop>blockcategories_6b46ae48421828d9973deec5fa9aa0c3'] = 'Trier';
$_MODULE['<{blockcategories}prestashop>blockcategories_883f0bd41a4fcee55680446ce7bec0d9'] = 'par position';
$_MODULE['<{blockcategories}prestashop>blockcategories_54e4f98fb34254a6678f0795476811ed'] = 'par nom';
$_MODULE['<{blockcategories}prestashop>blockcategories_cf3fb1ff52ea1eed3347ac5401ee7f0c'] = 'croissant';
$_MODULE['<{blockcategories}prestashop>blockcategories_e3cf5ac19407b1a62c6fccaff675a53b'] = 'décroissant';
$_MODULE['<{blockcategories}prestashop>blockcategories_4f32360218e145e3ba681a2343015eb3'] = 'Nombre de colonnes pour le footer';
$_MODULE['<{blockcategories}prestashop>blockcategories_3d81ca758785a8528208613752ad2c81'] = 'Détermine le nombre de colonne pour le footer';
$_MODULE['<{blockcategories}prestashop>blockcategories_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer';
Binary file not shown.

After

Width:  |  Height:  |  Size: 588 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B