* Hide product index link if the global flow is not full.

This commit is contained in:
liugang
2018-06-14 14:46:25 +08:00
parent 35bcf01ff5
commit 2573f78046
+3 -2
View File
@@ -52,13 +52,14 @@ class productModel extends model
$selectHtml = $this->select($products, $productID, $currentModule, $currentMethod, $extra, $branch, $module, $moduleType);
$label = $this->lang->product->index;
if($this->config->global->flow != 'full') $label = $this->lang->product->all;
if($currentModule == 'product' && $currentMethod == 'all') $label = $this->lang->product->all;
if($currentModule == 'product' && $currentMethod == 'create') $label = $this->lang->product->create;
$pageNav = '<div class="btn-group angle-btn"><div class="btn-group"><button data-toggle="dropdown" type="button" class="btn">' . $label . ' <span class="caret"></span></button>';
$pageNav .= '<ul class="dropdown-menu">';
if(common::hasPriv('product', 'index')) $pageNav .= '<li>' . html::a(helper::createLink('product', 'index', 'locate=no'), '<i class="icon icon-home"></i> ' . $this->lang->product->index) . '</li>';
if(common::hasPriv('product', 'all')) $pageNav .= '<li>' . html::a(helper::createLink('product', 'all'), '<i class="icon icon-cards-view"></i> ' . $this->lang->product->all) . '</li>';
if($this->config->global->flow == 'full' && common::hasPriv('product', 'index')) $pageNav .= '<li>' . html::a(helper::createLink('product', 'index', 'locate=no'), '<i class="icon icon-home"></i> ' . $this->lang->product->index) . '</li>';
if(common::hasPriv('product', 'all')) $pageNav .= '<li>' . html::a(helper::createLink('product', 'all'), '<i class="icon icon-cards-view"></i> ' . $this->lang->product->all) . '</li>';
if(common::isTutorialMode())
{
$wizardParams = helper::safe64Encode('');