diff --git a/module/productplan/control.php b/module/productplan/control.php index 9fd3a00050..26525c3666 100644 --- a/module/productplan/control.php +++ b/module/productplan/control.php @@ -160,10 +160,12 @@ class productplan extends control * View plan. * * @param int $planID + * @param string $type + * @param string $orderBy * @access public * @return void */ - public function view($planID = 0) + public function view($planID = 0, $type = 'story', $orderBy = 'id_desc') { $this->session->set('storyList', $this->app->getURI(true)); @@ -173,13 +175,15 @@ class productplan extends control $products = $this->product->getPairs(); $this->view->title = "PLAN #$plan->id $plan->title/" . $products[$plan->product]; $this->view->position[] = $this->lang->productplan->view; - $this->view->planStories = $this->loadModel('story')->getPlanStories($planID); - $this->view->planBugs = $this->loadModel('bug')->getPlanBugs($planID); + $this->view->planStories = $this->loadModel('story')->getPlanStories($planID, 'all', $type == 'story' ? $orderBy : 'id_desc'); + $this->view->planBugs = $this->loadModel('bug')->getPlanBugs($planID, 'all', $type == 'bug' ? $orderBy : 'id_desc'); $this->view->products = $products; $this->view->summary = $this->product->summary($this->view->planStories); $this->view->plan = $plan; $this->view->actions = $this->loadModel('action')->getList('productplan', $planID); $this->view->users = $this->loadModel('user')->getPairs('noletter'); + $this->view->type = $type; + $this->view->orderBy = $orderBy; $this->display(); } diff --git a/module/productplan/view/view.html.php b/module/productplan/view/view.html.php index fc86c209f2..5572bf61b1 100644 --- a/module/productplan/view/view.html.php +++ b/module/productplan/view/view.html.php @@ -11,7 +11,6 @@ */ ?> - productplan->confirmUnlinkStory)?> productplan->confirmUnlinkBug)?>
@@ -55,24 +54,25 @@
deleted) echo $actionLinks;?>
-
+
'>
+ id}&type=story&orderBy=%s"; ?> - - - - - - - - - + + + + + + + + + @@ -130,18 +130,19 @@
idAB;?> priAB;?> story->title;?> openedByAB;?> assignedToAB;?> story->estimateAB;?>statusAB;?> story->stageAB;?>actions?> idAB);?> priAB);?> story->title);?> openedByAB);?> assignedToAB);?> story->estimateAB);?>statusAB);?> story->stageAB);?>actions?>
-
+
'>
+ id}&type=bug&orderBy=%s"; ?> - - - - - - - + + + + + + +
idAB;?> priAB;?> bug->title;?> openedByAB;?> assignedToAB;?>statusAB;?>actions?> idAB);?> priAB);?> bug->title);?> openedByAB);?> assignedToAB);?>statusAB);?>actions?>