public function InitToolbar() { if (version_compare(_PS_VERSION_, '1.6.0', '<=') === true) { if ($this->display == '') { $this->toolbar_btn['update-selection'] = array('href' => 'javascript:void(0)', 'desc' => $this->l('Multiple change of status'), 'class' => 'process-icon-duplicate'); if ($this->controller_status) { $this->toolbar_btn['expedition'] = array('href' => 'javascript:void(0)', 'desc' => $this->l('Shipment'), 'class' => 'process-icon-new add_product'); } $this->toolbar_btn['print_invoices_delivery'] = array('href' => '#', 'desc' => $this->l('Print documents'), 'class' => 'process-icon-preview'); parent::initToolbar(); $this->toolbar_btn['new'] = array('href' => 'index.php?controller=AdminOrders&add' . $this->table . '&token=' . Tools::getAdminToken('AdminOrders' . (int) Tab::getIdFromClassName('AdminOrders') . (int) $this->context->employee->id), 'desc' => $this->l('Add new'), 'target' => '_blank'); } } }
public function InitToolbar() { if (version_compare(_PS_VERSION_, '1.6.0', '<=') === true) { switch ($this->display) { default: parent::initToolbar(); $this->toolbar_btn['import'] = array('href' => $this->context->link->getAdminLink('AdminImport', true) . '&import_type=suppliers', 'desc' => $this->l('Import')); } return parent::initToolbar(); } }
/** * Assigns default actions in toolbar_btn smarty var, if they are not set. * uses override to specifically add, modify or remove items * @see AdminSupplier::initToolbar() */ public function initToolbar() { $id_supply_order = (int) Tools::getValue('id_supply_order'); unset($this->toolbar_btn['duplicate']); unset($this->toolbar_btn['generate-supply-orders']); switch ($this->display) { case null: if (version_compare(_PS_VERSION_, '1.6.0', '<=') === true) { if ($this->controller_status && !$this->is_template_list) { /*$this->toolbar_btn['duplicate'] = array( 'short' => 'Billing with many orders', 'href' => 'javascript:void(0)', 'desc' => $this->l('Billing with several orders'));*/ $this->toolbar_btn['generate-supply-orders'] = array('short' => $this->l('Generate Supply Orders'), 'href' => $this->context->link->getAdminLink('AdminGenerateSupplyOrders'), 'desc' => html_entity_decode($this->l('Generate Supply Orders'))); $this->toolbar_btn['save'] = array('short' => $this->l('Export orders'), 'href' => $this->context->link->getAdminLink('AdminAdvancedSupplyOrder') . '&csv_orders&id_warehouse=' . $this->getCurrentWarehouse() . '&id_supplier=' . $this->getCurrentSupplier(), 'desc' => html_entity_decode($this->l('Export orders'))); $this->toolbar_btn['save-and-stay'] = array('short' => $this->l('Export orders details'), 'href' => $this->context->link->getAdminLink('AdminAdvancedSupplyOrder') . '&csv_orders_details&id_warehouse=' . $this->getCurrentWarehouse() . '&id_supplier=' . $this->getCurrentSupplier(), 'desc' => html_entity_decode($this->l('Export orders details'))); } } break; case 'update_order_state': $this->toolbar_btn['save'] = array('href' => '#', 'desc' => $this->l('Save')); case 'update_receipt': // Default cancel button - like old back link if (!isset($this->no_back) || $this->no_back == false) { $back = Tools::safeOutput(Tools::getValue('back', '')); if (empty($back)) { $back = self::$currentIndex . '&token=' . $this->token; } $this->toolbar_btn['cancel'] = array('href' => $back, 'desc' => $this->l('Cancel')); $this->toolbar_btn['save'] = array('short' => $this->l('Export history'), 'href' => $this->context->link->getAdminLink('AdminAdvancedSupplyOrder') . '&export_history&id_supply_order=' . Tools::getValue('id_supply_order'), 'desc' => html_entity_decode($this->l('Export history'))); } break; case 'view': $back = Tools::safeOutput(Tools::getValue('back', '')); if (empty($back)) { $back = self::$currentIndex . '&token=' . $this->token; } if (!Validate::isCleanHtml($back)) { die(Tools::displayError()); } if (!$this->lite_display) { $this->toolbar_btn['back'] = array('href' => $back, 'desc' => $this->l('Back to list')); } break; case 'add': case 'edit': if (version_compare(_PS_VERSION_, '1.6.0', '<=') === true) { $this->toolbar_btn['export-csv-orders'] = array('short' => 'Export current stock', 'href' => $this->context->link->getAdminLink('AdminAdvancedSupplyOrder') . '&id_supply_order=' . $id_supply_order . '&updatesupply_order&export_csv', 'desc' => $this->l('Export supply orders products')); } $this->toolbar_btn['save-and-stay'] = array('href' => '#', 'desc' => $this->l('Save and stay')); default: parent::initToolbar(); } parent::initToolbar(); if ($this->display == 'update_order_state') { unset($this->toolbar_btn['new']); } }
public function InitToolbar() { if ($this->display == '') { if (!$this->is_1_6) { $this->toolbar_btn['simulate'] = array('href' => 'javascript:void(0)', 'desc' => $this->l('Simulate'), 'class' => 'process-icon-preview'); } } if ($this->display == 'simulate') { $this->toolbar_btn[$this->is_1_6 ? 'refresh' : 'generate-supply-orders'] = array('short' => 'Generate', 'href' => '#', 'desc' => $this->l('Generate'), 'class' => 'process-icon-refresh-index'); } if ($this->display == 'simulate' || $this->display == 'ordering') { $this->toolbar_btn['back_order_list'] = array('short' => $this->l('Return to orders list'), 'href' => $this->context->link->getAdminLink('AdminGenerateSupplyOrders'), 'desc' => $this->l('Return to orders list'), 'class' => 'process-icon-back'); } parent::initToolbar(); unset($this->toolbar_btn['new']); }
public function InitToolbar() { return parent::initToolbar(); }
public function initToolbar() { parent::initToolbar(); unset($this->toolbar_btn['new']); if ($this->display != 'add' && $this->display != 'edit') { if (!$this->is_1_6) { $this->toolbar_btn['new'] = array('href' => self::$currentIndex . '&add' . $this->table . '&token=' . $this->token . '&id_parent=' . Tools::getValue('id_erpip_zone') . '&id_warehouse=' . Tools::getValue('id_warehouse') . '&warehouse_name=' . Tools::getValue('warehouse_name') . '&zone_name=' . Tools::getValue('zone_name') . '&display=add', 'desc' => $this->l('Add new')); } } if (!empty($this->display) || Tools::isSubmit('id_erpip_zone')) { $this->toolbar_btn['back'] = array('href' => self::$currentIndex . '&token=' . $this->token, 'desc' => $this->l('Back')); $this->toolbar_btn['save'] = array('href' => self::$currentIndex . '&add' . $this->table . '&token=' . $this->token . '&export_csv', 'desc' => $this->l('Export')); } }