From 03c1443249c3433c4e006fd0203cb684eb96c597 Mon Sep 17 00:00:00 2001 From: qixinzhi Date: Tue, 3 Sep 2024 00:50:27 +0000 Subject: [PATCH] * [misc,0.5h] add buildStepBar. --- lib/zin/wg/sqlbuilder/v1.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lib/zin/wg/sqlbuilder/v1.php b/lib/zin/wg/sqlbuilder/v1.php index b31e7cbcb1..c0fd78c6e7 100644 --- a/lib/zin/wg/sqlbuilder/v1.php +++ b/lib/zin/wg/sqlbuilder/v1.php @@ -459,6 +459,26 @@ class sqlBuilder extends wg if(empty($currStep)) $this->setProp('currStep', reset($steps)); } + protected function buildStepBar() + { + global $lang; + list($steps, $selected, $requires) = $this->prop(array('steps', 'currStep', 'requiredSteps')); + + $stepList = $lang->bi->builderStepList; + $lastStep = end($steps); + $items = array(); + foreach($steps as $step) + { + if(!isset($stepList[$step])) continue; + + $key = $step; + $text = $stepList[$key]; + + $isSelected = $selected == $key; + $required = $key == 'table'; + } + } + protected function buildTableStep() { return $this->buildStepContent('table');