From 6b4402d8a69d52cd24312769ea21f85ec14b90ce Mon Sep 17 00:00:00 2001 From: Zhangyu Date: Thu, 24 Oct 2024 02:22:46 +0000 Subject: [PATCH] * [task#131076] modify the step menu link button dispaly of thinkstepmenu. --- lib/zin/wg/thinkstepmenu/v1.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/zin/wg/thinkstepmenu/v1.php b/lib/zin/wg/thinkstepmenu/v1.php index 494e7a66ed..8833c5e772 100644 --- a/lib/zin/wg/thinkstepmenu/v1.php +++ b/lib/zin/wg/thinkstepmenu/v1.php @@ -144,6 +144,7 @@ class thinkStepMenu extends wg private function getOperateItems($item): array { + global $config; $wizard = $this->prop('wizard'); $canAddChild = true; $showQuestionOfNode = true; @@ -205,7 +206,7 @@ class thinkStepMenu extends wg ); $options = $item->type === 'question' ? json_decode($item->options) : null; $linkType = !empty($options) && ($options->questionType == 'checkbox' || $options->questionType === 'radio' || $options->questionType === 'multicolumn'); - $linkItem = ($canLink && $linkType && !empty($options->required)) ? array( + $linkItem = ($canLink && $linkType) ? array( 'key' => 'linkNode', 'icon' => 'link', 'text' => $this->lang->thinkstep->actions['link'], @@ -220,7 +221,6 @@ class thinkStepMenu extends wg 'innerClass' => 'text-gray opacity-50', 'hint' => $this->lang->thinkstep->tips->linkBlocks ); - $linkType = !empty($item->type == 'question') && isset($options->questionType) && in_array($options->questionType, array('checkbox', 'radio', 'multicolumn')); $menus = array_merge($menus, array( $canEdit ? array( @@ -230,7 +230,7 @@ class thinkStepMenu extends wg 'url' => createLink('thinkstep', 'edit', "marketID={$marketID}&stepID={$item->id}") ) : null, $canDelete ? $deleteItem : null, - $wizard->model === '3c' && $linkType && $canLink ? $linkItem : null + in_array($wizard->model, $config->thinkwizard->venn) && $item->type == 'question' && $canLink ? $linkItem : null ), $transitionAction); if($canCreate && (($showQuestionOfNode && $item->type == 'node') || $item->hasSameQuestion || $item->type == 'question')) $menus = array_merge($menus, array(