diff --git a/controllers/admin/AdminSuppliersController.php b/controllers/admin/AdminSuppliersController.php index 22e30efb4..bfe5618a3 100644 --- a/controllers/admin/AdminSuppliersController.php +++ b/controllers/admin/AdminSuppliersController.php @@ -94,7 +94,8 @@ class AdminSuppliersControllerCore extends AdminController 'rows' => 10, 'lang' => true, 'hint' => $this->l('Invalid characters:').' <>;=#{}', - 'desc' => $this->l('Will appear in the supplier list') + 'desc' => $this->l('Will appear in the supplier list'), + 'autoload_rte' => 'rte' //Enable TinyMCE editor for short description ), array( 'type' => 'text', diff --git a/modules/blocktopmenu/blocktopmenu.php b/modules/blocktopmenu/blocktopmenu.php index 724ea4da3..a5eb3b3c5 100644 --- a/modules/blocktopmenu/blocktopmenu.php +++ b/modules/blocktopmenu/blocktopmenu.php @@ -221,6 +221,8 @@ class Blocktopmenu extends Module // BEGIN SUPPLIER $this->_html .= ''; + // Option to show all Suppliers + $this->_html .= ''; $suppliers = Supplier::getSuppliers(false, $id_lang); foreach ($suppliers as $supplier) $this->_html .= ''; @@ -228,6 +230,8 @@ class Blocktopmenu extends Module // BEGIN Manufacturer $this->_html .= ''; + // Option to show all Manufacturers + $this->_html .= ''; $manufacturers = Manufacturer::getManufacturers(false, $id_lang); foreach ($manufacturers as $manufacturer) $this->_html .= ''; @@ -472,12 +476,22 @@ class Blocktopmenu extends Module $this->_html .= ''.PHP_EOL; break; + // Case to handle the option to show all Manufacturers + case 'ALLMAN': + $this->_html .= ''.PHP_EOL; + break; + case 'MAN': $manufacturer = new Manufacturer((int)$id, (int)$id_lang); if (Validate::isLoadedObject($manufacturer)) $this->_html .= ''.PHP_EOL; break; + // Case to handle the option to show all Suppliers + case 'ALLSUP': + $this->_html .= ''.PHP_EOL; + break; + case 'SUP': $supplier = new Supplier((int)$id, (int)$id_lang); if (Validate::isLoadedObject($supplier)) @@ -549,6 +563,16 @@ class Blocktopmenu extends Module } break; + // Case to handle the option to show all Manufacturers + case 'ALLMAN': + $link = new Link; + $this->_menu .= '
  • '.$this->l('All manufacturers').'
      '.PHP_EOL; + $manufacturers = Manufacturer::getManufacturers(); + foreach ($manufacturers as $key => $manufacturer) + $this->_menu .= '
    • '.$manufacturer['name'].'
    • '.PHP_EOL; + $this->_menu .= '
    '; + break; + case 'MAN': $selected = ($this->page_name == 'manufacturer' && (Tools::getValue('id_manufacturer') == $id)) ? ' class="sfHover"' : ''; $manufacturer = new Manufacturer((int)$id, (int)$id_lang); @@ -563,6 +587,16 @@ class Blocktopmenu extends Module } break; + // Case to handle the option to show all Suppliers + case 'ALLSUP': + $link = new Link; + $this->_menu .= '
  • '.$this->l('All suppliers').'
      '.PHP_EOL; + $suppliers = Supplier::getSuppliers(); + foreach ($suppliers as $key => $supplier) + $this->_menu .= '
    • '.$supplier['name'].'
    • '.PHP_EOL; + $this->_menu .= '
    '; + break; + case 'SUP': $selected = ($this->page_name == 'supplier' && (Tools::getValue('id_supplier') == $id)) ? ' class="sfHover"' : ''; $supplier = new Supplier((int)$id, (int)$id_lang); @@ -896,4 +930,4 @@ class Blocktopmenu extends Module } -} \ No newline at end of file +}