// 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:
lLefevre
2011-11-23 17:05:29 +00:00
parent 9c01024080
commit cc50d29cc3
2 changed files with 26 additions and 15 deletions
+1 -1
View File
@@ -28,7 +28,7 @@
<ul class="cc_button">
{foreach from=$toolbar_btn item=btn key=k}
<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>
<div>{$btn.desc}</div>
</a>
+25 -14
View File
@@ -1795,48 +1795,59 @@ class AdminProductsControllerCore extends AdminController
if ($this->display == 'edit')
if ($product = $this->loadObject(true))
{
if($this->tabAccess['delete'])
if ($this->tabAccess['delete'])
$this->toolbar_btn['delete'] = array(
'short' => 'Delete',
'href' => $this->context->link->getAdminLink('AdminProducts').'&amp;id_product='.$product->id.'&amp;deleteproduct',
'desc' => $this->l('Delete this product'),
'confirm' => 1);
if($this->tabAccess['add'])
if ($this->tabAccess['add'])
$this->toolbar_btn['duplicate'] = array(
'short' => 'Duplicate',
'href' => '#todo'.$this->context->link->getAdminLink('AdminProducts').'&amp;id_product='.$product->id, 'desc' => $this->l('Duplicate'),
'href' => '#todo'.$this->context->link->getAdminLink('AdminProducts').'&amp;id_product='.$product->id,
'desc' => $this->l('Duplicate'),
'confirm' => 1
);
// @TODO navigation
// @TODO navigation
$this->toolbar_btn['preview'] = array(
'short' => 'Preview',
'href' => '', 'desc' => 'prevdesc',
'class' => 'previewUrl',
'short' => 'Preview',
'href' => $this->getPreviewUrl($product),
'desc' => $this->l('prevdesc'),
'target' => true,
'class' => 'previewUrl'
);
if (file_exists(_PS_MODULE_DIR_.'statsproduct/statsproduct.php'))
$this->toolbar_btn['stats'] = array(
'short' => 'Statistics',
'href' => $this->context->link->getAdminLink('AdminStats').'&amp;module=statsproduct&amp;id_product='.$product->id,
'desc' => $this->l('View product sales'),
);
);
$this->toolbar_btn['cancel'] = array(
'short' => 'Close',
'href' => '#todo'.$this->context->link->getAdminLink('AdminProducts').'&amp;id_product='.$product->id, 'desc' => $this->l('Cancel'),
'confirm' => 1);
if($this->tabAccess['add'])
'short' => 'Close',
'href' => '#todo'.$this->context->link->getAdminLink('AdminProducts').'&amp;id_product='.$product->id,
'desc' => $this->l('Cancel'),
'confirm' => 1
);
if ($this->tabAccess['add'])
$this->toolbar_btn['new'] = array(
'short' => 'Create',
'href' => '#todo'.$this->context->link->getAdminLink('AdminProducts').'&amp;id_product='.$product->id, 'desc' => $this->l('Create'),
'href' => '#todo'.$this->context->link->getAdminLink('AdminProducts').'&amp;id_product='.$product->id,
'desc' => $this->l('Create'),
);
if($this->tabAccess['edit'])
if ($this->tabAccess['edit'])
{
$this->toolbar_btn['save'] = array(
'short' => 'Save',
'href' => '#todo'.$this->context->link->getAdminLink('AdminProducts').'&amp;id_product='.$product->id,
'desc' => $this->l('Save'),
);
$this->toolbar_btn['save-and-stay'] = array(
'short' => 'SaveAndStay',
'href' => '#todo'.$this->context->link->getAdminLink('AdminProducts').'&amp;id_product='.$product->id,