diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index 956984c44f..041b591582 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -170,13 +170,14 @@ $lang->story->methodOrder[65] = 'report'; /* Product plan. */ $lang->resource->productplan = new stdclass(); -$lang->resource->productplan->browse = 'browse'; -$lang->resource->productplan->create = 'create'; -$lang->resource->productplan->edit = 'edit'; -$lang->resource->productplan->delete = 'delete'; -$lang->resource->productplan->view = 'view'; -$lang->resource->productplan->linkStory = 'linkStory'; -$lang->resource->productplan->unlinkStory = 'unlinkStory'; +$lang->resource->productplan->browse = 'browse'; +$lang->resource->productplan->create = 'create'; +$lang->resource->productplan->edit = 'edit'; +$lang->resource->productplan->delete = 'delete'; +$lang->resource->productplan->view = 'view'; +$lang->resource->productplan->linkStory = 'linkStory'; +$lang->resource->productplan->unlinkStory = 'unlinkStory'; +$lang->resource->productplan->batchUnlinkStory = 'batchUnlinkStory'; $lang->productplan->methodOrder[5] = 'browse'; $lang->productplan->methodOrder[10] = 'create'; @@ -185,6 +186,7 @@ $lang->productplan->methodOrder[20] = 'delete'; $lang->productplan->methodOrder[25] = 'view'; $lang->productplan->methodOrder[30] = 'linkStory'; $lang->productplan->methodOrder[35] = 'unlinkStory'; +$lang->productplan->methodOrder[40] = 'batchUnlinkStory'; /* Release. */ $lang->resource->release = new stdclass(); diff --git a/module/productplan/control.php b/module/productplan/control.php index 5148232a32..9198a9f2ab 100644 --- a/module/productplan/control.php +++ b/module/productplan/control.php @@ -154,7 +154,7 @@ class productplan extends control { $this->session->set('storyList', $this->app->getURI(true)); - if(!empty($_POST)) $this->productplan->linkStory($planID); + if(!empty($_POST['stories'])) $this->productplan->linkStory($planID); $plan = $this->productplan->getByID($planID); $this->commonAction($plan->product); @@ -189,4 +189,20 @@ class productplan extends control die(js::reload('parent')); } } + + /** + * Batch unlink story. + * + * @param string $confirm + * @access public + * @return void + */ + public function batchUnlinkStory($confirm = 'no') + { + foreach($this->post->unlinkStories as $storyID) + { + $this->productplan->unlinkStory($storyID); + } + die(js::reload('parent')); + } } diff --git a/module/productplan/lang/en.php b/module/productplan/lang/en.php index 646acd193c..22cde6d897 100644 --- a/module/productplan/lang/en.php +++ b/module/productplan/lang/en.php @@ -16,10 +16,11 @@ $lang->productplan->create = "Create"; $lang->productplan->edit = "Edit"; $lang->productplan->delete = "Delete"; $lang->productplan->view = "Info"; -$lang->productplan->linkStory = "Link story"; -$lang->productplan->unlinkStory = "Remove story"; -$lang->productplan->linkedStories = 'Stories linked'; -$lang->productplan->unlinkedStories = 'Stories unlinked'; +$lang->productplan->linkStory = "Link story"; +$lang->productplan->unlinkStory = "Remove story"; +$lang->productplan->batchUnlinkStory = "Batch Remove"; +$lang->productplan->linkedStories = 'Stories linked'; +$lang->productplan->unlinkedStories = 'Stories unlinked'; $lang->productplan->confirmDelete = "Are you sure to delete this plan?"; $lang->productplan->confirmUnlinkStory = "Are you sure to remove this story?"; diff --git a/module/productplan/lang/zh-cn.php b/module/productplan/lang/zh-cn.php index 067594ac95..1801e7b7a3 100644 --- a/module/productplan/lang/zh-cn.php +++ b/module/productplan/lang/zh-cn.php @@ -16,10 +16,11 @@ $lang->productplan->create = "创建计划"; $lang->productplan->edit = "编辑计划"; $lang->productplan->delete = "删除计划"; $lang->productplan->view = "计划详情"; -$lang->productplan->linkStory = "关联需求"; -$lang->productplan->unlinkStory = "移除需求"; -$lang->productplan->linkedStories = '已关联需求列表'; -$lang->productplan->unlinkedStories = '未关联需求列表'; +$lang->productplan->linkStory = "关联需求"; +$lang->productplan->unlinkStory = "移除需求"; +$lang->productplan->batchUnlinkStory = "批量移除"; +$lang->productplan->linkedStories = '已关联需求列表'; +$lang->productplan->unlinkedStories = '未关联需求列表'; $lang->productplan->confirmDelete = "您确认删除该计划吗?"; $lang->productplan->confirmUnlinkStory = "您确认移除该需求吗?"; diff --git a/module/productplan/view/linkstory.html.php b/module/productplan/view/linkstory.html.php index 49f3ee8a79..8e85cd55b2 100644 --- a/module/productplan/view/linkstory.html.php +++ b/module/productplan/view/linkstory.html.php @@ -12,20 +12,19 @@ ?> -
- + +
- - - - - - - - - + + + + + + + + @@ -35,7 +34,10 @@ if($story->plan and helper::diffDate($plans[$story->plan], helper::today()) > 0) continue; ?> - + @@ -43,47 +45,66 @@ - - +
title .$lang->colon . $lang->productplan->unlinkedStories;?>
idAB;?>priAB;?>story->plan;?>story->title;?>openedByAB;?>assignedToAB;?>story->estimateAB;?>statusAB;?>link;?> idAB;?> priAB;?> story->plan;?> story->title;?> openedByAB;?> assignedToAB;?> story->estimateAB;?>statusAB;?>
createLink('story', 'view', "storyID=$story->id"), $story->id);?> + + createLink('story', 'view', "storyID=$story->id"), $story->id);?> + pri;?>'>pri?> planTitle;?> createLink('story', 'view', "storyID=$story->id"), $story->title);?>assignedTo];?> estimate;?> story->statusList[$story->status];?>
story->linkStory);?> + story->linkStory);?> +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
title .$lang->colon . $lang->productplan->linkedStories;?>
idAB;?>priAB;?>story->title;?>openedByAB;?>assignedToAB;?>story->estimateAB;?>statusAB;?>story->stageAB;?>actions?>
createLink('story', 'view', "storyID=$story->id"), $story->id);?>pri;?>'>pri?>createLink('story', 'view', "storyID=$story->id"), $story->title);?>openedBy];?>assignedTo];?>estimate;?>story->statusList[$story->status];?>story->stageList[$story->stage];?>id", '', 'list', '', 'hiddenwin');?>
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
title .$lang->colon . $lang->productplan->linkedStories;?>
idAB;?> priAB;?> story->title;?> openedByAB;?> assignedToAB;?> story->estimateAB;?>statusAB;?> story->stageAB;?>actions?>
+ + createLink('story', 'view', "storyID=$story->id"), $story->id);?> + pri;?>'>pri?>createLink('story', 'view', "storyID=$story->id"), $story->title);?>openedBy];?>assignedTo];?>estimate;?>story->statusList[$story->status];?>story->stageList[$story->stage];?>id", '', 'list', '', 'hiddenwin');?>
+ productplan->batchUnlinkStory); + } + ?> +
+
diff --git a/module/productplan/view/view.html.php b/module/productplan/view/view.html.php index bcf26671a0..238b3182c3 100644 --- a/module/productplan/view/view.html.php +++ b/module/productplan/view/view.html.php @@ -13,84 +13,104 @@
deleted) echo "class='deleted'";?>>PLAN #id . ' ' . $plan->title;?>
- - - + + + +
-
- productplan->desc;?> -
desc;?>
-
- -
- session->productPlanList ? $this->session->productPlanList : inlink('browse', "planID=$plan->id"); - if(!$plan->deleted) - { - common::printIcon('productplan', 'linkStory',"planID=$plan->id"); - common::printIcon('productplan', 'edit', "planID=$plan->id"); - common::printIcon('productplan', 'delete', "planID=$plan->id", '', 'button', '', 'hiddenwin'); - } - common::printRPN($browseLink); - ?> -
- - - - - - - - - - - - - - - - - - - createLink('story', 'view', "storyID=$story->id"); - $totalEstimate += $story->estimate; - ?> - - - - - - - - - - + +
title .$lang->colon . $lang->productplan->linkedStories;?>
idAB;?>priAB;?>story->title;?>openedByAB;?>assignedToAB;?>story->estimateAB;?>statusAB;?>story->stageAB;?>actions?>
id);?>pri?>'>pri;?>title);?>openedBy];?>assignedTo];?>estimate;?>story->statusList[$story->status];?>story->stageList[$story->stage];?>id", '', 'list', '', 'hiddenwin');?>
+ + - - - -
+
+ productplan->desc;?> +
desc;?>
+
+ +
+ session->productPlanList ? $this->session->productPlanList : inlink('browse', "planID=$plan->id"); + if(!$plan->deleted) + { + common::printIcon('productplan', 'linkStory',"planID=$plan->id"); + common::printIcon('productplan', 'edit', "planID=$plan->id"); + common::printIcon('productplan', 'delete', "planID=$plan->id", '', 'button', '', 'hiddenwin'); + } + common::printRPN($browseLink); + ?> +
+ + + + + + + + + + + + + - - - -
title .$lang->colon . $lang->productplan->linkedStories;?>
idAB;?> priAB;?> story->title;?> openedByAB;?> assignedToAB;?> story->estimateAB;?>statusAB;?> story->stageAB;?>actions?>
product->storySummary, count($planStories), $totalEstimate);?>
-
-
- productplan->basicInfo?> - + + + + + createLink('story', 'view', "storyID=$story->id"); + $totalEstimate += $story->estimate; + ?> + + + + + + + + + + + + + + - - - - - - - - +
+ + id);?> + pri?>'>pri;?>title);?>openedBy];?>assignedTo];?>estimate;?>story->statusList[$story->status];?>story->stageList[$story->stage];?>id", '', 'list', '', 'hiddenwin');?>
productplan->title;?>title;?> -
productplan->begin;?>begin;?> -
productplan->end;?>end;?> + +
+ productplan->batchUnlinkStory); + } + ?> +
+
product->storySummary, count($planStories), $totalEstimate);?>
+
-
-
+
+
+ productplan->basicInfo?> + + + + + + + + + + +
productplan->title;?>title;?> +
productplan->begin;?>begin;?> +
productplan->end;?>end;?> +
+
+
+