[+] BO : Page header toolbar

This commit is contained in:
Jerome Nadaud
2013-08-28 09:37:49 +02:00
parent 068da6f87c
commit 967fc98693
6 changed files with 73 additions and 0 deletions
@@ -83,6 +83,18 @@ class AdminAddressesControllerCore extends AdminController
);
}
public function initPageHeaderToolbar()
{
$this->page_header_toolbar_title = $this->l('Addresses');
$this->page_header_toolbar_btn['new_address'] = array(
'href' => self::$currentIndex.'&addaddress&token='.$this->token,
'desc' => $this->l('Add new address'),
'icon' => 'process-icon-new'
);
parent::initPageHeaderToolbar();
}
public function renderForm()
{
$this->fields_form = array(
@@ -130,6 +142,8 @@ class AdminAddressesControllerCore extends AdminController
'label' => $this->l('Other'),
'name' => 'other',
'required' => false,
'cols' => 15,
'rows' => 3,
'hint' => $this->l('Forbidden characters:').' <>;=#{}'
),
),
@@ -93,6 +93,18 @@ class AdminCartsControllerCore extends AdminController
parent::__construct();
}
public function initPageHeaderToolbar()
{
$this->page_header_toolbar_title = $this->l('Carts');
$this->page_header_toolbar_btn['export_cart'] = array(
'href' => self::$currentIndex.'&exportcart&token='.$this->token,
'desc' => $this->l('Export carts'),
'icon' => 'process-icon-export'
);
parent::initPageHeaderToolbar();
}
public function renderView()
{
if (!($cart = $this->loadObject(true)))
@@ -117,6 +117,17 @@ class AdminContactsControllerCore extends AdminController
return parent::renderForm();
}
public function initPageHeaderToolbar()
{
$this->page_header_toolbar_title = $this->l('Contacts');
$this->page_header_toolbar_btn['new_contact'] = array(
'href' => self::$currentIndex.'&addcontact&token='.$this->token,
'desc' => $this->l('Add new contact'),
'icon' => 'process-icon-new'
);
parent::initPageHeaderToolbar();
}
}
@@ -185,6 +185,18 @@ class AdminCustomersControllerCore extends AdminController
}
}
public function initPageHeaderToolbar()
{
$this->page_header_toolbar_title = $this->l('Customers');
$this->page_header_toolbar_btn['new_customer'] = array(
'href' => self::$currentIndex.'&addcustomer&token='.$this->token,
'desc' => $this->l('Add new customer'),
'icon' => 'process-icon-new'
);
parent::initPageHeaderToolbar();
}
public function initProcess()
{
parent::initProcess();
@@ -84,6 +84,18 @@ class AdminGendersControllerCore extends AdminController
parent::__construct();
}
public function initPageHeaderToolbar()
{
$this->page_header_toolbar_title = $this->l('Genders');
$this->page_header_toolbar_btn['new_gender'] = array(
'href' => self::$currentIndex.'&addgender&token='.$this->token,
'desc' => $this->l('Add new gender'),
'icon' => 'process-icon-new'
);
parent::initPageHeaderToolbar();
}
public function renderForm()
{
$this->fields_form = array(
@@ -142,6 +142,18 @@ class AdminGroupsControllerCore extends AdminController
parent::initToolbar();
}
public function initPageHeaderToolbar()
{
$this->page_header_toolbar_title = $this->l('Groups');
$this->page_header_toolbar_btn['new_group'] = array(
'href' => self::$currentIndex.'&addgroup&token='.$this->token,
'desc' => $this->l('Add new group'),
'icon' => 'process-icon-new'
);
parent::initPageHeaderToolbar();
}
public function initProcess()
{
$this->id_object = Tools::getValue('id_'.$this->table);