This commit is contained in:
rGaillard
2011-07-06 10:10:43 +00:00
parent 31d94236ac
commit d1a13007b9
4695 changed files with 0 additions and 339293 deletions
-139
View File
@@ -1,139 +0,0 @@
<?php
/*
* 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 <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision: 1.4 $
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
if (!defined('_CAN_LOAD_FILES_'))
exit;
class BlockSupplier extends Module
{
function __construct()
{
$this->name = 'blocksupplier';
$this->tab = 'front_office_features';
$this->version = 1.0;
$this->author = 'PrestaShop';
parent::__construct();
$this->displayName = $this->l('Suppliers block');
$this->description = $this->l('Adds a block displaying suppliers.');
}
function install()
{
if (!parent::install())
return false;
if (!$this->registerHook('leftColumn'))
return false;
if (!$this->registerHook('header'))
return false;
Configuration::updateValue('SUPPLIER_DISPLAY_TEXT', true);
Configuration::updateValue('SUPPLIER_DISPLAY_TEXT_NB', 5);
Configuration::updateValue('SUPPLIER_DISPLAY_FORM', true);
return true;
}
function hookLeftColumn($params)
{
global $smarty, $link;
$smarty->assign(array(
'suppliers' => Supplier::getSuppliers(false),
'link' => $link,
'text_list' => Configuration::get('SUPPLIER_DISPLAY_TEXT'),
'text_list_nb' => Configuration::get('SUPPLIER_DISPLAY_TEXT_NB'),
'form_list' => Configuration::get('SUPPLIER_DISPLAY_FORM'),
'display_link_supplier' => Configuration::get('PS_DISPLAY_SUPPLIERS')
));
return $this->display(__FILE__, 'blocksupplier.tpl');
}
function getContent()
{
$output = '<h2>'.$this->displayName.'</h2>';
if (Tools::isSubmit('submitBlockSuppliers'))
{
$text_list = (int)(Tools::getValue('text_list'));
$text_nb = (int)(Tools::getValue('text_nb'));
$form_list = (int)(Tools::getValue('form_list'));
if ($text_list AND !Validate::isUnsignedInt($text_nb))
$errors[] = $this->l('Invalid number of elements');
elseif (!$text_list AND !$form_list)
$errors[] = $this->l('Please activate at least one system list.');
else
{
Configuration::updateValue('SUPPLIER_DISPLAY_TEXT', $text_list);
Configuration::updateValue('SUPPLIER_DISPLAY_TEXT_NB', $text_nb);
Configuration::updateValue('SUPPLIER_DISPLAY_FORM', $form_list);
}
if (isset($errors) AND sizeof($errors))
$output .= $this->displayError(implode('<br />', $errors));
else
$output .= $this->displayConfirmation($this->l('Settings updated'));
}
return $output.$this->displayForm();
}
public function displayForm()
{
$output = '
<form action="'.$_SERVER['REQUEST_URI'].'" method="post">
<fieldset><legend><img src="'.$this->_path.'logo.gif" alt="" title="" />'.$this->l('Settings').'</legend>
<label>'.$this->l('Use a plain-text list').'</label>
<div class="margin-form">
<input type="radio" name="text_list" id="text_list_on" value="1" '.(Tools::getValue('text_list', Configuration::get('SUPPLIER_DISPLAY_TEXT')) ? 'checked="checked" ' : '').'/>
<label class="t" for="text_list_on"> <img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Enabled').'" /></label>
<input type="radio" name="text_list" id="text_list_off" value="0" '.(!Tools::getValue('text_list', Configuration::get('SUPPLIER_DISPLAY_TEXT')) ? 'checked="checked" ' : '').'/>
<label class="t" for="text_list_off"> <img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" /></label>
&nbsp;&nbsp;&nbsp;'.$this->l('Display').' <input type="text" size="2" name="text_nb" value="'.Tools::getValue('text_nb', Configuration::get('SUPPLIER_DISPLAY_TEXT_NB')).'" /> '.$this->l('elements').'
<p class="clear">'.$this->l('To display suppliers as a plain-text list').'</p>
</div>
<label>'.$this->l('Use a drop-down list').'</label>
<div class="margin-form">
<input type="radio" name="form_list" id="form_list_on" value="1" '.(Tools::getValue('form_list', Configuration::get('SUPPLIER_DISPLAY_FORM')) ? 'checked="checked" ' : '').'/>
<label class="t" for="form_list_on"> <img src="../img/admin/enabled.gif" alt="'.$this->l('Enabled').'" title="'.$this->l('Enabled').'" /></label>
<input type="radio" name="form_list" id="form_list_off" value="0" '.(!Tools::getValue('form_list', Configuration::get('SUPPLIER_DISPLAY_FORM')) ? 'checked="checked" ' : '').'/>
<label class="t" for="form_list_off"> <img src="../img/admin/disabled.gif" alt="'.$this->l('Disabled').'" title="'.$this->l('Disabled').'" /></label>
<p class="clear">'.$this->l('To display suppliers as a drop-down list').'</p>
</div>
<center><input type="submit" name="submitBlockSuppliers" value="'.$this->l('Save').'" class="button" /></center>
</fieldset>
</form>';
return $output;
}
function hookRightColumn($params)
{
return $this->hookLeftColumn($params);
}
function hookHeader($params)
{
Tools::addCSS(($this->_path).'blocksupplier.css', 'all');
}
}
-60
View File
@@ -1,60 +0,0 @@
{*
* 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 <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision: 1.4 $
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<!-- Block suppliers module -->
<div id="suppliers_block_left" class="block blocksupplier">
<h4>{if $display_link_supplier}<a href="{$link->getPageLink('supplier')}" title="{l s='Suppliers' mod='blocksupplier'}">{/if}{l s='Suppliers' mod='blocksupplier'}{if $display_link_supplier}</a>{/if}</h4>
<div class="block_content">
{if $suppliers}
{if $text_list}
<ul class="bullet">
{foreach from=$suppliers item=supplier name=supplier_list}
{if $smarty.foreach.supplier_list.iteration <= $text_list_nb}
<li class="{if $smarty.foreach.supplier_list.last}last_item{elseif $smarty.foreach.supplier_list.first}first_item{else}item{/if}">
<a href="{$link->getsupplierLink($supplier.id_supplier, $supplier.link_rewrite)}" title="{l s='More about' mod='blocksupplier'} {$supplier.name}">{$supplier.name|escape:'htmlall':'UTF-8'}</a>
</li>
{/if}
{/foreach}
</ul>
{/if}
{if $form_list}
<form action="{$smarty.server.SCRIPT_NAME}" method="get">
<p>
<select id="supplier_list" onchange="autoUrl('supplier_list', '');">
<option value="0">{l s='All suppliers' mod='blocksupplier'}</option>
{foreach from=$suppliers item=supplier}
<option value="{$link->getsupplierLink($supplier.id_supplier, $supplier.link_rewrite)}">{$supplier.name|escape:'htmlall':'UTF-8'}</option>
{/foreach}
</select>
</p>
</form>
{/if}
{else}
<p>{l s='No supplier' mod='blocksupplier'}</p>
{/if}
</div>
</div>
<!-- /Block suppliers module -->
-11
View File
@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blocksupplier</name>
<displayName>Suppliers block</displayName>
<version>1</version>
<description>Adds a block displaying suppliers.</description>
<author>PrestaShop</author>
<tab>front_office_features</tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
</module>
-23
View File
@@ -1,23 +0,0 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{blocksupplier}prestashop>blocksupplier_9ae42413e3cb9596efe3857f75bad3df'] = 'Zulieferer-Block';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_efc027d2b1bb88bea7bd7eff273ca4c0'] = 'Fügt einen Block hinzu, der die Zulieferer anzeigt';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_cf64d2d0bc5de5ce3d309d0e899d36fb'] = 'Ungültige Anzahl von Elementen';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_5b2e13ff6fa0da895d14bd56f2cb2d2d'] = 'Bitte aktivieren Sie mindestens eine Systemliste';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_c888438d14855d7d96a2724ee9c306bd'] = 'Einstellungen aktualisiert';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_f4f70727dc34561dfde1a3c529b6205c'] = 'Einstellungen';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_bfdff752293014f11f17122c92909ad5'] = 'Verwenden Sie eine Nur-Text-Liste';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Aktiviert';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_b9f5c797ebbf55adccdd8539a65a0241'] = 'Deaktiviert';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_b9987a246a537f4fe86f1f2e3d10dbdb'] = 'Anzeige';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_6a7f245843454cf4f28ad7c5e2572aa2'] = 'Elemente';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_e7968f07cac2995b0dd917475a04b8be'] = 'Zulieferer als Nur-Text-Liste anzeigen';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_b0fa976774d2acf72f9c62e9ab73de38'] = 'Verwenden Sie eine Dropdown-Liste';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_9df3ff87bf49ec39ccd11ae9aaaa593e'] = 'Zulieferer in einer Dropdownliste anzeigen';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_c9cc8cce247e49bae79f15173ce97354'] = 'Speichern';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_1814d65a76028fdfbadab64a5a8076df'] = 'Zulieferer';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_49fa2426b7903b3d4c89e2c1874d9346'] = 'Mehr darüber';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_ecf253735ac0cba84a9d2eeff1f1b87c'] = 'Alle Zulieferer';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_496689fbd342f80d30f1f266d060415a'] = 'Kein Zulieferer';
-4
View File
@@ -1,4 +0,0 @@
<?php
global $_MODULE;
$_MODULE = array();
-23
View File
@@ -1,23 +0,0 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{blocksupplier}prestashop>blocksupplier_9ae42413e3cb9596efe3857f75bad3df'] = 'Bloque proveedor';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_efc027d2b1bb88bea7bd7eff273ca4c0'] = 'Añadir un bloque para mostrar los proveedores';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_cf64d2d0bc5de5ce3d309d0e899d36fb'] = 'número de elementos no válido';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_5b2e13ff6fa0da895d14bd56f2cb2d2d'] = 'Por favor, elija al menos uno de la lista';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_c888438d14855d7d96a2724ee9c306bd'] = 'Configuración actualizada';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_f4f70727dc34561dfde1a3c529b6205c'] = 'Configuración';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_bfdff752293014f11f17122c92909ad5'] = 'Usar una lista de texto plano';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activado';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_b9f5c797ebbf55adccdd8539a65a0241'] = 'Desactivado';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_b9987a246a537f4fe86f1f2e3d10dbdb'] = 'Mostrar';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_6a7f245843454cf4f28ad7c5e2572aa2'] = 'elementos';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_e7968f07cac2995b0dd917475a04b8be'] = 'Para mostrar los proveedores en lista de texto plano';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_b0fa976774d2acf72f9c62e9ab73de38'] = 'Usar un cuadro combinado';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_9df3ff87bf49ec39ccd11ae9aaaa593e'] = 'Para mostrar los proveedores dentro de un cuadro combinado';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_c9cc8cce247e49bae79f15173ce97354'] = 'Guardar';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_1814d65a76028fdfbadab64a5a8076df'] = 'Proveedores';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_49fa2426b7903b3d4c89e2c1874d9346'] = 'Más sobre';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_ecf253735ac0cba84a9d2eeff1f1b87c'] = 'Todos los proveedores';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_496689fbd342f80d30f1f266d060415a'] = 'No hay proveedores';
-23
View File
@@ -1,23 +0,0 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{blocksupplier}prestashop>blocksupplier_9ae42413e3cb9596efe3857f75bad3df'] = 'Bloc fournisseurs';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_efc027d2b1bb88bea7bd7eff273ca4c0'] = 'Ajoute un bloc proposant les fournisseurs';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_cf64d2d0bc5de5ce3d309d0e899d36fb'] = 'Nombre d\'éléments invalide';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_5b2e13ff6fa0da895d14bd56f2cb2d2d'] = 'Merci d\'activer au moins un affichage de liste';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_c888438d14855d7d96a2724ee9c306bd'] = 'Paramètres mis à jour';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_f4f70727dc34561dfde1a3c529b6205c'] = 'Paramètres';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_bfdff752293014f11f17122c92909ad5'] = 'Utiliser une liste';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activé';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_b9f5c797ebbf55adccdd8539a65a0241'] = 'Désactivé';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_b9987a246a537f4fe86f1f2e3d10dbdb'] = 'Afficher';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_6a7f245843454cf4f28ad7c5e2572aa2'] = 'éléments';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_e7968f07cac2995b0dd917475a04b8be'] = 'Afficher les fournisseurs sous forme de liste';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_b0fa976774d2acf72f9c62e9ab73de38'] = 'Utiliser un menu déroulant';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_9df3ff87bf49ec39ccd11ae9aaaa593e'] = 'Afficher les fournisseurs avec un menu déroulant';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_c9cc8cce247e49bae79f15173ce97354'] = 'Enregistrer';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_1814d65a76028fdfbadab64a5a8076df'] = 'Fournisseurs';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_49fa2426b7903b3d4c89e2c1874d9346'] = 'En savoir plus à propos de';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_ecf253735ac0cba84a9d2eeff1f1b87c'] = 'Tous les fournisseurs';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_496689fbd342f80d30f1f266d060415a'] = 'Aucun fournisseur';
-23
View File
@@ -1,23 +0,0 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{blocksupplier}prestashop>blocksupplier_9ae42413e3cb9596efe3857f75bad3df'] = 'Blocco fornitori';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_efc027d2b1bb88bea7bd7eff273ca4c0'] = 'Aggiungi un blocco che mostra i fornitori';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_cf64d2d0bc5de5ce3d309d0e899d36fb'] = 'numero di elementi non valido';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_5b2e13ff6fa0da895d14bd56f2cb2d2d'] = 'Attiva almeno un elenco di sistema';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_c888438d14855d7d96a2724ee9c306bd'] = 'Impostazioni aggiornate';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_f4f70727dc34561dfde1a3c529b6205c'] = 'Impostazioni';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_bfdff752293014f11f17122c92909ad5'] = 'Utilizzare un elenco ';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Attivato';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_b9f5c797ebbf55adccdd8539a65a0241'] = 'Disattivato';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_b9987a246a537f4fe86f1f2e3d10dbdb'] = 'Visualizza';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_6a7f245843454cf4f28ad7c5e2572aa2'] = 'elementi';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_e7968f07cac2995b0dd917475a04b8be'] = 'Per visualizzare i fornitori come un elenco di testo';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_b0fa976774d2acf72f9c62e9ab73de38'] = 'Utilizza un elenco a cascata';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_9df3ff87bf49ec39ccd11ae9aaaa593e'] = 'Per visualizzare i fornitori come un elenco a cascata';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_c9cc8cce247e49bae79f15173ce97354'] = 'Salva';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_1814d65a76028fdfbadab64a5a8076df'] = 'Fornitori';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_49fa2426b7903b3d4c89e2c1874d9346'] = 'Maggiori informazioni su';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_ecf253735ac0cba84a9d2eeff1f1b87c'] = 'Tutti i fornitori';
$_MODULE['<{blocksupplier}prestashop>blocksupplier_496689fbd342f80d30f1f266d060415a'] = 'Nessun fornitore';
Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 B