diff --git a/module/productplan/css/browse.css b/module/productplan/css/browse.css index 1f9f589b44..afb0db66ad 100644 --- a/module/productplan/css/browse.css +++ b/module/productplan/css/browse.css @@ -35,3 +35,7 @@ td.c-branch {overflow: hidden; text-align: left !important; text-overflow: ellip .panel-actions {position: relative; padding: 0 0; padding-top: 1px;} .icon-list {padding-left: 7px;} .icon-kanban {padding-left: 7px; font-size: 16px;} +#productplanList .c-actions {width: 265px;} +#productplanList .c-actions .btn+.btn {margin-left: -1px;} +#productplanList .c-actions .btn {display: block; float: left;} +#productplanList td.c-actions .dividing-line {width: 1px; height: 16px; display: inline-block; vertical-align: middle; background: #F4F5F7; margin: 6px 4px 0 0; float: left;} diff --git a/module/productplan/model.php b/module/productplan/model.php index 385ee5f43a..ffadeb6ce9 100644 --- a/module/productplan/model.php +++ b/module/productplan/model.php @@ -1130,6 +1130,16 @@ class productplanModel extends model { $params = "planID=$plan->id"; + $canStart = common::hasPriv('productplan', 'start'); + $canFinish = common::hasPriv('productplan', 'finish'); + $canClose = common::hasPriv('productplan', 'close'); + $canCreateExec = common::hasPriv('execution', 'create'); + $canLinkStory = common::hasPriv('productplan', 'linkStory'); + $canLinkBug = common::hasPriv('productplan', 'linkBug'); + $canEdit = common::hasPriv('productplan', 'edit'); + $canCreateChild = common::hasPriv('productplan', 'create'); + $canDelete = common::hasPriv('productplan', 'delete'); + $menu = ''; $menu .= $this->buildMenu('productplan', 'start', $params, $plan, $type, 'play', 'hiddenwin', '', false, '', $this->lang->productplan->startAB); $menu .= $this->buildMenu('productplan', 'finish', $params, $plan, $type, 'checked', 'hiddenwin', '', false, '', $this->lang->productplan->finishAB); @@ -1174,6 +1184,11 @@ class productplanModel extends model $menu .= ""; } + if(($canStart or $canFinsh or $canClose or $canCreateExec) and ($canLinkStory or $canLinkBug or $canEdit or $canCreateChild or $canDelete)) + { + $menu .= "
"; + } + if(common::hasPriv('productplan', 'linkStory', $plan) and $plan->parent >= 0) { $menu .= $this->buildMenu('productplan', 'view', "{$params}&type=story&orderBy=id_desc&link=true", $plan, $type, 'link', '', '', '', '', $this->lang->productplan->linkStory); @@ -1197,6 +1212,11 @@ class productplanModel extends model $menu .= $this->buildMenu('productplan', 'create', "product={$plan->product}&branch={$plan->branch}&parent={$plan->id}", $plan, $type, 'split', '', '', '', '', $this->lang->productplan->children); + if(($canLinkStory or $canLinkBug or $canEdit or $canCreateChild) and $canDelete) + { + $menu .= ""; + } + if($type == 'browse') $menu .= $this->buildMenu('productplan', 'delete', "{$params}&confirm=no", $plan, $type, 'trash', 'hiddenwin', '', '', $this->lang->productplan->delete); if($type == 'view') diff --git a/module/productplan/view/browsebylist.html.php b/module/productplan/view/browsebylist.html.php index a046895e57..e488ec94f8 100644 --- a/module/productplan/view/browsebylist.html.php +++ b/module/productplan/view/browsebylist.html.php @@ -9,11 +9,6 @@ * @link https://www.zentao.net */ ?> -