* Add create btn to productplan-browse page.
This commit is contained in:
@@ -10,6 +10,10 @@ declare(strict_types=1);
|
||||
*/
|
||||
namespace zin;
|
||||
|
||||
$canCreate = common::hasPriv('productplan', 'create');
|
||||
$canModify = common::canModify('product', $product);
|
||||
$createLink = $this->createLink('productplan', 'create', "productID={$productID}&branchID={$branch}&parent={$parent}");
|
||||
|
||||
featureBar
|
||||
(
|
||||
set::current($browseType),
|
||||
@@ -17,6 +21,11 @@ featureBar
|
||||
li(searchToggle())
|
||||
);
|
||||
|
||||
toolbar
|
||||
(
|
||||
$canCreate && $canModify ? item(set(array('text' => $lang->productplan->create, 'url' => $createLink, 'class' => 'btn primary', 'icon' => 'plus'))) : null,
|
||||
);
|
||||
|
||||
$config->productplan->dtable->fieldList['branch']['map'] = $branches;
|
||||
|
||||
$cols = array_values($config->productplan->dtable->fieldList);
|
||||
|
||||
Reference in New Issue
Block a user