From a7ee2281180170f0befb3f912fab408bd7a22e2f Mon Sep 17 00:00:00 2001 From: dingguodong Date: Mon, 19 Jun 2023 15:44:49 +0800 Subject: [PATCH] * Finish task#95328, put group icon into more. --- module/program/model.php | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/module/program/model.php b/module/program/model.php index 9451ae8eb7..b0dcc7c13e 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -1846,26 +1846,27 @@ class programModel extends model } if(common::hasPriv('project', 'edit')) $actionsMap[] = 'edit'; if(common::hasPriv('project', 'team')) $actionsMap[] = 'team'; - if(common::hasPriv('project', 'group')) - { - $item = new stdclass(); - $item->name = 'group'; - if($program->model == 'kanban') - { - $item->disabled = true; - $item->hint = $this->lang->project->tip->group; - } - $actionsMap[] = $item; - } - if(common::hasPriv('project', 'manageProducts') || common::hasPriv('project', 'whitelist') || common::hasPriv('project', 'delete')) { $more = new stdclass(); $more->name = 'more'; $more->items = array(); - $moreActions = array('manageProducts', 'whitelist', 'delete'); + $moreActions = array('group', 'manageProducts', 'whitelist', 'delete'); foreach($moreActions as $action) { + if($aciton == 'group' && common::hasPriv('project', 'group')) + { + $item = new stdclass(); + $item->name = 'group'; + if($program->model == 'kanban') + { + $item->disabled = true; + $item->hint = $this->lang->project->tip->group; + } + $more->items[] = $item; + continue; + } + if(!common::hasPriv('project', $action)) continue; $item = new stdclass();