* [task#131076] modify the step menu link button dispaly of thinkstepmenu.

This commit is contained in:
Zhangyu
2024-11-01 14:30:59 +08:00
committed by 谢杞钰
parent 494da6bd73
commit 6b4402d8a6
+3 -3
View File
@@ -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(