From c10d091dfe738e217075b97073661869bad30a01 Mon Sep 17 00:00:00 2001 From: wangyuting Date: Fri, 18 Jul 2025 15:38:47 +0800 Subject: [PATCH 1/2] * [task#146630,done,1h,0h] Add module items actions. --- lib/zin/wg/modulemenu/v1.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/zin/wg/modulemenu/v1.php b/lib/zin/wg/modulemenu/v1.php index 92565c8562..3aa402ba1c 100644 --- a/lib/zin/wg/modulemenu/v1.php +++ b/lib/zin/wg/modulemenu/v1.php @@ -90,6 +90,16 @@ class moduleMenu extends wg 'titleAttrs' => $titleAttrs, 'contentClass' => 'overflow-x-hidden' ); + + if(!empty($child->actions['items'])) + { + foreach($child->actions['items'] as $action) + { + $action['url'] = str_replace('{id}', $child->id, $action['url']); + $item['actions'][] = $action; + } + } + $items = $this->buildMenuTree($child->id); if($items) $item['items'] = $items; if($child->id == $activeKey || $child->id == 'product-' . $activeKey) From 195b4192d7823ea09d8b34f0c73886662d23c0bc Mon Sep 17 00:00:00 2001 From: wangyuting Date: Fri, 18 Jul 2025 16:03:15 +0800 Subject: [PATCH 2/2] * Fix module id error. --- lib/zin/wg/modulemenu/v1.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lib/zin/wg/modulemenu/v1.php b/lib/zin/wg/modulemenu/v1.php index 3aa402ba1c..4b569f7c2c 100644 --- a/lib/zin/wg/modulemenu/v1.php +++ b/lib/zin/wg/modulemenu/v1.php @@ -90,15 +90,7 @@ class moduleMenu extends wg 'titleAttrs' => $titleAttrs, 'contentClass' => 'overflow-x-hidden' ); - - if(!empty($child->actions['items'])) - { - foreach($child->actions['items'] as $action) - { - $action['url'] = str_replace('{id}', $child->id, $action['url']); - $item['actions'][] = $action; - } - } + if(!empty($child->actions)) $item['actions'] = $child->actions; $items = $this->buildMenuTree($child->id); if($items) $item['items'] = $items;