* Add create btn to productplan-browse page.

This commit is contained in:
zhouxin
2023-06-10 13:49:31 +08:00
parent c9ee476c37
commit 2600c7e99d
+9
View File
@@ -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);