[+] BO : Page header toolbar

This commit is contained in:
Jerome Nadaud
2013-08-28 14:07:50 +02:00
parent a76fc165db
commit c8d9b9bf3a
6 changed files with 80 additions and 0 deletions
@@ -109,6 +109,27 @@ class AdminCmsContentControllerCore extends AdminController
));
}
public function initPageHeaderToolbar()
{
$id_cms_category = (int)Tools::getValue('id_cms_category');
if (!$id_cms_category)
$id_cms_category = 1;
$this->page_header_toolbar_title = $this->l('CMS');
$this->page_header_toolbar_btn['new_cms_category'] = array(
'href' => self::$currentIndex.'&addcms_category&token='.$this->token,
'desc' => $this->l('Add new CMS category'),
'icon' => 'process-icon-new'
);
$this->page_header_toolbar_btn['new_cms_page'] = array(
'href' => self::$currentIndex.'&addcms&id_cms_category='.$id_cms_category.'&token='.$this->token,
'desc' => $this->l('Add new CMS page'),
'icon' => 'process-icon-new'
);
parent::initPageHeaderToolbar();
}
public function postProcess()
{
if (Tools::isSubmit('submitDelcms')
@@ -95,6 +95,18 @@ class AdminProfilesControllerCore extends AdminController
else
parent::postProcess();
}
public function initPageHeaderToolbar()
{
$this->page_header_toolbar_title = $this->l('Profiles');
$this->page_header_toolbar_btn['new_profile'] = array(
'href' => self::$currentIndex.'&addprofile&token='.$this->token,
'desc' => $this->l('Add new profile'),
'icon' => 'process-icon-new'
);
parent::initPageHeaderToolbar();
}
}
@@ -112,6 +112,18 @@ class AdminQuickAccessesControllerCore extends AdminController
parent::__construct();
}
public function initPageHeaderToolbar()
{
$this->page_header_toolbar_title = $this->l('Quick access');
$this->page_header_toolbar_btn['new_quick_access'] = array(
'href' => self::$currentIndex.'&addquick_access&token='.$this->token,
'desc' => $this->l('Add new quick access'),
'icon' => 'process-icon-new'
);
parent::initPageHeaderToolbar();
}
}
@@ -152,6 +152,18 @@ class AdminReferrersControllerCore extends AdminController
$this->context->controller->addJqueryUI('ui.datepicker');
}
public function initPageHeaderToolbar()
{
$this->page_header_toolbar_title = $this->l('Referrers');
$this->page_header_toolbar_btn['new_referrer'] = array(
'href' => self::$currentIndex.'&addreferrer&token='.$this->token,
'desc' => $this->l('Add new referrer'),
'icon' => 'process-icon-new'
);
parent::initPageHeaderToolbar();
}
public function renderList()
{
// Display list Referrers:
@@ -77,6 +77,17 @@ class AdminSearchEnginesControllerCore extends AdminController
parent::__construct();
}
public function initPageHeaderToolbar()
{
$this->page_header_toolbar_title = $this->l('Search engines');
$this->page_header_toolbar_btn['new_search_engine'] = array(
'href' => self::$currentIndex.'&addsearch_engine&token='.$this->token,
'desc' => $this->l('Add new search engine'),
'icon' => 'process-icon-new'
);
parent::initPageHeaderToolbar();
}
}
+12
View File
@@ -78,6 +78,18 @@ class AdminTabsControllerCore extends AdminController
parent::__construct();
}
public function initPageHeaderToolbar()
{
$this->page_header_toolbar_title = $this->l('Menus');
$this->page_header_toolbar_btn['new_menu'] = array(
'href' => self::$currentIndex.'&addtab&token='.$this->token,
'desc' => $this->l('Add new menu'),
'icon' => 'process-icon-new'
);
parent::initPageHeaderToolbar();
}
/**
* AdminController::renderForm() override
* @see AdminController::renderForm()