diff --git a/module/productplan/css/browse.css b/module/productplan/css/browse.css index afb0db66ad..2b51775b97 100644 --- a/module/productplan/css/browse.css +++ b/module/productplan/css/browse.css @@ -38,4 +38,4 @@ td.c-branch {overflow: hidden; text-align: left !important; text-overflow: ellip #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;} +#productplanList td.c-actions .dividing-line {width: 1px; height: 16px; display: inline-block; vertical-align: middle; background: #F4F5F7; margin: 6px 0 0 0; float: left;} diff --git a/module/productplan/model.php b/module/productplan/model.php index 60a818904c..f3a1116c63 100644 --- a/module/productplan/model.php +++ b/module/productplan/model.php @@ -1134,8 +1134,8 @@ class productplanModel extends model $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'); + $canLinkStory = common::hasPriv('productplan', 'linkStory', $plan); + $canLinkBug = common::hasPriv('productplan', 'linkBug', $plan); $canEdit = common::hasPriv('productplan', 'edit'); $canCreateChild = common::hasPriv('productplan', 'create'); $canDelete = common::hasPriv('productplan', 'delete'); @@ -1179,7 +1179,7 @@ class productplanModel extends model $menu .= html::a($executionLink, '', '', "class='btn' title='{$this->lang->productplan->createExecution}'"); } } - else + elseif($canCreateExec) { $menu .= ""; } @@ -1189,20 +1189,20 @@ class productplanModel extends model $menu .= "
"; } - if(common::hasPriv('productplan', 'linkStory', $plan) and $plan->parent >= 0) + if($canLinkStory and $plan->parent >= 0) { $menu .= $this->buildMenu('productplan', 'view', "{$params}&type=story&orderBy=id_desc&link=true", $plan, $type, 'link', '', '', '', '', $this->lang->productplan->linkStory); } - else + elseif($canLinkStory) { $menu .= ""; } - if(common::hasPriv('productplan', 'linkBug', $plan) and $plan->parent >= 0) + if($canLinkBug and $plan->parent >= 0) { $menu .= $this->buildMenu('productplan', 'view', "{$params}&type=bug&orderBy=id_desc&link=true", $plan, $type, 'bug', '', '', '', '', $this->lang->productplan->linkBug); } - else + elseif($canLinkBug) { $menu .= ""; } @@ -1227,8 +1227,8 @@ class productplanModel extends model $editClickable = $this->buildMenu('productplan', 'edit', $params, $plan, $type, '', '', '', '', '', '', false); $deleteClickable = $this->buildMenu('productplan', 'delete', $params, $plan, $type, '', '', '', '', '', '', false); - if(common::hasPriv('productplan', 'edit') and $editClickable) $menu .= html::a(helper::createLink('productplan', 'edit', $params), " " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->edit}'"); - if(common::hasPriv('productplan', 'delete') and $deleteClickable) $menu .= html::a(helper::createLink('productplan', 'delete', $params), " " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->delete}' target='hiddenwin'"); + if($canEdit and $editClickable) $menu .= html::a(helper::createLink('productplan', 'edit', $params), " " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->edit}'"); + if($canDelete and $deleteClickable) $menu .= html::a(helper::createLink('productplan', 'delete', $params), " " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->delete}' target='hiddenwin'"); } return $menu;