// Add a buton to erase all log

This commit is contained in:
Rémi Gaillard
2013-09-05 15:58:36 +02:00
parent 6e5fb47642
commit 0f81518ba2
2 changed files with 15 additions and 0 deletions
+10
View File
@@ -64,10 +64,20 @@ class AdminLogsControllerCore extends AdminController
$this->_join .= ' LEFT JOIN '._DB_PREFIX_.'employee e ON (a.id_employee = e.id_employee)';
parent::__construct();
}
public function processDelete()
{
return Logger::eraseAllLogs();
}
public function initToolbar()
{
parent::initToolbar();
$this->toolbar_btn['delete'] = array(
'short' => 'Erase',
'desc' => $this->l('Erase all'),
'js' => 'if (confirm(\''.$this->l('Are you sure?').'\')) document.location = \''.$this->context->link->getAdminLink('AdminLogs').'&token='.$this->token.'&deletelog=1\';'
);
unset($this->toolbar_btn['new']);
}