/**
  * Page Header Toolbar
  */
 public function initPageHeaderToolbar()
 {
     if (Tools::getValue('action') != 'automation' || Tools::getValue('edit_id') != 'new') {
         parent::initPageHeaderToolbar();
     }
     unset($this->page_header_toolbar_btn['back']);
 }
 public function initPageHeaderToolbar()
 {
     if (empty($this->display)) {
         $this->page_header_toolbar_btn['new_accountbank'] = array('href' => self::$currentIndex . '&addaccountbank&token=' . $this->token, 'desc' => $this->l('Add new Account Bank', null, null, false), 'icon' => 'process-icon-new');
     }
     parent::initPageHeaderToolbar();
 }
 public function initPageHeaderToolbar()
 {
     $this->page_header_toolbar_btn['new_category'] = array('href' => self::$currentIndex . '&addloyaltydiscount&token=' . $this->token, 'desc' => $this->l('Add new discount', null, null, false), 'icon' => 'process-icon-new');
     if ($this->display == 'edit' && ($obj = $this->loadObject(true) && !empty($obj->id))) {
         $this->page_header_toolbar_btn['delete'] = array('short' => $this->l('Delete', null, null, false), 'href' => $this->context->link->getAdminLink(LoyaltyDiscount::ADMIN_CONTROLLER) . '&id_loyaltydiscount=' . $obj->id . '&deleteloyaltydiscount', 'desc' => $this->l('Delete this product', null, null, false), 'confirm' => 1, 'js' => 'if (confirm(\'' . $this->l('Delete this product?', null, true, false) . '\')){return true;}else{event.preventDefault();}');
     }
     parent::initPageHeaderToolbar();
 }
 /**
  *
  */
 public function initPageHeaderToolbar()
 {
     if ($this->display == 'details') {
         $this->page_header_toolbar_btn['back_to_list'] = array('href' => Context::getContext()->link->getAdminLink('AdminNowBlockFooterCms'), 'desc' => $this->module->l('Back to list', 'AdminNowBlockFooterCms'), 'icon' => 'process-icon-back');
         $this->page_header_toolbar_btn['new_link'] = array('href' => self::$currentIndex . '&addnow_block_cms_footer&token=' . $this->token . '&id_now_block_cms_footer_column=' . (int) Tools::getValue('id_now_block_cms_footer_column'), 'desc' => $this->module->l('Add new link', 'AdminNowBlockFooterCms'), 'icon' => 'process-icon-new');
     } elseif (empty($this->display)) {
         $this->page_header_toolbar_btn['new_column'] = array('href' => self::$currentIndex . '&addnow_block_cms_footer_column&token=' . $this->token, 'desc' => $this->module->l('Add new column', 'AdminNowBlockFooterCms'), 'icon' => 'process-icon-new');
     }
     parent::initPageHeaderToolbar();
 }
 public function initPageHeaderToolbar()
 {
     parent::initPageHeaderToolbar();
     $this->context->controller->addCSS(__PS_BASE_URI__ . 'modules/pspagebuilder/views/css/admin/style.css');
     if (Tools::getValue('widgetaction')) {
         $this->context->controller->addCSS(__PS_BASE_URI__ . 'modules/pspagebuilder/views/css/admin/widgetaction.css');
         return;
     }
     $this->context->controller->addJqueryUI('ui.sortable');
     $this->context->controller->addJqueryUI('ui.resizable');
     $this->context->controller->addJqueryUI('ui.dialog');
     $this->profile->widgetBeforeProcess($this);
     $this->profile->widgetBeforeProcess($this);
     if (file_exists(_PS_ROOT_DIR_ . '/js/admin/tinymce.inc.js')) {
         $tinymce_inc = _PS_JS_DIR_ . 'admin/tinymce.inc.js';
     } else {
         $tinymce_inc = _PS_JS_DIR_ . 'tinymce.inc.js';
     }
     $this->addJS(array(_PS_JS_DIR_ . 'tiny_mce/tiny_mce.js', $tinymce_inc));
     $this->addCSS(array(_PS_JS_DIR_ . 'jquery/plugins/timepicker/jquery-ui-timepicker-addon.css'));
     $this->context->controller->addJqueryPlugin('colorpicker');
     if (file_exists(_PS_THEME_DIR_ . 'modules/pspagebuilder/views/js/admin/data.js')) {
         $this->context->controller->addJS(_THEME_DIR_ . 'modules/pspagebuilder/views/js/admin/data.js');
     } else {
         $this->context->controller->addJS(__PS_BASE_URI__ . 'modules/pspagebuilder/views/js/admin/data.js');
     }
     if (file_exists(_PS_THEME_DIR_ . 'modules/pspagebuilder/views/js/admin/layout.js')) {
         $this->context->controller->addJS(_THEME_DIR_ . 'modules/pspagebuilder/views/js/admin/layout.js');
     } else {
         $this->context->controller->addJS(__PS_BASE_URI__ . 'modules/pspagebuilder/views/js/admin/layout.js');
     }
     if (file_exists(_PS_THEME_DIR_ . 'modules/pspagebuilder/views/js/admin/widget.js')) {
         $this->context->controller->addJS(_THEME_DIR_ . 'modules/pspagebuilder/views/js/admin/widget.js');
     } else {
         $this->context->controller->addJS(__PS_BASE_URI__ . 'modules/pspagebuilder/views/js/admin/widget.js');
     }
     $this->page_header_toolbar_title = $this->l('Footer Builder Editor');
     if ($this->profile->id) {
         $this->page_header_toolbar_title .= ' - ' . $this->l('Edit:') . $this->profile->name;
     } else {
         $this->page_header_toolbar_title .= ' - ' . $this->l('Create New A Profile');
     }
     $this->page_header_toolbar_btn = array();
     $this->page_header_toolbar_btn['save'] = array('href' => 'index.php?tab=AdminPspagebuilderFooter&token=' . Tools::getAdminTokenLite('AdminPspagebuilderFooter') . '&action=savelayout', 'id' => 'frmsavealll', 'desc' => $this->l('Save Layout Profile'), 'js' => "\$('#frmsavealll').submit(); return false;");
     $token = Tools::getAdminTokenLite('AdminPspagebuilderFooter');
     if ($this->profile->id) {
         $this->page_header_toolbar_btn['default'] = array('href' => 'index.php?tab=AdminPspagebuilderFooter&token=' . Tools::getAdminTokenLite('AdminPspagebuilderFooter') . '&setdefault=1&id_pagebuilderprofile=' . $this->profile->id, 'id' => 'default', 'desc' => $this->l('Set This As Default'), 'icon' => 'process-icon-save');
         $this->page_header_toolbar_btn['duplicate'] = array('short' => $this->l('Duplicate', null, null, false), 'href' => '#', 'desc' => $this->l('Duplicate', null, null, false), 'confirm' => 1, 'js' => 'if (confirm(\'' . $this->l('Are you sure to copy this?', null, true, false) . ' ?\')) document.location = \'' . $this->context->link->getAdminLink('AdminPspagebuilderFooter', null, true, false) . '&token=' . $token . '&id_pagebuilderprofile=' . (int) $this->profile->id . '&duplicateprofile\'; else document.location = \'' . $this->context->link->getAdminLink('AdminPspagebuilderFooter', null, true, false) . '&id_pagebuilderprofile=' . (int) $this->profile->id . '&token=' . $token . '\';');
         $this->page_header_toolbar_btn['export'] = array('href' => 'index.php?tab=AdminPspagebuilderFooter&token=' . Tools::getAdminTokenLite('AdminPspagebuilderFooter') . '&exportProfile=1&id_pagebuilderprofile=' . $this->profile->id, 'id' => 'export', 'desc' => $this->l('Export This'));
     }
 }
 public function initPageHeaderToolbar()
 {
     // if (empty($this->display)) {
     //     $this->page_header_toolbar_btn['new_confirmpayment'] = array(
     //         'href' => self::$currentIndex.'&addconfirmpayment&token='.$this->token,
     //         'desc' => $this->l('Add new ConfirmPayment', null, null, false),
     //         'icon' => 'process-icon-new'
     //     );
     // }
     // else if($this->display=='view') {
     // 	$id_confirmpayment = (int)Tools::getValue('id_confirmpayment');
     // 	$payment = new TableConfirmPayment((int)$id_confirmpayment);
     // 	$this->page_header_toolbar_btn['new_confirmpayment'] = array(
     //         'href' => 'index.php?controller=AdminOrders&id_order='.$payment->id_order.'&vieworder&token='.Tools::getAdminTokenLite('AdminOrders'),
     //         'desc' => $this->l('View Order', null, null, false),
     //         'icon' => 'process-icon-preview'
     //     );
     // }
     // else
     if ($this->display == 'view') {
         $id_confirmpayment = (int) Tools::getValue('id_confirmpayment');
         $payment = new TableConfirmPayment((int) $id_confirmpayment);
         if ($payment->state == 'WAITING') {
             $this->page_header_toolbar_btn['paid'] = array('href' => AdminController::$currentIndex . '&configure=' . $this->name . '&id_confirmpayment=' . $id_confirmpayment . '&paid' . $this->name . '&token=' . $this->token, 'desc' => $this->l('PAYMENT DONE', null, null, false), 'icon' => 'process-icon-payment');
             $this->page_header_toolbar_btn['cancel'] = array('href' => AdminController::$currentIndex . '&configure=' . $this->name . '&id_confirmpayment=' . $id_confirmpayment . '&cancel' . $this->name . '&token=' . $this->token, 'desc' => $this->l('PAYMENT CANCEL', null, null, false), 'icon' => 'process-icon-cancel');
             $this->page_header_toolbar_btn['postpone'] = array('href' => AdminController::$currentIndex . '&configure=' . $this->name . '&id_confirmpayment=' . $id_confirmpayment . '&postpone' . $this->name . '&token=' . $this->token, 'desc' => $this->l('PAYMENT POSTPONE', null, null, false), 'icon' => 'process-icon-dropdown');
         } else {
             if ($payment->state == 'PAID') {
                 $this->page_header_toolbar_btn['waiting'] = array('href' => AdminController::$currentIndex . '&configure=' . $this->name . '&id_confirmpayment=' . $id_confirmpayment . '&waiting' . $this->name . '&token=' . $this->token, 'desc' => $this->l('PAYMENT WAITING', null, null, false), 'icon' => 'process-icon-reset');
                 $this->page_header_toolbar_btn['cancel'] = array('href' => AdminController::$currentIndex . '&configure=' . $this->name . '&id_confirmpayment=' . $id_confirmpayment . '&cancel' . $this->name . '&token=' . $this->token, 'desc' => $this->l('PAYMENT CANCEL', null, null, false), 'icon' => 'process-icon-cancel');
                 $this->page_header_toolbar_btn['postpone'] = array('href' => AdminController::$currentIndex . '&configure=' . $this->name . '&id_confirmpayment=' . $id_confirmpayment . '&postpone' . $this->name . '&token=' . $this->token, 'desc' => $this->l('PAYMENT POSTPONE', null, null, false), 'icon' => 'process-icon-dropdown');
                 $this->page_header_toolbar_btn['new_confirmpayment'] = array('href' => 'index.php?controller=AdminOrders&id_order=' . $payment->id_order . '&vieworder&token=' . Tools::getAdminTokenLite('AdminOrders'), 'desc' => $this->l('View Order', null, null, false), 'icon' => 'process-icon-preview');
             } else {
                 if ($payment->state == 'POSTPONE') {
                     $this->page_header_toolbar_btn['paid'] = array('href' => AdminController::$currentIndex . '&configure=' . $this->name . '&id_confirmpayment=' . $id_confirmpayment . '&paid' . $this->name . '&token=' . $this->token, 'desc' => $this->l('PAYMENT DONE', null, null, false), 'icon' => 'process-icon-payment');
                     $this->page_header_toolbar_btn['cancel'] = array('href' => AdminController::$currentIndex . '&configure=' . $this->name . '&id_confirmpayment=' . $id_confirmpayment . '&cancel' . $this->name . '&token=' . $this->token, 'desc' => $this->l('PAYMENT CANCEL', null, null, false), 'icon' => 'process-icon-cancel');
                 }
             }
         }
     }
     parent::initPageHeaderToolbar();
 }
 public function initPageHeaderToolbar()
 {
     $this->page_header_toolbar_btn = $this->module->initToolbar();
     parent::initPageHeaderToolbar();
 }
 public function initPageHeaderToolbar()
 {
     if ($this->display == 'add') {
         $this->page_header_toolbar_title = $this->l("Aggiungi macchinario");
     } elseif ($this->display == 'edit') {
         if ($obj = $this->loadObject(true)) {
             $this->page_header_toolbar_title = $this->l("Modifica macchinario");
             $this->page_header_toolbar_btn['delete'] = array('short' => $this->l('Cancella', null, null, false), 'href' => self::$currentIndex . '&id_tool=' . $obj->id . '&deletetool&token=' . $this->token, 'desc' => $this->l('Cancella questo macchinario', null, null, false), 'js' => 'if (confirm(\'' . $this->l('Cancella elemento?', null, true, false) . '\')){return true;}else{event.preventDefault();}');
         }
     } else {
         $this->page_header_toolbar_title = $this->l("Gestisci macchinari");
         $this->page_header_toolbar_btn['new_tool'] = array('href' => self::$currentIndex . '&addtool&token=' . $this->token, 'desc' => $this->l('Aggiungi nuovo macchinario', null, null, false), 'icon' => 'process-icon-new');
     }
     parent::initPageHeaderToolbar();
 }
 public function initPageHeaderToolbar()
 {
     if ($this->display == 'add') {
         $this->page_header_toolbar_title = $this->l("Aggiungi orario di lavoro");
     } elseif ($this->display == 'edit') {
         if ($obj = $this->loadObject(true)) {
             $this->page_header_toolbar_title = $this->l("Modifica orario di lavoro");
             $this->page_header_toolbar_btn['delete'] = array('short' => $this->l('Delete', null, null, false), 'href' => self::$currentIndex . '&id_workingday=' . $obj->id . '&deleteworking_day&token=' . $this->token, 'desc' => $this->l('Delete this entry', null, null, false), 'js' => 'if (confirm(\'' . $this->l('Delete entry?', null, true, false) . '\')){return true;}else{event.preventDefault();}');
         }
     } else {
         $this->page_header_toolbar_title = $this->l("Gestisci orari di lavoro");
         $this->page_header_toolbar_btn['new_working_day'] = array('href' => self::$currentIndex . '&addworking_day&token=' . $this->token, 'desc' => $this->l('Aggiungi nuovo orario di lavoro', null, null, false), 'icon' => 'process-icon-new');
     }
     parent::initPageHeaderToolbar();
 }
 public function initPageHeaderToolbar()
 {
     $this->page_header_toolbar_title = $this->l('Posts');
     if ($this->display == 'add' || $this->display == 'edit') {
         $this->page_header_toolbar_btn['back_to_list'] = array('href' => Context::getContext()->link->getAdminLink('AdminSimpleBlogPosts'), 'desc' => $this->l('Back to list', null, null, false), 'icon' => 'process-icon-back');
         if (Tools::getValue('id_simpleblog_post', 0)) {
             if ($this->loadObject(true)) {
                 $obj = $this->loadObject(true);
             }
             $SimpleBlogPost = new SimpleBlogPost($obj->id, $this->context->language->id);
             $this->page_header_toolbar_btn['preview_post'] = array('href' => Context::getContext()->link->getModuleLink('ph_simpleblog', 'single', array('rewrite' => $SimpleBlogPost->link_rewrite, 'sb_category' => $SimpleBlogPost->category_rewrite)), 'desc' => $this->l('View post', null, null, false), 'icon' => 'process-icon-preview', 'target' => true);
         }
     }
     if (!isset($this->display)) {
         $this->page_header_toolbar_btn['new_post'] = array('href' => self::$currentIndex . '&addsimpleblog_post&token=' . $this->token, 'desc' => $this->l('Add new post', null, null, false), 'icon' => 'process-icon-new');
         $this->page_header_toolbar_btn['go_to_blog'] = array('href' => ph_simpleblog::getLink(), 'desc' => $this->l('Go to blog', null, null, false), 'icon' => 'process-icon-plus', 'target' => true);
     }
     parent::initPageHeaderToolbar();
 }
 public function initPageHeaderToolbar()
 {
     parent::initPageHeaderToolbar();
 }
 public function initPageHeaderToolbar()
 {
     if ($this->display != "edit" && Context::getContext()->employee->id_profile == Configuration::get('APH_PROFILE_STORE_OWNER')) {
         $this->page_header_toolbar_title = $this->l('Negozio');
         $this->page_header_toolbar_btn['edit_info'] = array('href' => self::$currentIndex . '&updateinfo&token=' . $this->token, 'desc' => $this->l('Aggiorna informazioni', null, null, false), 'icon' => 'process-icon-edit');
     }
     parent::initPageHeaderToolbar();
 }
 public function initPageHeaderToolbar()
 {
     if (empty($this->display)) {
         $this->page_header_toolbar_btn['new_store'] = array('href' => self::$currentIndex . '&addstore&token=' . $this->token, 'desc' => $this->l('Aggiungi nuovo negozio', null, null, false), 'icon' => 'process-icon-new');
         $this->page_header_toolbar_title = $this->l("Negozi");
     }
     if ($this->display == 'edit') {
         // if ($store = $this->loadObject(true)) {
         // 	if ($this->tabAccess['delete']){
         //         $this->page_header_toolbar_btn['delete'] = array(
         //             'short' => $this->l('Cancella', null, null, false),
         //             'href' => self::$currentIndex.'&id_store='.$store->id.'&deletestore&token='.$this->token,
         //             'desc' => $this->l('Cancella questo negozio', null, null, false),
         //             'confirm' => 1,
         //             'js' => 'if (confirm(\''.$this->l('Cancella negozio?', null, true, false).'\')){return true;}else{event.preventDefault();}'
         //         );
         //     }
         // }
     } elseif ($this->display == 'add') {
         $this->page_header_toolbar_title = $this->l("Aggiungi nuovo negozio");
     }
     return parent::initPageHeaderToolbar();
 }
 public function initPageHeaderToolbar()
 {
     parent::initPageHeaderToolbar();
     unset($this->page_header_toolbar_btn['back']);
 }
 /**
  * Ajout du bouton d'ajout dans la toolbar
  */
 public function initPageHeaderToolbar()
 {
     $this->page_header_toolbar_btn['new_rule'] = array('href' => self::$currentIndex . '&addautogroup_rule&token=' . $this->token, 'desc' => $this->l('Add new rule', null, null, false), 'icon' => 'process-icon-new');
     parent::initPageHeaderToolbar();
 }
 public function initPageHeaderToolbar()
 {
     if (empty($this->display)) {
         $this->page_header_toolbar_btn['new_smart_blog_post'] = array('href' => self::$currentIndex . '&addsmart_blog_post&token=' . $this->token, 'desc' => $this->l('Add new Blog Post', null, null, false), 'icon' => 'process-icon-new');
     }
     if ($this->display == 'edit') {
         if (($smart_blog_post = $this->loadObject(true)) && $smart_blog_post->isAssociatedToShop()) {
             // adding button for preview this smart_blog_post
             if ($url_preview = $this->getPreviewUrl($smart_blog_post)) {
                 $this->page_header_toolbar_btn['preview'] = array('short' => $this->l('Preview', null, null, false), 'href' => $url_preview, 'desc' => $this->l('Preview', null, null, false), 'target' => true, 'class' => 'previewUrl');
             }
             // adding button for delete this product
             if ($this->tabAccess['delete']) {
                 $this->page_header_toolbar_btn['delete'] = array('short' => $this->l('Delete', null, null, false), 'href' => $this->context->link->getAdminLink('AdminBlogPost') . '&id_smart_blog_post=' . (int) $smart_blog_post->id . '&deletesmart_blog_post', 'desc' => $this->l('Delete this Blog Post', null, null, false), 'confirm' => 1, 'js' => 'if (confirm(\'' . $this->l('Delete Blog Post?', null, true, false) . '\')){return true;}else{event.preventDefault();}');
             }
         }
     }
     parent::initPageHeaderToolbar();
 }
 public function initPageHeaderToolbar()
 {
     if ($this->display == 'add') {
         $this->page_header_toolbar_title = $this->l("Aggiungi disponibilità / ferie");
     } elseif ($this->display == 'edit') {
         if ($obj = $this->loadObject(true)) {
             $this->page_header_toolbar_title = $this->l("Modifica disponibilità / ferie");
             $this->page_header_toolbar_btn['delete'] = array('short' => $this->l('Cancella', null, null, false), 'href' => self::$currentIndex . '&id_availability=' . $obj->id . '&deleteavailability&token=' . $this->token, 'desc' => $this->l('Cancella', null, null, false), 'js' => 'if (confirm(\'' . $this->l('Vuoi cancellare questo elemento?', null, true, false) . '\')){return true;}else{event.preventDefault();}');
         }
     } else {
         $this->page_header_toolbar_title = $this->l("Gestisci disponibilità staordinarie / ferie");
         $this->page_header_toolbar_btn['new_availability'] = array('href' => self::$currentIndex . '&addavailability&token=' . $this->token, 'desc' => $this->l('Aggiungi nuova disponibilità', null, null, false), 'icon' => 'process-icon-new');
     }
     parent::initPageHeaderToolbar();
 }