[*] BO : download attachments directly from the list

This commit is contained in:
Damien Metzger
2013-10-28 11:57:27 +01:00
parent 79b7521cac
commit b6799d4f2f
2 changed files with 11 additions and 1 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))