From 9b17defbdeeda1b013f0e2ca3805320cd66c6489 Mon Sep 17 00:00:00 2001 From: qixinzhi Date: Wed, 12 Jun 2024 07:08:31 +0000 Subject: [PATCH] * [bug#33201,start,0.6h,0.3h] add more select for more than maxFeatureItem group. --- module/pivot/ui/preview.html.php | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/module/pivot/ui/preview.html.php b/module/pivot/ui/preview.html.php index 4205514469..d9e84c2226 100644 --- a/module/pivot/ui/preview.html.php +++ b/module/pivot/ui/preview.html.php @@ -25,20 +25,18 @@ if($this->config->edition != 'open') jsVar('dimensionID', $dimensionID); jsVar('groupID', $groupID); -$items = array(); -foreach($groups as $id => $name) -{ - $items[] = array - ( - 'text' => $name, - 'value' => $id, - 'url' => inlink('preview', "dimension={$dimensionID}&group={$id}"), - 'badge' => $id == $groupID ? array('text' => $recTotal, 'class' => 'size-sm canvas ring-0 rounded-md') : null, - 'active' => $id == $groupID - ); -} +$commonGroups = array_slice($groups, 0, $config->pivot->maxFeatureItem, true); +$moreGroups = array_slice($groups, $config->pivot->maxFeatureItem, null, true); -featureBar(set::items($items)); +foreach($commonGroups as $id => $name) $lang->pivot->featureBar['preview'][$id] = $name; +if(!empty($moreGroups)) $lang->pivot->featureBar['preview']['more'] = $lang->more; +foreach($moreGroups as $id => $name) $lang->pivot->moreSelects['preview']['more'][$id] = $name; + +featureBar +( + set::current($groupID), + set::linkParams("dimension={$dimensionID}&group={key}"), +); if($config->edition != 'open') {