Merge branch 'bootstrap' of https://github.com/PrestaShop/PrestaShop into bootstrap

This commit is contained in:
Kevin Granger
2013-10-28 16:19:02 +01:00
119 changed files with 1776 additions and 1025 deletions
@@ -37,6 +37,7 @@ class AdminAttachmentsControllerCore extends AdminController
$this->lang = true;
$this->addRowAction('edit');
$this->addRowAction('view');
$this->addRowAction('delete');
$this->_select = 'IFNULL(virtual.products, 0) as products';
@@ -76,6 +77,16 @@ class AdminAttachmentsControllerCore extends AdminController
parent::initPageHeaderToolbar();
}
public function renderView()
{
if (($obj = $this->loadObject(true)) && Validate::isLoadedObject($obj))
{
$link = $this->context->link->getPageLink('attachment', true, NULL, 'id_attachment='.$obj->id);
Tools::redirectLink($link);
}
return $this->displayWarning($this->l('File not found'));
}
public function renderForm()
{
if (($obj = $this->loadObject(true)) && Validate::isLoadedObject($obj))
@@ -166,7 +166,7 @@ abstract class AdminStatsTabControllerCore extends AdminPreferencesControllerCor
$tpl->assign(array(
'current' => self::$currentIndex,
'current_module_name' => Tools::getValue('module'),
'current_module_name' => Tools::getValue('module', 'statsforecast'),
'token' => $this->token,
'modules' => $modules,
'module_instance' => $module_instance
@@ -154,6 +154,28 @@ class AdminTranslationsControllerCore extends AdminController
return $this->{$method_name}();
}
public function initPageHeaderToolbar()
{
parent::initPageHeaderToolbar();
if (Tools::getValue('lang'))
{
$this->page_header_toolbar_btn['save-and-stay'] = array(
'short' => 'SaveAndStay',
'href' => '#',
'desc' => $this->l('Save and stay'),
);
$this->page_header_toolbar_btn['save'] = array(
'href' => '#',
'desc' => $this->l('Update translations')
);
$this->page_header_toolbar_btn['cancel'] = array(
'href' => self::$currentIndex.'&token='.$this->token,
'desc' => $this->l('Cancel')
);
}
}
/**
* AdminController::initToolbar() override
* @see AdminController::initToolbar()