From ea8303e8253a6f0cac6baaca28a55f2a088ab077 Mon Sep 17 00:00:00 2001 From: "liukmqd@gmail.com" Date: Sun, 24 Apr 2011 09:34:26 +0000 Subject: [PATCH] * Finished task #453 and #454, + Added $().toggle() into project/view/task.html.php, bug/view/browse.html.php, testcase/view/browse.html.php, and product/view/browse.html.php for task #453. * Modified function story() in project/control.php, and function getProjectStories() in module/story/model.php. Changed the file project/view/story.html.php. --- module/bug/view/browse.html.php | 9 ++++++++- module/product/view/browse.html.php | 7 ++++++- module/project/control.php | 5 +++-- module/project/view/bug.html.php | 14 +++++++------- module/project/view/story.html.php | 23 ++++++++++++----------- module/project/view/task.html.php | 3 +++ module/story/model.php | 4 ++-- module/testcase/view/browse.html.php | 9 ++++++++- 8 files changed, 49 insertions(+), 25 deletions(-) diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php index 9a40727efd..f35c387667 100644 --- a/module/bug/view/browse.html.php +++ b/module/bug/view/browse.html.php @@ -18,6 +18,7 @@ var browseType = ''; var moduleID = ''; var customed = ; +
@@ -36,6 +37,12 @@ var customed = ; echo "{$lang->bug->byQuery} "; ?>
+
bug->customFields, '', "class='iframe'"); ?> exportCSV, $lang->setFileName);?> @@ -49,7 +56,7 @@ var customed = ; -
+
diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index 5f54f55554..70e0e0bad0 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -20,6 +20,11 @@ createLink('product', 'browse', "productID=$productID&browseType=all¶m=0&orderBy=$orderBy&recTotal=0&recPerPage=200"), $lang->product->allStory);?> product->searchStory;?>
+
exportCSV, $lang->setFileName);?> story->report->common); ?> @@ -30,7 +35,7 @@ - id}&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?> - - - - - - - + + + + + + + diff --git a/module/project/view/story.html.php b/module/project/view/story.html.php index fba66dd752..a7ddb50f13 100644 --- a/module/project/view/story.html.php +++ b/module/project/view/story.html.php @@ -11,7 +11,7 @@ */ ?> - +
+
diff --git a/module/project/control.php b/module/project/control.php index 847c7e49b0..392bb5fafb 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -295,7 +295,7 @@ class project extends control * @access public * @return void */ - public function story($projectID = 0) + public function story($projectID = 0, $orderBy = 'status_asc,id_desc') { /* Load these models. */ $this->loadModel('story'); @@ -313,7 +313,7 @@ class project extends control $position[] = $this->lang->project->story; /* The pager. */ - $stories = $this->story->getProjectStories($projectID); + $stories = $this->story->getProjectStories($projectID,$orderBy); $storyTasks = $this->task->getStoryTaskCounts(array_keys($stories), $projectID); $users = $this->user->getPairs('noletter'); @@ -321,6 +321,7 @@ class project extends control $this->view->header = $header; $this->view->position = $position; $this->view->stories = $stories; + $this->view->orderBy = $orderBy; $this->view->storyTasks = $storyTasks; $this->view->tabID = 'story'; $this->view->users = $users; diff --git a/module/project/view/bug.html.php b/module/project/view/bug.html.php index 9fc4e7611b..c7e8c60d73 100644 --- a/module/project/view/bug.html.php +++ b/module/project/view/bug.html.php @@ -20,13 +20,13 @@
idAB);?>bug->severityAB);?> priAB);?>bug->title);?>openedByAB);?>assignedToAB);?>bug->resolvedBy);?> idAB);?>bug->severityAB);?> priAB);?> bug->title);?> openedByAB);?> assignedToAB);?> bug->resolvedBy);?> bug->resolutionAB);?> actions;?>
- - - - - - - - - - + id}&orderBy=%s"; ?> + + + + + + + + + + diff --git a/module/project/view/task.html.php b/module/project/view/task.html.php index b997485020..e9133fd855 100644 --- a/module/project/view/task.html.php +++ b/module/project/view/task.html.php @@ -16,6 +16,9 @@
'>
project->story;?>
@@ -21,16 +21,17 @@
idAB;?>priAB;?>story->title;?>openedByAB;?>assignedToAB;?>story->estimateAB;?>statusAB;?>story->stageAB;?>story->taskCount;?>actions;?> idAB);?> priAB);?> story->title);?> openedByAB);?> assignedToAB);?> story->estimateAB);?> statusAB);?> story->stageAB);?> story->taskCount);?> actions);?>
diff --git a/module/story/model.php b/module/story/model.php index 75779555ae..c47d74c425 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -510,13 +510,13 @@ class storyModel extends model * @access public * @return array */ - public function getProjectStories($projectID = 0) + public function getProjectStories($projectID = 0, $orderBy = 'status_asc,id_desc') { return $this->dao->select('t1.*, t2.*')->from(TABLE_PROJECTSTORY)->alias('t1') ->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id') ->where('t1.project')->eq((int)$projectID) ->andWhere('t2.deleted')->eq(0) - ->orderBy('t2.pri') + ->orderBy($orderBy) ->fetchAll('id'); } diff --git a/module/testcase/view/browse.html.php b/module/testcase/view/browse.html.php index dd8da2ca96..860ae36279 100644 --- a/module/testcase/view/browse.html.php +++ b/module/testcase/view/browse.html.php @@ -28,6 +28,13 @@ var moduleID = ''; echo "{$lang->testcase->bySearch} "; ?> +
exportCSV, $lang->setFileName);?> testcase->create); ?> @@ -37,7 +44,7 @@ var moduleID = '';
-
+