// added link for preview in AdminProductsController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10566 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -28,7 +28,7 @@
|
|||||||
<ul class="cc_button">
|
<ul class="cc_button">
|
||||||
{foreach from=$toolbar_btn item=btn key=k}
|
{foreach from=$toolbar_btn item=btn key=k}
|
||||||
<li>
|
<li>
|
||||||
<a id="desc-{$table}-{$btn.imgclass|default:$k}" class="toolbar_btn" href="{$btn.href}" title="{$btn.desc}">
|
<a id="desc-{$table}-{$btn.imgclass|default:$k}" class="toolbar_btn" href="{$btn.href}" title="{$btn.desc}" {if isset($btn.target) && $btn.target}target="_blank"{/if}>
|
||||||
<span class="process-icon-{$btn.imgclass|default:$k} {$btn.class|default:'' }" ></span>
|
<span class="process-icon-{$btn.imgclass|default:$k} {$btn.class|default:'' }" ></span>
|
||||||
<div>{$btn.desc}</div>
|
<div>{$btn.desc}</div>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -1795,48 +1795,59 @@ class AdminProductsControllerCore extends AdminController
|
|||||||
if ($this->display == 'edit')
|
if ($this->display == 'edit')
|
||||||
if ($product = $this->loadObject(true))
|
if ($product = $this->loadObject(true))
|
||||||
{
|
{
|
||||||
if($this->tabAccess['delete'])
|
if ($this->tabAccess['delete'])
|
||||||
$this->toolbar_btn['delete'] = array(
|
$this->toolbar_btn['delete'] = array(
|
||||||
'short' => 'Delete',
|
'short' => 'Delete',
|
||||||
'href' => $this->context->link->getAdminLink('AdminProducts').'&id_product='.$product->id.'&deleteproduct',
|
'href' => $this->context->link->getAdminLink('AdminProducts').'&id_product='.$product->id.'&deleteproduct',
|
||||||
'desc' => $this->l('Delete this product'),
|
'desc' => $this->l('Delete this product'),
|
||||||
'confirm' => 1);
|
'confirm' => 1);
|
||||||
|
|
||||||
if($this->tabAccess['add'])
|
if ($this->tabAccess['add'])
|
||||||
$this->toolbar_btn['duplicate'] = array(
|
$this->toolbar_btn['duplicate'] = array(
|
||||||
'short' => 'Duplicate',
|
'short' => 'Duplicate',
|
||||||
'href' => '#todo'.$this->context->link->getAdminLink('AdminProducts').'&id_product='.$product->id, 'desc' => $this->l('Duplicate'),
|
'href' => '#todo'.$this->context->link->getAdminLink('AdminProducts').'&id_product='.$product->id,
|
||||||
|
'desc' => $this->l('Duplicate'),
|
||||||
'confirm' => 1
|
'confirm' => 1
|
||||||
);
|
);
|
||||||
// @TODO navigation
|
|
||||||
|
// @TODO navigation
|
||||||
$this->toolbar_btn['preview'] = array(
|
$this->toolbar_btn['preview'] = array(
|
||||||
'short' => 'Preview',
|
'short' => 'Preview',
|
||||||
'href' => '', 'desc' => 'prevdesc',
|
'href' => $this->getPreviewUrl($product),
|
||||||
'class' => 'previewUrl',
|
'desc' => $this->l('prevdesc'),
|
||||||
|
'target' => true,
|
||||||
|
'class' => 'previewUrl'
|
||||||
);
|
);
|
||||||
|
|
||||||
if (file_exists(_PS_MODULE_DIR_.'statsproduct/statsproduct.php'))
|
if (file_exists(_PS_MODULE_DIR_.'statsproduct/statsproduct.php'))
|
||||||
$this->toolbar_btn['stats'] = array(
|
$this->toolbar_btn['stats'] = array(
|
||||||
'short' => 'Statistics',
|
'short' => 'Statistics',
|
||||||
'href' => $this->context->link->getAdminLink('AdminStats').'&module=statsproduct&id_product='.$product->id,
|
'href' => $this->context->link->getAdminLink('AdminStats').'&module=statsproduct&id_product='.$product->id,
|
||||||
'desc' => $this->l('View product sales'),
|
'desc' => $this->l('View product sales'),
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->toolbar_btn['cancel'] = array(
|
$this->toolbar_btn['cancel'] = array(
|
||||||
'short' => 'Close',
|
'short' => 'Close',
|
||||||
'href' => '#todo'.$this->context->link->getAdminLink('AdminProducts').'&id_product='.$product->id, 'desc' => $this->l('Cancel'),
|
'href' => '#todo'.$this->context->link->getAdminLink('AdminProducts').'&id_product='.$product->id,
|
||||||
'confirm' => 1);
|
'desc' => $this->l('Cancel'),
|
||||||
if($this->tabAccess['add'])
|
'confirm' => 1
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($this->tabAccess['add'])
|
||||||
$this->toolbar_btn['new'] = array(
|
$this->toolbar_btn['new'] = array(
|
||||||
'short' => 'Create',
|
'short' => 'Create',
|
||||||
'href' => '#todo'.$this->context->link->getAdminLink('AdminProducts').'&id_product='.$product->id, 'desc' => $this->l('Create'),
|
'href' => '#todo'.$this->context->link->getAdminLink('AdminProducts').'&id_product='.$product->id,
|
||||||
|
'desc' => $this->l('Create'),
|
||||||
);
|
);
|
||||||
if($this->tabAccess['edit'])
|
|
||||||
|
if ($this->tabAccess['edit'])
|
||||||
{
|
{
|
||||||
$this->toolbar_btn['save'] = array(
|
$this->toolbar_btn['save'] = array(
|
||||||
'short' => 'Save',
|
'short' => 'Save',
|
||||||
'href' => '#todo'.$this->context->link->getAdminLink('AdminProducts').'&id_product='.$product->id,
|
'href' => '#todo'.$this->context->link->getAdminLink('AdminProducts').'&id_product='.$product->id,
|
||||||
'desc' => $this->l('Save'),
|
'desc' => $this->l('Save'),
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->toolbar_btn['save-and-stay'] = array(
|
$this->toolbar_btn['save-and-stay'] = array(
|
||||||
'short' => 'SaveAndStay',
|
'short' => 'SaveAndStay',
|
||||||
'href' => '#todo'.$this->context->link->getAdminLink('AdminProducts').'&id_product='.$product->id,
|
'href' => '#todo'.$this->context->link->getAdminLink('AdminProducts').'&id_product='.$product->id,
|
||||||
|
|||||||
Reference in New Issue
Block a user