// Toolbar modifs
This commit is contained in:
@@ -45,12 +45,6 @@ class AdminAccessControllerCore extends AdminController
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Permissions');
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
/**
|
||||
* AdminController::renderForm() override
|
||||
* @see AdminController::renderForm()
|
||||
@@ -131,9 +125,23 @@ class AdminAccessControllerCore extends AdminController
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
public function initToolbarTitle()
|
||||
{
|
||||
$this->toolbar_title = array_unique($this->breadcrumbs);
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
parent::initPageHeaderToolbar();
|
||||
unset($this->page_header_toolbar_btn['cancel']);
|
||||
}
|
||||
|
||||
public function ajaxProcessUpdateAccess()
|
||||
{
|
||||
if (_PS_MODE_DEMO_)
|
||||
|
||||
@@ -26,9 +26,22 @@
|
||||
|
||||
class AdminAddonsCatalogControllerCore extends AdminController
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->bootstrap = true;
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function initContent()
|
||||
{
|
||||
$this->context->smarty->assign('parentDomain', Tools::getHttpHost(true).substr($_SERVER['REQUEST_URI'], 0, -1 * strlen(basename($_SERVER['REQUEST_URI']))));
|
||||
$this->initPageHeaderToolbar();
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'parentDomain' => Tools::getHttpHost(true).substr($_SERVER['REQUEST_URI'], 0, -1 * strlen(basename($_SERVER['REQUEST_URI']))),
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
parent::initContent();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,12 +85,12 @@ 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'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$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();
|
||||
}
|
||||
|
||||
@@ -58,12 +58,12 @@ class AdminAttachmentsControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Attachments');
|
||||
$this->page_header_toolbar_btn['new_attachment'] = array(
|
||||
'href' => self::$currentIndex.'&addattachment&token='.$this->token,
|
||||
'desc' => $this->l('Add new attachment'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_attachment'] = array(
|
||||
'href' => self::$currentIndex.'&addattachment&token='.$this->token,
|
||||
'desc' => $this->l('Add new attachment'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -424,6 +424,7 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
||||
|
||||
// toolbar (save, cancel, new, ..)
|
||||
$this->initToolbar();
|
||||
$this->initPageHeaderToolbar();
|
||||
if ($this->display == 'edit' || $this->display == 'add')
|
||||
{
|
||||
if (!($this->object = $this->loadObject(true)))
|
||||
@@ -451,23 +452,16 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
||||
'token' => $this->token,
|
||||
'content' => $this->content,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
if ($this->display == 'view')
|
||||
if (empty($this->display))
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->attribute_name[$this->context->employee->id_lang];
|
||||
$this->page_header_toolbar_btn['back_to_list'] = array(
|
||||
'href' => Context::getContext()->link->getAdminLink('AdminAttributesGroups'),
|
||||
'desc' => $this->l('Back to list'),
|
||||
'icon' => 'process-icon-back'
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Attribute groups');
|
||||
$this->page_header_toolbar_btn['new_attribute_group'] = array(
|
||||
'href' => self::$currentIndex.'&addattribute_group&token='.$this->token,
|
||||
'desc' => $this->l('Add new attribute'),
|
||||
@@ -478,7 +472,7 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
||||
'desc' => $this->l('Add new value'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
@@ -544,7 +538,14 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
||||
break;
|
||||
|
||||
case 'view':
|
||||
$bread_extended[] = $this->attribute_name[$this->context->employee->id_lang];
|
||||
if (Tools::getIsset('viewattribute_group'))
|
||||
{
|
||||
if (($id = Tools::getValue('id_attribute_group')))
|
||||
if (Validate::isLoadedObject($obj = new AttributeGroup((int)$id)))
|
||||
$bread_extended[] = $obj->name[$this->context->employee->id_lang];
|
||||
}
|
||||
else
|
||||
$bread_extended[] = $this->attribute_name[$this->context->employee->id_lang];
|
||||
break;
|
||||
|
||||
case 'editAttributes':
|
||||
|
||||
@@ -59,12 +59,12 @@ class AdminCartRulesControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Cart rules');
|
||||
$this->page_header_toolbar_btn['new_cart_rule'] = array(
|
||||
'href' => self::$currentIndex.'&addcart_rule&token='.$this->token,
|
||||
'desc' => $this->l('Add new cart rule'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_cart_rule'] = array(
|
||||
'href' => self::$currentIndex.'&addcart_rule&token='.$this->token,
|
||||
'desc' => $this->l('Add new cart rule'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -96,12 +96,12 @@ class AdminCartsControllerCore extends AdminController
|
||||
|
||||
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'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$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();
|
||||
}
|
||||
|
||||
@@ -160,12 +160,14 @@ class AdminCategoriesControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Categories');
|
||||
$this->page_header_toolbar_btn['new_category'] = array(
|
||||
'href' => self::$currentIndex.'&addcategory&token='.$this->token,
|
||||
'desc' => $this->l('Add new category'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
{
|
||||
$this->page_header_toolbar_btn['new_category'] = array(
|
||||
'href' => self::$currentIndex.'&addcategory&token='.$this->token,
|
||||
'desc' => $this->l('Add new category'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
}
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -118,17 +118,28 @@ class AdminCmsContentControllerCore extends AdminController
|
||||
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'
|
||||
);
|
||||
$this->page_header_toolbar_title = 'CMS';
|
||||
|
||||
if ($this->display == 'list')
|
||||
{
|
||||
$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'
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->page_header_toolbar_btn['cancel'] = array(
|
||||
'href' => self::$currentIndex.'&token='.$this->token,
|
||||
'desc' => $this->l('Cancel')
|
||||
);
|
||||
}
|
||||
|
||||
if (is_array($this->page_header_toolbar_btn)
|
||||
&& $this->page_header_toolbar_btn instanceof Traversable
|
||||
|
||||
@@ -119,12 +119,12 @@ class AdminContactsControllerCore extends AdminController
|
||||
|
||||
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'
|
||||
);
|
||||
if(empty($this->display))
|
||||
$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();
|
||||
}
|
||||
|
||||
@@ -341,5 +341,17 @@ class AdminCurrenciesControllerCore extends AdminController
|
||||
$this->errors[] = Tools::displayError('This currency already exists.');
|
||||
parent::initProcess();
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_currency'] = array(
|
||||
'href' => self::$currentIndex.'&addcurrency&token='.$this->token,
|
||||
'desc' => $this->l('Add new currency'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -190,12 +190,12 @@ 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'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$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();
|
||||
}
|
||||
|
||||
@@ -118,13 +118,16 @@ class AdminDeliverySlipControllerCore extends AdminController
|
||||
|
||||
public function initContent()
|
||||
{
|
||||
$this->content .= $this->renderForm().'<br />';
|
||||
$this->initPageHeaderToolbar();
|
||||
$this->show_toolbar = false;
|
||||
$this->content .= $this->renderForm();
|
||||
$this->content .= $this->renderOptions();
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,6 +181,7 @@ class AdminEmailsControllerCore extends AdminController
|
||||
{
|
||||
$this->initTabModuleList();
|
||||
$this->initToolbar();
|
||||
$this->initPageHeaderToolbar();
|
||||
$this->addToolBarModulesListButton();
|
||||
unset($this->toolbar_btn['save']);
|
||||
$back = $this->context->link->getAdminLink('AdminHome');
|
||||
@@ -195,6 +196,9 @@ class AdminEmailsControllerCore extends AdminController
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -140,6 +140,18 @@ class AdminEmployeesControllerCore extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_employee'] = array(
|
||||
'href' => self::$currentIndex.'&addemployee&token='.$this->token,
|
||||
'desc' => $this->l('Add new employee'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
public function renderList()
|
||||
{
|
||||
$this->_select = 'pl.`name` AS profile';
|
||||
|
||||
@@ -137,7 +137,6 @@ class AdminFeaturesControllerCore extends AdminController
|
||||
}
|
||||
|
||||
$this->feature_name = $obj->name;
|
||||
$this->toolbar_title = $this->feature_name;
|
||||
$this->fields_list = array(
|
||||
'id_feature_value' => array(
|
||||
'title' => $this->l('ID'),
|
||||
@@ -200,16 +199,7 @@ class AdminFeaturesControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
if ($this->display == 'view')
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->feature_name[$this->context->employee->id_lang];
|
||||
$this->page_header_toolbar_btn['back_to_list'] = array(
|
||||
'href' => Context::getContext()->link->getAdminLink('AdminFeatures'),
|
||||
'desc' => $this->l('Back to list'),
|
||||
'icon' => 'process-icon-back'
|
||||
);
|
||||
}
|
||||
else
|
||||
if (empty($this->display))
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Features');
|
||||
$this->page_header_toolbar_btn['new_feature'] = array(
|
||||
@@ -272,6 +262,27 @@ class AdminFeaturesControllerCore extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
public function initToolbarTitle()
|
||||
{
|
||||
$bread_extended = $this->breadcrumbs;
|
||||
|
||||
switch ($this->display)
|
||||
{
|
||||
case 'view':
|
||||
if (Tools::getIsset('viewfeature'))
|
||||
{
|
||||
if (($id = Tools::getValue('id_feature')))
|
||||
if (Validate::isLoadedObject($obj = new Feature((int)$id)))
|
||||
$bread_extended[] = $obj->name[$this->context->employee->id_lang];
|
||||
}
|
||||
else
|
||||
$bread_extended[] = $this->attribute_name[$this->context->employee->id_lang];
|
||||
break;
|
||||
}
|
||||
|
||||
$this->toolbar_title = $bread_extended;
|
||||
}
|
||||
|
||||
/**
|
||||
* AdminController::renderForm() override
|
||||
* @see AdminController::renderForm()
|
||||
@@ -349,6 +360,7 @@ class AdminFeaturesControllerCore extends AdminController
|
||||
{
|
||||
// toolbar (save, cancel, new, ..)
|
||||
$this->initToolbar();
|
||||
$this->initPageHeaderToolbar();
|
||||
if ($this->display == 'edit' || $this->display == 'add')
|
||||
{
|
||||
if (!$this->loadObject(true))
|
||||
@@ -382,6 +394,9 @@ class AdminFeaturesControllerCore extends AdminController
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -87,12 +87,12 @@ class AdminGendersControllerCore extends AdminController
|
||||
|
||||
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'
|
||||
);
|
||||
if(empty($this->display))
|
||||
$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();
|
||||
}
|
||||
|
||||
@@ -146,12 +146,12 @@ class AdminGroupsControllerCore extends AdminController
|
||||
|
||||
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'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$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();
|
||||
}
|
||||
|
||||
@@ -648,7 +648,19 @@ class AdminImagesControllerCore extends AdminController
|
||||
'safe_mode' => Tools::getSafeModeStatus(),
|
||||
'link_ppreferences' => 'index.php?tab=AdminPPreferences&token='.Tools::getAdminTokenLite('AdminPPreferences').'#PS_LEGACY_IMAGES_on',
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_image_type'] = array(
|
||||
'href' => self::$currentIndex.'&addimage_type&token='.$this->token,
|
||||
'desc' => $this->l('Add new image type'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
/**
|
||||
* Move product images to the new filesystem
|
||||
|
||||
@@ -617,6 +617,7 @@ class AdminImportControllerCore extends AdminController
|
||||
{
|
||||
// toolbar (save, cancel, new, ..)
|
||||
$this->initToolbar();
|
||||
$this->initPageHeaderToolbar();
|
||||
if ($this->display == 'import')
|
||||
if (Tools::getValue('csv'))
|
||||
$this->content .= $this->renderView();
|
||||
@@ -631,6 +632,9 @@ class AdminImportControllerCore extends AdminController
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -40,6 +40,17 @@ class AdminInformationControllerCore extends AdminController
|
||||
parent::initContent();
|
||||
}
|
||||
|
||||
public function initToolbarTitle()
|
||||
{
|
||||
$this->toolbar_title = array_unique($this->breadcrumbs);
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
parent::initPageHeaderToolbar();
|
||||
unset($this->page_header_toolbar_btn['back']);
|
||||
}
|
||||
|
||||
public function renderView()
|
||||
{
|
||||
$this->initPageHeaderToolbar();
|
||||
@@ -77,12 +88,6 @@ class AdminInformationControllerCore extends AdminController
|
||||
return parent::renderView();
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Configuration information');
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
/**
|
||||
* get all tests
|
||||
*
|
||||
|
||||
@@ -121,6 +121,7 @@ class AdminInvoicesControllerCore extends AdminController
|
||||
);
|
||||
|
||||
$this->table = 'invoice_date';
|
||||
$this->show_toolbar = false;
|
||||
$this->toolbar_title = $this->l('Print PDF invoices');
|
||||
return parent::renderForm();
|
||||
}
|
||||
@@ -185,6 +186,7 @@ class AdminInvoicesControllerCore extends AdminController
|
||||
{
|
||||
$this->display = 'edit';
|
||||
$this->initToolbar();
|
||||
$this->initPageHeaderToolbar();
|
||||
$this->content .= $this->initFormByDate();
|
||||
$this->content .= $this->initFormByStatus();
|
||||
$this->table = 'invoice';
|
||||
@@ -192,7 +194,10 @@ class AdminInvoicesControllerCore extends AdminController
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -102,12 +102,12 @@ class AdminLanguagesControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Languages');
|
||||
$this->page_header_toolbar_btn['new_language'] = array(
|
||||
'href' => self::$currentIndex.'&addlang&token='.$this->token,
|
||||
'desc' => $this->l('Add new language'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_language'] = array(
|
||||
'href' => self::$currentIndex.'&addlang&token='.$this->token,
|
||||
'desc' => $this->l('Add new language'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -300,6 +300,9 @@ class AdminLocalizationControllerCore extends AdminController
|
||||
'localization_form' => $this->renderForm(),
|
||||
'localization_options' => $this->renderOptions(),
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -102,17 +102,33 @@ class AdminManufacturersControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Manufacturers');
|
||||
$this->page_header_toolbar_btn['new_manufacturer'] = array(
|
||||
'href' => self::$currentIndex.'&addmanufacturer&token='.$this->token,
|
||||
'desc' => $this->l('Add new manufacturer'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
$this->page_header_toolbar_btn['new_manufacturer_address'] = array(
|
||||
'href' => self::$currentIndex.'&addaddress&token='.$this->token,
|
||||
'desc' => $this->l('Add new manufacturer address'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
{
|
||||
$this->page_header_toolbar_btn['new_manufacturer'] = array(
|
||||
'href' => self::$currentIndex.'&addmanufacturer&token='.$this->token,
|
||||
'desc' => $this->l('Add new manufacturer'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
$this->page_header_toolbar_btn['new_manufacturer_address'] = array(
|
||||
'href' => self::$currentIndex.'&addaddress&token='.$this->token,
|
||||
'desc' => $this->l('Add new manufacturer address'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
}
|
||||
elseif ($this->display == 'editaddresses' || $this->display == 'addaddress') {
|
||||
// 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->page_header_toolbar_btn['cancel'] = array(
|
||||
'href' => $back,
|
||||
'desc' => $this->l('Cancel')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
@@ -652,6 +668,7 @@ class AdminManufacturersControllerCore extends AdminController
|
||||
{
|
||||
// toolbar (save, cancel, new, ..)
|
||||
$this->initToolbar();
|
||||
$this->initPageHeaderToolbar();
|
||||
if ($this->display == 'editaddresses' || $this->display == 'addaddress')
|
||||
$this->content .= $this->renderFormAddress();
|
||||
else if ($this->display == 'edit' || $this->display == 'add')
|
||||
@@ -676,6 +693,9 @@ class AdminManufacturersControllerCore extends AdminController
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,12 @@ class AdminMarketingControllerCore extends AdminController
|
||||
{
|
||||
$this->toolbar_title = array_unique($this->breadcrumbs);
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
parent::initPageHeaderToolbar();
|
||||
$this->page_header_toolbar_btn = array();
|
||||
}
|
||||
|
||||
public function initToolbar()
|
||||
{
|
||||
|
||||
@@ -227,6 +227,7 @@ class AdminModulesPositionsControllerCore extends AdminController
|
||||
public function initContent()
|
||||
{
|
||||
$this->addJS(__PS_BASE_URI__.'js/vendor/jquery.sortable.js');
|
||||
$this->initPageHeaderToolbar();
|
||||
|
||||
if (array_key_exists('addToHook', $_GET) || array_key_exists('editGraft', $_GET) || (Tools::isSubmit('submitAddToHook') && $this->errors))
|
||||
{
|
||||
@@ -237,7 +238,10 @@ class AdminModulesPositionsControllerCore extends AdminController
|
||||
$this->content .= $this->initMain();
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content
|
||||
'content' => $this->content,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -90,12 +90,12 @@ class AdminOrderMessageControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Order messages');
|
||||
$this->page_header_toolbar_btn['new_order_message'] = array(
|
||||
'href' => self::$currentIndex.'&addorder_message&token='.$this->token,
|
||||
'desc' => $this->l('Add new order message'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_order_message'] = array(
|
||||
'href' => self::$currentIndex.'&addorder_message&token='.$this->token,
|
||||
'desc' => $this->l('Add new order message'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -139,12 +139,12 @@ class AdminOrdersControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Orders');
|
||||
$this->page_header_toolbar_btn['new_order'] = array(
|
||||
'href' => self::$currentIndex.'&addorder&token='.$this->token,
|
||||
'desc' => $this->l('Add new order'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display) && Context::getContext()->shop->getContext() == Shop::CONTEXT_SHOP && isset($this->toolbar_btn['new']) && Shop::isFeatureActive())
|
||||
$this->page_header_toolbar_btn['new_order'] = array(
|
||||
'href' => self::$currentIndex.'&addorder&token='.$this->token,
|
||||
'desc' => $this->l('Add new order'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -84,6 +84,17 @@ class AdminPaymentControllerCore extends AdminController
|
||||
}
|
||||
}
|
||||
|
||||
public function initToolbarTitle()
|
||||
{
|
||||
$this->toolbar_title = array_unique($this->breadcrumbs);
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
parent::initPageHeaderToolbar();
|
||||
$this->page_header_toolbar_btn = array();
|
||||
}
|
||||
|
||||
public function postProcess()
|
||||
{
|
||||
if ($this->action)
|
||||
|
||||
@@ -496,12 +496,16 @@ class AdminPerformanceControllerCore extends AdminController
|
||||
public function initContent()
|
||||
{
|
||||
$this->initToolbar();
|
||||
$this->initPageHeaderToolbar();
|
||||
$this->display = '';
|
||||
$this->content .= $this->renderForm();
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -2433,12 +2433,12 @@ class AdminProductsControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Products');
|
||||
$this->page_header_toolbar_btn['new_product'] = array(
|
||||
'href' => self::$currentIndex.'&addproduct&token='.$this->token,
|
||||
'desc' => $this->l('Add new product'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_product'] = array(
|
||||
'href' => self::$currentIndex.'&addproduct&token='.$this->token,
|
||||
'desc' => $this->l('Add new product'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -99,12 +99,12 @@ class AdminProfilesControllerCore extends AdminController
|
||||
|
||||
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'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$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();
|
||||
}
|
||||
|
||||
@@ -117,12 +117,12 @@ class AdminQuickAccessesControllerCore extends AdminController
|
||||
|
||||
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'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$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();
|
||||
}
|
||||
|
||||
@@ -155,12 +155,12 @@ class AdminReferrersControllerCore extends AdminController
|
||||
|
||||
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'
|
||||
);
|
||||
if(empty($this->display))
|
||||
$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();
|
||||
}
|
||||
|
||||
@@ -267,6 +267,7 @@ class AdminRequestSqlControllerCore extends AdminController
|
||||
{
|
||||
// toolbar (save, cancel, new, ..)
|
||||
$this->initToolbar();
|
||||
$this->initPageHeaderToolbar();
|
||||
if ($this->display == 'edit' || $this->display == 'add')
|
||||
{
|
||||
if (!$this->loadObject(true))
|
||||
@@ -291,10 +292,25 @@ class AdminRequestSqlControllerCore extends AdminController
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_request'] = array(
|
||||
'href' => self::$currentIndex.'&addrequest_sql&token='.$this->token,
|
||||
'desc' => $this->l('Add new SQL request'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
/**
|
||||
* Genrating a export file
|
||||
*/
|
||||
|
||||
@@ -116,12 +116,12 @@ class AdminScenesControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Scenes');
|
||||
$this->page_header_toolbar_btn['new_scene'] = array(
|
||||
'href' => self::$currentIndex.'&addscene&token='.$this->token,
|
||||
'desc' => $this->l('Add new scene'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_scene'] = array(
|
||||
'href' => self::$currentIndex.'&addscene&token='.$this->token,
|
||||
'desc' => $this->l('Add new scene'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -191,6 +191,18 @@ class AdminSearchConfControllerCore extends AdminController
|
||||
);
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_alias'] = array(
|
||||
'href' => self::$currentIndex.'&addalias&token='.$this->token,
|
||||
'desc' => $this->l('Add new alias'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
public function initProcess()
|
||||
{
|
||||
parent::initProcess();
|
||||
|
||||
@@ -80,12 +80,12 @@ class AdminSearchEnginesControllerCore extends AdminController
|
||||
|
||||
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'
|
||||
);
|
||||
if(empty($this->display))
|
||||
$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();
|
||||
}
|
||||
|
||||
@@ -79,7 +79,6 @@ class AdminSlipControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Slips');
|
||||
$this->page_header_toolbar_btn['generate_pdf'] = array(
|
||||
'href' => self::$currentIndex.'&token='.$this->token,
|
||||
'desc' => $this->l('Generate PDF'),
|
||||
@@ -154,13 +153,17 @@ class AdminSlipControllerCore extends AdminController
|
||||
public function initContent()
|
||||
{
|
||||
$this->initToolbar();
|
||||
$this->initPageHeaderToolbar();
|
||||
$this->content .= $this->renderList();
|
||||
$this->content .= $this->renderForm();
|
||||
$this->content .= '<br>'.$this->renderOptions();
|
||||
$this->content .= $this->renderOptions();
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -118,12 +118,12 @@ class AdminSpecificPriceRuleControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Specific price rules');
|
||||
$this->page_header_toolbar_btn['new_specific_price_rule'] = array(
|
||||
'href' => self::$currentIndex.'&addspecific_price_rule&token='.$this->token,
|
||||
'desc' => $this->l('Add new specific rule'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_specific_price_rule'] = array(
|
||||
'href' => self::$currentIndex.'&addspecific_price_rule&token='.$this->token,
|
||||
'desc' => $this->l('Add new specific rule'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -109,12 +109,12 @@ class AdminStatesControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('States');
|
||||
$this->page_header_toolbar_btn['new_state'] = array(
|
||||
'href' => self::$currentIndex.'&addstate&token='.$this->token,
|
||||
'desc' => $this->l('Add new state'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_state'] = array(
|
||||
'href' => self::$currentIndex.'&addstate&token='.$this->token,
|
||||
'desc' => $this->l('Add new state'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ abstract class AdminStatsTabControllerCore extends AdminPreferencesControllerCor
|
||||
$this->initTabModuleList();
|
||||
$this->addToolBarModulesListButton();
|
||||
$this->toolbar_title = $this->l('Stats', 'AdminStatsTab');
|
||||
$this->initPageHeaderToolbar();
|
||||
if ($this->display == 'view')
|
||||
{
|
||||
// Some controllers use the view action without an object
|
||||
@@ -57,10 +58,19 @@ abstract class AdminStatsTabControllerCore extends AdminPreferencesControllerCor
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
parent::initPageHeaderToolbar();
|
||||
unset($this->page_header_toolbar_btn['back']);
|
||||
}
|
||||
|
||||
public function displayCalendar()
|
||||
{
|
||||
return AdminStatsTabController::displayCalendarForm(array(
|
||||
|
||||
@@ -195,18 +195,20 @@ class AdminStatusesControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('States');
|
||||
$this->page_header_toolbar_btn['new_order_state'] = array(
|
||||
'href' => self::$currentIndex.'&addorder_state&token='.$this->token,
|
||||
'desc' => $this->l('Add new order state'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
$this->page_header_toolbar_btn['new_order_return_state'] = array(
|
||||
'href' => self::$currentIndex.'&addorder_return_state&token='.$this->token,
|
||||
'desc' => $this->l('Add new order return state'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
if (empty($this->display))
|
||||
{
|
||||
$this->page_header_toolbar_btn['new_order_state'] = array(
|
||||
'href' => self::$currentIndex.'&addorder_state&token='.$this->token,
|
||||
'desc' => $this->l('Add new order state'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
$this->page_header_toolbar_btn['new_order_return_state'] = array(
|
||||
'href' => self::$currentIndex.'&addorder_return_state&token='.$this->token,
|
||||
'desc' => $this->l('Add new order return state'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
}
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
|
||||
@@ -78,8 +78,6 @@ class AdminStockManagementControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Stock management');
|
||||
|
||||
if ($this->display == 'details')
|
||||
$this->page_header_toolbar_btn['back_to_list'] = array(
|
||||
'href' => Context::getContext()->link->getAdminLink('AdminStockManagement'),
|
||||
@@ -1036,6 +1034,8 @@ class AdminStockManagementControllerCore extends AdminController
|
||||
|
||||
$helper = new HelperForm();
|
||||
|
||||
$this->initPageHeaderToolbar();
|
||||
|
||||
// Check if form template has been overriden
|
||||
if (file_exists($this->context->smarty->getTemplateDir(0).'/'.$this->tpl_folder.'form.tpl'))
|
||||
$helper->tpl = $this->tpl_folder.'form.tpl';
|
||||
@@ -1079,7 +1079,10 @@ class AdminStockManagementControllerCore extends AdminController
|
||||
$this->content .= $helper->generateForm($this->fields_form);
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content
|
||||
'content' => $this->content,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
else
|
||||
|
||||
@@ -129,6 +129,18 @@ class AdminStoresControllerCore extends AdminController
|
||||
unset($this->toolbar_btn['save']);
|
||||
}
|
||||
|
||||
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('Add new store'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
public function renderList()
|
||||
{
|
||||
// Set toolbar options
|
||||
|
||||
@@ -72,12 +72,12 @@ class AdminSuppliersControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Suppliers');
|
||||
$this->page_header_toolbar_btn['new_supplier'] = array(
|
||||
'href' => self::$currentIndex.'&addsupplier&token='.$this->token,
|
||||
'desc' => $this->l('Add new supplier'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_supplier'] = array(
|
||||
'href' => self::$currentIndex.'&addsupplier&token='.$this->token,
|
||||
'desc' => $this->l('Add new supplier'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -149,15 +149,13 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Supply orders');
|
||||
|
||||
if ($this->display == 'details')
|
||||
$this->page_header_toolbar_btn['back'] = array(
|
||||
'href' => Context::getContext()->link->getAdminLink('AdminSupplyOrders'),
|
||||
'desc' => $this->l('Back to list'),
|
||||
'icon' => 'process-icon-back'
|
||||
);
|
||||
else
|
||||
elseif (empty($this->display))
|
||||
{
|
||||
$this->page_header_toolbar_btn['new_supply_order'] = array(
|
||||
'href' => self::$currentIndex.'&addsupply_order&token='.$this->token,
|
||||
@@ -575,6 +573,7 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
||||
$this->display = 'update_order_state';
|
||||
// overrides parent::initContent();
|
||||
$this->initToolbar();
|
||||
$this->initPageHeaderToolbar();
|
||||
|
||||
// given the current state, loads available states
|
||||
$states = SupplyOrderState::getSupplyOrderStates($supply_order->id_supply_order_state);
|
||||
@@ -636,7 +635,10 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $content,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
@@ -719,6 +721,8 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
||||
if (!Validate::isLoadedObject($supply_order))
|
||||
return parent::initContent();
|
||||
|
||||
$this->initPageHeaderToolbar();
|
||||
|
||||
// re-defines fields_list
|
||||
$this->fields_list = array(
|
||||
'supplier_reference' => array(
|
||||
@@ -855,7 +859,10 @@ class AdminSupplyOrdersControllerCore extends AdminController
|
||||
|
||||
// assigns var
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $content,
|
||||
'content' => $content,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ class AdminTabsControllerCore extends AdminController
|
||||
'desc' => $this->l('Back to list'),
|
||||
'icon' => 'process-icon-back'
|
||||
);
|
||||
else
|
||||
elseif(empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_menu'] = array(
|
||||
'href' => self::$currentIndex.'&addtab&token='.$this->token,
|
||||
'desc' => $this->l('Add new menu'),
|
||||
|
||||
@@ -68,12 +68,12 @@ class AdminTagsControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Tags');
|
||||
$this->page_header_toolbar_btn['new_tag'] = array(
|
||||
'href' => self::$currentIndex.'&addtag&token='.$this->token,
|
||||
'desc' => $this->l('Add new tag'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_tag'] = array(
|
||||
'href' => self::$currentIndex.'&addtag&token='.$this->token,
|
||||
'desc' => $this->l('Add new tag'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -108,6 +108,18 @@ class AdminTaxesControllerCore extends AdminController
|
||||
$this->_where .= ' AND a.deleted = 0';
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_tax'] = array(
|
||||
'href' => self::$currentIndex.'&addtax&token='.$this->token,
|
||||
'desc' => $this->l('Add new tax'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
/**
|
||||
* Display delete action link
|
||||
*/
|
||||
|
||||
@@ -396,6 +396,18 @@ class AdminThemesControllerCore extends AdminController
|
||||
return parent::processDelete();
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_theme'] = array(
|
||||
'href' => self::$currentIndex.'&addtheme&token='.$this->token,
|
||||
'desc' => $this->l('Add new theme'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
public function initContent()
|
||||
{
|
||||
|
||||
@@ -434,8 +446,10 @@ class AdminThemesControllerCore extends AdminController
|
||||
public function ajaxProcessGetAddonsThemes()
|
||||
{
|
||||
// notice : readfile should be replaced by something else
|
||||
if (@fsockopen('addons.prestashop.com', 80, $errno, $errst, 3))
|
||||
@readfile('http://addons.prestashop.com/adminthemes.php?lang='.$this->context->language->iso_code);
|
||||
/*if (@fsockopen('addons.prestashop.com', 80, $errno, $errst, 3))
|
||||
@readfile('http://addons.prestashop.com/adminthemes.php?lang='.$this->context->language->iso_code);*/
|
||||
|
||||
die(Tools::file_get_contents('http://addons.prestashop.com/adminthemes.php?lang='.$this->context->language->iso_code));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -53,6 +53,8 @@ class AdminTrackingControllerCore extends AdminController
|
||||
|
||||
public function initContent()
|
||||
{
|
||||
$this->initPageHeaderToolbar();
|
||||
|
||||
if ($id_category = Tools::getValue('id_category') && Tools::getIsset('viewcategory'))
|
||||
Tools::redirectAdmin($this->context->link->getAdminLink('AdminProducts').'&id_category='.(int)$id_category.'&viewcategory');
|
||||
|
||||
@@ -72,15 +74,12 @@ class AdminTrackingControllerCore extends AdminController
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content,
|
||||
'url_post' => self::$currentIndex.'&token='.$this->token,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn
|
||||
));
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Monitoring');
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
public function getCustomListCategoriesEmpty()
|
||||
{
|
||||
$this->table = 'category';
|
||||
|
||||
@@ -98,6 +98,8 @@ class AdminTranslationsControllerCore extends AdminController
|
||||
*/
|
||||
public function initContent()
|
||||
{
|
||||
$this->initPageHeaderToolbar();
|
||||
|
||||
if (!is_null($this->type_selected))
|
||||
{
|
||||
$method_name = 'initForm'.$this->type_selected;
|
||||
@@ -112,7 +114,11 @@ class AdminTranslationsControllerCore extends AdminController
|
||||
else
|
||||
$this->content = $this->initMain();
|
||||
|
||||
$this->context->smarty->assign(array('content' => $this->content));
|
||||
$this->context->smarty->assign(array(
|
||||
'content' => $this->content,
|
||||
'show_page_header_toolbar' => $this->show_page_header_toolbar,
|
||||
'page_header_toolbar_title' => $this->page_header_toolbar_title,
|
||||
'page_header_toolbar_btn' => $this->page_header_toolbar_btn));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -72,12 +72,12 @@ class AdminWarehousesControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Warehouses');
|
||||
$this->page_header_toolbar_btn['new_warehouse'] = array(
|
||||
'href' => self::$currentIndex.'&addwarehouse&token='.$this->token,
|
||||
'desc' => $this->l('Add new warehouse'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if(empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_warehouse'] = array(
|
||||
'href' => self::$currentIndex.'&addwarehouse&token='.$this->token,
|
||||
'desc' => $this->l('Add new warehouse'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
@@ -92,6 +92,19 @@ class AdminWebserviceControllerCore extends AdminController
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_webservice'] = array(
|
||||
'href' => self::$currentIndex.'&addwebservice_account&token='.$this->token,
|
||||
'desc' => $this->l('Add new webservice'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
|
||||
protected function processUpdateOptions()
|
||||
{
|
||||
parent::processUpdateOptions();
|
||||
|
||||
@@ -64,12 +64,12 @@ class AdminZonesControllerCore extends AdminController
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
$this->page_header_toolbar_title = $this->l('Zones');
|
||||
$this->page_header_toolbar_btn['new_zone'] = array(
|
||||
'href' => self::$currentIndex.'&addzone&token='.$this->token,
|
||||
'desc' => $this->l('Add new zone'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
if (empty($this->display))
|
||||
$this->page_header_toolbar_btn['new_zone'] = array(
|
||||
'href' => self::$currentIndex.'&addzone&token='.$this->token,
|
||||
'desc' => $this->l('Add new zone'),
|
||||
'icon' => 'process-icon-new'
|
||||
);
|
||||
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user